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 debugging nb | ||
---|---|---|---|
Product: | debugger | Reporter: | Petr Hejl <phejl> |
Component: | Java | Assignee: | Martin Entlicher <mentlicher> |
Status: | CLOSED FIXED | ||
Severity: | blocker | CC: | abadea, tzezula |
Priority: | P2 | Keywords: | THREAD |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | thread dump |
Description
Petr Hejl
2008-02-13 14:05:57 UTC
Created attachment 56604 [details]
thread dump
When the debugged process was killed (-9). The debugging nb starts working logging the following: WARNING [org.netbeans.api.java.source.JavaSource]: JavaSource.runUserActionTask called in AWT event thread by: org.netbeans.api.java.source.JavaSource.runWhenScanFinished(JavaSource.java:778) SEVERE java.lang.InterruptedException at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:485) at java.awt.EventQueue.invokeAndWait(EventQueue.java:992) at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1323) [catch] at org.netbeans.modules.debugger.jpda.projects.EditorContextImpl.getCurrentLineNumber(EditorContextImpl.java:403) at org.netbeans.modules.debugger.jpda.ui.actions.ToggleBreakpointActionProvider.propertyChange(ToggleBreakpointActionProvider.java:100) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:347) at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.firePropertyChange(JPDADebuggerImpl.java:1392) at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.setState(JPDADebuggerImpl.java:1376) at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.finish(JPDADebuggerImpl.java:1116) at org.netbeans.modules.debugger.jpda.actions.StartActionProvider$4.run(StartActionProvider.java:274) at org.netbeans.modules.debugger.jpda.util.Operator$1.run(Operator.java:316) at java.lang.Thread.run(Thread.java:619) AWT is blocked by java. The InterruptedException is ignored in this case: changeset: 67162:a9ae00bd5bd3 http://hg.netbeans.org/main/rev/a9ae00bd5bd3 OK the AWT is locked by java, I agree. But why? The at org.netbeans.modules.debugger.jpda.projects.EditorContextImpl.parseExpression(EditorContextImpl.java:1482) acquires an java infrastructure lock and waits on VirtualMachineImpl.waitForTargetReply() - holding the lock, so no one other can enter java infrastructure anymore. Editor tries to acquire this lock - any call to runUserActionTask, runModificationTask will deadlock. The runWhenScanFinished may be improved to end in this case without spinning, but it doesn't solve this problem since any call to java infrastructure will cause the deadlock (runUserActionTask, runModificationTask) or service refusal (runWhenScanFinished). The debuger shouldn't do any IPC under java infrastrucure lock. O.K. We need to assure that we will not call long tasks under shared user action task. Fixed in trunk: changeset: 69466:fe6f0a22b01b http://hg.netbeans.org/main/rev/fe6f0a22b01b Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier. |