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 169631 - Deadlock after push on project's node context menu "Deploy"
Summary: Deadlock after push on project's node context menu "Deploy"
Status: CLOSED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-31 10:41 UTC by Marian Mirilovic
Modified: 2010-04-22 10:42 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
thread-dump (20.89 KB, text/plain)
2009-07-31 10:42 UTC, Marian Mirilovic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Mirilovic 2009-07-31 10:41:39 UTC
NB Dev(20090731), JDK6u15 32b, Ubuntu 9.04 64b

Pushed on "Deploy" from context menu over project's node and the IDE is frozen forever ... see attached thread-dump.
Comment 1 Marian Mirilovic 2009-07-31 10:42:10 UTC
Created attachment 85602 [details]
thread-dump
Comment 2 Marek Fukala 2009-07-31 11:25:04 UTC
"org.openide.text Document Processing" CloneableEditorSupport fires state change event under document atomic lock.
BaseJspEditorSupport$3.stateChanged() is called as a state change listener and inside tries to get document from the
support: CloneableEditorSupport.getDocument() which requires CloneableEditorSupport.getLock()

while

"Versioning long tasks" calls CloneableEditorSupport.doCloseDocument() which under CloneableEditorSupport.getLock()
triggers PositionRef$Manager$DocumentRenderer.render() which tries to get a document readlock.

Looks like BaseJspEditorSupport is not supposed to call CES.getDocument() from within the even handler. Just for
curiosity the code hasn't changed for ages so this looks like pretty uncommon race condition.
Comment 3 Marek Fukala 2009-07-31 11:29:26 UTC
Looks like can be fixed by removing the state listener (listening for opened files) and replacing it by overriding
CES.open(). I'll fix it next week after M1 clone.
Comment 4 Marek Fukala 2009-08-05 11:35:09 UTC
fixed in web-main#66c1cbf67d4a
Comment 5 Quality Engineering 2009-08-06 05:59:19 UTC
Integrated into 'main-golden', will be available in build *200908060201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/66c1cbf67d4a
User: Marek Fukala <mfukala@netbeans.org>
Log: #169631 - Deadlock after push on project's node context menu "Deploy"
Comment 6 Marian Mirilovic 2010-04-22 10:42:50 UTC
no more reproducible