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 when starting/stopping debugger | ||
---|---|---|---|
Product: | debugger | Reporter: | Jiri Skrivanek <jskrivanek> |
Component: | Java | Assignee: | Martin Entlicher <mentlicher> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | blaha, lkotouc, pjiricka |
Priority: | P2 | ||
Version: | 5.x | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 92999 | ||
Attachments: |
Thread dump.
Thread dump in NB 5.5.1. The diff of the fix. |
Description
Jiri Skrivanek
2007-01-22 10:45:37 UTC
Created attachment 37562 [details]
Thread dump.
Debugger operator thread tries to set the stopped state while the current session is being finished on another thread. Both threads use the same locks - DebuggerManager.sessions and JPDADebuggerImpl.LOCK - in the opposite order which results in deadlock. O.K. we'll look at it. We found the same deadlock in NB 5.5.1. I think it should be fixed in 5.5.1 as well. I will attach thread dump generated during automated tests. Created attachment 37908 [details]
Thread dump in NB 5.5.1.
Marking as 5.5.1_candidate We'll look at it during the M7 stabilization week. Scheduling for 6.0 for now. Firing under the lock is bad. It's fixed in trunk now: /shared/data/ccvs/repository/debuggercore/api/src/org/netbeans/api/debugger/DebuggerManager.java,v <-- DebuggerManager.java new revision: 1.27; previous revision: 1.26 /shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/JPDADebuggerImpl.java,v <-- JPDADebuggerImpl.java new revision: 1.113; previous revision: 1.112 Please verify the fix in trunk and I'll integrate it into 5.5.1 then. Thanks. It seems to be fixed. I cannot reproduce it anymore. Created attachment 38657 [details]
The diff of the fix.
Review: The fix is safe enough for integration into NB 5.5.1. Thanks for the review and verification, the fix is merged into release551 branch: /shared/data/ccvs/repository/debuggercore/api/src/org/netbeans/api/debugger/DebuggerManager.java,v <-- DebuggerManager.java new revision: 1.21.4.1.2.1.22.2; previous revision: 1.21.4.1.2.1.22.1 /shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/JPDADebuggerImpl.java,v <-- JPDADebuggerImpl.java new revision: 1.81.4.3.2.4.14.2; previous revision: 1.81.4.3.2.4.14.1 Verified in NB5.5.1 20070314-1939. |