Bug 122257 - Complete lock up while trying to rename a file
Complete lock up while trying to rename a file
Status: VERIFIED FIXED
Product: platform
Classification: Unclassified
Component: Data Systems
6.x
All Windows XP
: P2 (vote)
: 6.x
Assigned To: Jaroslav Tulach
issues@platform
: RELNOTE
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-19 09:59 UTC by giorgio42
Modified: 2008-12-22 11:24 UTC (History)
9 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Threaddump from jstack (28.94 KB, text/plain)
2007-11-19 10:00 UTC, giorgio42
Details
Screenshot of Favorites window (3.02 KB, text/plain)
2008-01-30 21:12 UTC, giorgio42
Details
Screenshot of the Favorites window (correct MIME type) (3.02 KB, image/png)
2008-01-30 21:13 UTC, giorgio42
Details
Actual contents of file system (explorer screen shot) (2.97 KB, image/png)
2008-01-30 21:14 UTC, giorgio42
Details

Note You need to log in before you can comment on or make changes to this bug.
Description giorgio42 2007-11-19 09:59:18 UTC
NB6, RC1, WinXPSP, JDK 1.6.0_02.

I copied some Coldfusion (*.cf) files from elsewhere, browsed to the directory in the Favorites window, selected one of
the files and tried to change the extension from .cfm to .jsp. After pressing Enter NB GUI completely hangs (still
reacts to jconsole and jstack).
Comment 1 giorgio42 2007-11-19 10:00:06 UTC
Created attachment 53186 [details]
Threaddump from jstack
Comment 2 David Simonek 2007-11-19 11:03:25 UTC
From threaddump it looks like deadlock between RequestProcessor thread and EventQueue thread, probably caused by cross
locking 
locked <0x0d15c788> (a org.openide.windows.CloneableOpenSupport$Listener)

I don't know where should we break such deadlock, but it seems strange that
org.netbeans.modules.languages.features.LanguagesNavigator is trying to open some document as reaction to lookup change...
Comment 3 giorgio42 2007-11-19 12:30:32 UTC
The issue is 100% reproducible (I tried to change the extension of another *.cfm file).

Georg
Comment 4 Petr Nejedly 2007-11-19 13:19:26 UTC
It is related to the EncodingQuery, which caused many deadlocks early after implementation.
Comment 5 giorgio42 2007-11-19 21:27:02 UTC
The lock up seems to occur every time I try to change the extension of a file to .jsp (tried this with a file in my
local perl installation: evn.plex -> env.plex2 works, env.plex -> env.jsp locks up).
Comment 6 giorgio42 2007-11-21 21:52:12 UTC
Just tried again with RC2 and still completely reproducible. I guess this is a showstopper, isn't it?
Comment 7 Jan Jancura 2007-11-22 13:33:40 UTC
I don't know where should we break such deadlock too. Can some expert from core team look at it, please?

My call (EditorCookie.openDocument () in Navigator) is not illegal, as far as I know. There is no restrictions on this
method described in documentation.
I can listen on EditorCookie.Observable, but I am not comfortable doing such changes after RC2.

Can somebody form QA evaluate priprity of this issue (is it reproducible)?
Comment 8 Petr Nejedly 2007-11-22 13:43:30 UTC
Let's try DataSystems.
Comment 9 Martin Schovanek 2007-11-22 14:09:41 UTC
Ar first a cannot reproduce it but now I found it.

Steps to reproduce:
-------------------
1) open a Nb Project (can reproduce at least with Web and J2SE)
2) create a 'New > Other ... > Other > Empty File' eg: abc
3) copy the file eg: into abc_1
4) rename abc_1 into abc.jsp
ERROR: IDE locks

But when you only create a new Empty file and then rename it to the abc.jsp things work well.
Comment 10 Jaroslav Tulach 2007-11-22 17:02:18 UTC
Well, this does not good.

The Data system is somehow confused by a rename of some dataobject that triggers creation of new JSP object. That 
invalidates the previously existing object, which triggers Navigator, which triggers Schlieman, which then asks for a 
document using a blocking call. 

That call schedules another thread which gets into a starvation with the first thread doing the open. Indeed this is a 
bug in DataSystems, however I need about three days to fix it with 95% probability of doing correct fix. I need a day 
if I am lucky.

My advice to Hanz was to use getDocument() instead of openDocument() which is non-blocking. Then we would trade this 
P1 for a P3 for Schlieman saying that: "Navigator is sometimes empty and user needs to choose switch to other 
component and back to get its content populated". Up to you to decide what to do.
Comment 11 Martin Schovanek 2007-11-22 17:31:29 UTC
Hanzi, please can you comment?
Comment 12 Jan Jancura 2007-11-23 09:37:48 UTC
I can do that.
So, questions for QA: is it show stopper? Should it be fixed in RC3? Are you comfortable with this solution (no
deadlock, empty navigator on the first try)?
Comment 13 Petr Jiricka 2007-11-23 10:01:15 UTC
We agreed this is not a stopper for NetBeans 6, changing priority to P2. Jardo, it would be best if you could work on
the patch for trunk - thanks.
Comment 14 David Simonek 2007-11-23 10:55:09 UTC
After consultation with Jarda, I'm offering simple fix in navigator, see attached patch. Fix is just deletion of one if
condition which ensures that Navigator will react on node destroy asynchronously - which is good and desired in fact,
especially because navigator updates itself asynchronously in all other listener reactions cases, this was the only
synchronous update trigger.

Given that we have this simple and safe fix, i vote for including in 6.0. Please downgrade to P2 again if you disagree,
thank you. Otherwise please Jarda review so that I can merge into release60 later, thanks.

Checking in NavigatorController.java;
/cvs/core/navigator/src/org/netbeans/modules/navigator/NavigatorController.java,v  <--  NavigatorController.java
new revision: 1.36; previous revision: 1.35
Comment 15 Jaroslav Tulach 2007-11-23 11:23:35 UTC
I have an independent fix of the problem in loaders as well:


IDE:-------------------------------------------------
IDE: [23.11.07 12:23] Committing "Datasystems API" started
cvs server: scheduling file `DefaultDataObjectTest.java' for addition
cvs server: use 'cvs commit' to add this file permanently
RCS file: /shared/data/ccvs/repository/openide/loaders/test/unit/src/org/openide/loaders/DefaultDataObjectTest.java,v
done
Checking in test/unit/src/org/openide/loaders/DefaultDataObjectTest.java;
/shared/data/ccvs/repository/openide/loaders/test/unit/src/org/openide/loaders/DefaultDataObjectTest.java,v  <--  
DefaultDataObjectTest.java
initial revision: 1.1
done
Checking in src/org/openide/text/DataEditorSupport.java;
/shared/data/ccvs/repository/openide/loaders/src/org/openide/text/DataEditorSupport.java,v  <--  
DataEditorSupport.java
new revision: 1.53; previous revision: 1.52
done
IDE: [23.11.07 12:23] Committing "Datasystems API" finished

Comment 16 Marian Mirilovic 2008-01-30 17:17:45 UTC
giorgio42, 
could you please verify the fix ? If so we can add it into next patch available on NB 6.0 UC. Thanks in advance.
Comment 17 giorgio42 2008-01-30 21:11:06 UTC
Renaming works but there is another weird issue: I renamed a foobar.cfm file to foobar.jsp in the Favorites window.
After that I changed to the Windows explorer and renamed it back to foobar.cfm, because I wanted to repeat the test.

I noticed two problems:
1. Both files are visible in the Favorites window, although only one exists (usually the view in the Favorites window is
updated automatically after some seconds), see screenshots.
2. When I select the foobar.cfm file and then the non-existing foobar.jsp it takes several seconds until the selection
highlight moves to the foobar.jsp file.
Comment 18 giorgio42 2008-01-30 21:12:28 UTC
Created attachment 55795 [details]
Screenshot of Favorites window
Comment 19 giorgio42 2008-01-30 21:13:14 UTC
Created attachment 55796 [details]
Screenshot of the Favorites window (correct MIME type)
Comment 20 giorgio42 2008-01-30 21:14:15 UTC
Created attachment 55797 [details]
Actual contents of file system (explorer screen shot)
Comment 21 Lukas Hasik 2008-01-31 14:23:50 UTC
giorgio42, you verified the issue in development build, right? It seems that the issue was caused by the FS change
(issue 123542). 

What build did you use for testing? 
It doesn't happen in my config - Product Version: NetBeans IDE Dev (Build 200801300005), Java: 1.6.0_04; Java
HotSpot(TM) Client VM 10.0-b19, System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)

thank you for verification
Comment 22 giorgio42 2008-01-31 20:59:04 UTC
I used either 6.1M1 or 6.1 200801271318 (can't remember exactly) and:
java version "1.6.0_10-ea"
Java(TM) SE Runtime Environment (build 1.6.0_10-ea-b10)
Java HotSpot(TM) Client VM (build 11.0-b09, mixed mode, sharing)
Comment 23 Karthikeyan Rajeswaran 2008-02-11 07:26:42 UTC
The fix has been ported into the release601_fixes branch.

cvs add DefaultDataObjectTest.java
cvs server: scheduling file `DefaultDataObjectTest.java' for addition on branch `release601_fixes'
cvs server: use 'cvs commit' to add this file permanently

Checking in src/org/openide/text/DataEditorSupport.java;
/cvs/openide/loaders/src/org/openide/text/Attic/DataEditorSupport.java,v  <--  DataEditorSupport.java
new revision: 1.52.8.1; previous revision: 1.52
done
Checking in test/unit/src/org/openide/loaders/DefaultDataObjectTest.java;
/cvs/openide/loaders/test/unit/src/org/openide/loaders/Attic/DefaultDataObjectTest.java,v  <--  DefaultDataObjectTest.java
new revision: 1.2.2.1; previous revision: 1.2
done

Checking in src/org/netbeans/modules/navigator/NavigatorController.java;
/cvs/core/navigator/src/org/netbeans/modules/navigator/Attic/NavigatorController.java,v  <--  NavigatorController.java
new revision: 1.33.2.1.4.1; previous revision: 1.33.2.1
done
Comment 24 pgebauer 2008-02-12 21:32:01 UTC
The module org-openide-loaders.nbm requests org-openide-modules-os-MacOSX.nbm during installation into the IDE.
I'm removing the release601_fixes_fixed status whiteboard.
Comment 25 Karthikeyan Rajeswaran 2008-02-18 21:01:01 UTC
Removing release601_fixes_candidate1 status whiteboard value. The fix cannot be ported to the fixes branch, since it
cannot be made available on the update center:  see http://www.netbeans.org/issues/show_bug.cgi?id=127593 .

Rolled back the changes to release601_fixes branch:

Checking in src/org/openide/text/DataEditorSupport.java;
/cvs/openide/loaders/src/org/openide/text/Attic/DataEditorSupport.java,v  <--  DataEditorSupport.java
new revision: 1.52.8.2; previous revision: 1.52.8.1
done
Removing test/unit/src/org/openide/loaders/DefaultDataObjectTest.java;
/cvs/openide/loaders/test/unit/src/org/openide/loaders/Attic/DefaultDataObjectTest.java,v  <--  DefaultDataObjectTest.java
new revision: delete; previous revision: 1.2.2.1
done
Checking in src/org/netbeans/modules/navigator/NavigatorController.java;
/cvs/core/navigator/src/org/netbeans/modules/navigator/Attic/NavigatorController.java,v  <--  NavigatorController.java
new revision: 1.33.2.1.4.2; previous revision: 1.33.2.1.4.1
done



By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo