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.
Summary: | Deadlock while modifying just loading source. | ||
---|---|---|---|
Product: | platform | Reporter: | _ pkuzel <pkuzel> |
Component: | -- Other -- | Assignee: | Peter Zavadsky <pzavadsky> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | jtulach, mmetelka, non_migrated_user |
Priority: | P2 | ||
Version: | 3.x | ||
Hardware: | PC | ||
OS: | Unix | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Thread dump
Proposed patch to avoid deadlock. |
Description
_ pkuzel
2001-06-01 17:03:17 UTC
Created attachment 1479 [details]
Thread dump
Seems like openide (PositionManager / CloneableEditorSupport) problem. Please reassign back if not. Marek, can you check this. Please could you tell me what version of IDE is it? (What build?) (Assuming it is the same document) it's wrong to try to modify the document that is just being loaded, isn't it? Yes I agree but as you can see it is possible. Is there any way how to prevent it in CloneableEditorSupport or in editor? I will try to solve it between org.openide.text.NbDocument and org.openide.text.CloneableEditorSupport. It is Netbeans 3.2 FCS Reassign to new owner of openide/editor Assign this to me if you have no time to work on it (but I am not sure I would know what to do with it...). I'm already working on it. Sorry didn't marked. But if you would like to help, you are welcome, the solution seems not to be easy one, see the thread: [openide-dev] Could sb revise fix for #12557. Deadlock while reloading doc. postponed the fix for a release after NB 3.3.x. Peter please attach your proposed patch here so it won't get lost. Created attachment 3587 [details]
Proposed patch to avoid deadlock.
You can test the presence of the sync gap and the patch with openide/test/regr/src/org/openide/text/ReloadDeadlockTest. I guess the patch is not 100%. It avoids the deadlock succesfully, but loses data trying to be put in the document from the second thread while the first one has already started to perform reloading from file. The data loading from file replace the changes made by the second thread. I'm not sure if that behaviour is correct. But if not there seems to be quite complicated to prevent the data made by the second thread if done during that time. Marked as 3.3.0 waiver. It wont be fixed due to risky change in sync of editor support and also due to a reason the possibility to occure this issue is very low. We have just one report for last about 2 years, since the editor support sync is implemented this way. Prefer to fix this issue at the beginnig of next dev cycle so there could be a long time to test and approve it. the situation hasn't change since 3.3.0 Waiver for 3.3.1 approved by QA. Fixed in [main-trunk] Fix: openide/../text/PositionRef.java [1.43] Note: The deadlock is solved by this fix. Then remains less priority issue, what to do with the modification tried to make to the old content of the document, i.e. it should be reflexed in the new reloaded content, see #19845. Risky change. Will not be fixed for FFJ 4.0 (Orion). Waiver approved. Created attachment 1479 [details]
Thread dump
You are using older builds than 3.4 (it's clear from the stack trace line numbers), where there was still the old synch used. See above, this issue was approved as waiwer for 3.3 and ffj40, it is fixed just in 3.4. Thanks. Closing as fixed. long time not changed Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/e695735790a1 User: Jesse Glick <jglick@netbeans.org> Log: Not actually functional since afa36000f36f, since T2 aborts early (yet test passed anyway). ... T2: Thus will acquire CES lock and wait on doc write lock. Exception in thread "Thread-1" java.lang.AssertionError: CloneableEditorSupport.getOpenedPanes() must be called from AWT thread only at org.openide.text.CloneableEditorSupport.getOpenedPanes(CloneableEditorSupport.java:1161) at org.openide.text.CloneableEditorSupport.reloadDocument(CloneableEditorSupport.java:1735) at org.openide.text.ReloadDeadlockTest$1.run(ReloadDeadlockTest.java:127) at java.lang.Thread.run(Thread.java:662) END of deadlock test, see issue #12557. |