This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 137910 - Deadlock after open group
Summary: Deadlock after open group
Status: RESOLVED DUPLICATE of bug 132662
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: mslama
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-22 22:05 UTC by err
Modified: 2008-12-22 11:45 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump after hang (45.00 KB, text/plain)
2008-06-22 22:06 UTC, err
Details

Note You need to log in before you can comment on or make changes to this bug.
Description err 2008-06-22 22:05:02 UTC
when it hung the Navigator window said "Please Wait...".

The attached log/thread-dump seems to show that two threads are holding the same lock, hard to believe.
Comment 1 err 2008-06-22 22:06:22 UTC
Created attachment 63225 [details]
Thread dump after hang
Comment 2 Peter Pis 2008-06-22 23:08:36 UTC
Reassigning to "debugger" for evaluation.
Comment 3 Martin Entlicher 2008-06-22 23:47:33 UTC
I need to access the Document from AnnotationProvider.annotate() so that I know *what* I'm annotating. Is it that bad
approach??

I do not think so, thus I'm passing to openide.text to reconsider the dual usage of CloneableEditorSupport.RP. It's
throughoutput is "1", thus it will not load a document when it's already busy with loading annotations.
Comment 4 Martin Entlicher 2008-06-22 23:49:28 UTC
err, FYI: The threads do not hold the lock. There are in Object.wait() call.
Comment 5 err 2008-06-23 03:54:38 UTC
I guess I don't quite understand what "locked" means in the following
        - locked <0x0532b9d0> (a org.openide.windows.CloneableOpenSupport$Listener)
It seems like you are saying this means it is in the process of acquiring a lock. If that is the case then I would think
it would be in the JVM somewhere. But that can't be the case since after the "locked" line, the stack shows each of the
threads to be executing in org.openide.text.CloneableEditorSupport, openDocument in one case and getDocument in the
other. If you could explain what this really means I would appreciate it.
Comment 6 Martin Entlicher 2008-06-23 09:28:33 UTC
- locked <0x0532b9d0> (a org.openide.windows.CloneableOpenSupport$Listener)
means that the thread has acquired the lock. And it's holding the lock in the upper stack frames.
But then it calls Object.wait(). That releases the lock temporarily, until it's notified. Please read
http://java.sun.com/javase/6/docs/api/java/lang/Object.html#wait()
Thus another thread can take the lock then. And the thread which will call Object.notify()/notifyAll() will also need to
acquire the lock.
Comment 7 mslama 2008-06-23 09:50:56 UTC
Already fixed in trunk as issue #132662. Fix should be in patch2 for NB 6.1.

*** This issue has been marked as a duplicate of 132662 ***