Bug 155326 - Deadlock
Deadlock
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Text
6.x
PC Linux
: P2 (vote)
: 6.x
Assigned To: mslama
issues@platform
: THREAD
: 155333 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-12 11:32 UTC by gtg
Modified: 2009-02-19 22:53 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Deadlock threads (2.56 KB, text/plain)
2008-12-12 11:33 UTC, gtg
Details
message file form var/log directory (224.83 KB, text/plain)
2008-12-12 11:35 UTC, gtg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gtg 2008-12-12 11:32:50 UTC
The following deadlock is happened in NetBeans IDE development build 200812100201.
Comment 1 gtg 2008-12-12 11:33:42 UTC
Created attachment 74897 [details]
Deadlock threads
Comment 2 gtg 2008-12-12 11:35:00 UTC
Created attachment 74898 [details]
message file form var/log directory
Comment 3 Vitezslav Stejskal 2008-12-15 12:26:07 UTC
*** Issue 155333 has been marked as a duplicate of this issue. ***
Comment 4 Vitezslav Stejskal 2008-12-15 14:50:20 UTC
CloneableEditorSupport seems to be firing events when holding its lock. This is generally deadlock prone and should be
avoided.
Comment 5 mslama 2009-01-07 11:33:31 UTC
It is not so easy to put firing out of lock. I would suggest to process event asynchronously. Jarda any suggestion how
to fix this deadlock?
Comment 6 Jaroslav Tulach 2009-01-07 15:40:09 UTC
Replace fireDocument call with:

boolean toFire = false;
synchronized (getLock()) {

  // no fireDocument
  toFire = true;


}
if (toFire) {
  fireDocument(...);
}

You can do similar change for other types of events when you are at it.
Comment 7 mslama 2009-01-08 11:08:34 UTC
Firing document change event is moved out of CES lock when document is opened/closed. All tests passed. We will see if
it breaks anything.

core-main #06b409d61fca
Comment 8 Quality Engineering 2009-01-09 16:46:30 UTC
Integrated into 'main-golden', will be available in build *200901091401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/06b409d61fca
User: Marek Slama <mslama@netbeans.org>
Log: #155326: Move firing document change event out of lock.


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