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 after external modification(?) | ||
---|---|---|---|
Product: | platform | Reporter: | Martin Krauskopf <mkrauskopf> |
Component: | Text | Assignee: | Petr Nejedly <pnejedly> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | jlahoda |
Priority: | P1 | Keywords: | RANDOM, THREAD |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | TD.txt |
Description
Martin Krauskopf
2007-07-26 10:21:55 UTC
Created attachment 45758 [details]
TD.txt
I am not sure what exactly went wrong, but the problem seems to be in CloneableEditorSupport in document reloading. All threads are apparently waiting on the document to be reloaded, but no other thread seems to be loading it. It could be a side effect of #111068. Thread "Default RequestProcessor" (tid=0x95d6c400) would like to load the document everybody is waiting for, but it can't as it needs write access to the document, but the thread "HintsController worker" (tid=0x9689a000) keeps read access. There was no reload happening ("HintsController worker" found status=DOCUMENT_NO), but AnnotationsHolder (few stack frames earlier) somehow obtained the reference to the document being loaded. That means that HintsControllerImpl.setErrorsImpl():103 maintained to sucessfully get AnnotationsHolder instance with proper doc set (that is, editorCookie.getDocument() passed), yet finds no doc/DOCUMENT_NO a while later (even under doc's read access. I still don't fully understand how can this happen. Ih, now I see. This is clearly a consequence of issue 111068, but we need to make CES more robust. The reloading task failed (actually just one of the document listeners fired an Error), but the internal structures were left inconsistent (doc != null while status == DOCUMENT_NO). There should be two fixes: 1. Clear the doc field if the loading effort led to DOCUMENT_NO (to prevent this deadlock) 2. (optional) Survive errors from listeners, keep on reloading. #1 fixed: openide/text/src/org/openide/text/CloneableEditorSupport.java,v1.35 |