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 58365 - Deadlock while debugging multithreaded app with method call in watch
Summary: Deadlock while debugging multithreaded app with method call in watch
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: All All
: P1 blocker (vote)
Assignee: issues@debugger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-27 09:11 UTC by Max Sauer
Modified: 2006-03-24 13:13 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
test application and log (16.78 KB, application/x-gzip)
2005-04-27 09:14 UTC, Max Sauer
Details
threaddump (20.34 KB, text/plain)
2005-04-27 10:29 UTC, Marek Grummich
Details
proposed patch for nb41 (18.04 KB, patch)
2005-04-27 16:34 UTC, Jan Jancura
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Max Sauer 2005-04-27 09:11:02 UTC
While debugging an app with library using threads, a deadlock occures while
stepping through souce code.

Steps to reproduce this:
------------------------
1) Open the projecy in the attachement (JavaApplication1)
2) In the library tlib, pack0 open tClass.java
3) Inside this file, place a breakpoint on line 46 (System.out...)
4) Start Debug main project (F5)
5) The debugger now stops at the placed breakpoint. Select min, and set it as
New Watch.
6) Add one more watch, now the whole expression (Math.random()+min)
7) Step the program few times (F8)

Solaris 9, sparc, build 4.1 RC2, build 
200504261930. 

Patch applied:  
org-netbeans-modules-debugger-jpda.jar (size: 548330)
Comment 1 Max Sauer 2005-04-27 09:14:21 UTC
Created attachment 21887 [details]
test application and log
Comment 2 Lukas Hasik 2005-04-27 09:59:19 UTC
stacktrace looks very similar to issue 58348 but it was in j2me project. Thanks
for reproducing in j2se ;)
Comment 3 Marek Grummich 2005-04-27 10:28:30 UTC
Another deadlock is attached. I used Milan's DebuggerTwoThreads project and had
some watches. Latest jars (org-netbeans-spi-viewmodel.jar,
org-netbeans-modules-debugger-jpda.jar ) were applied.
Comment 4 Marek Grummich 2005-04-27 10:29:00 UTC
Created attachment 21891 [details]
threaddump
Comment 5 Jan Jancura 2005-04-27 16:32:14 UTC
fixed in trunk
Comment 6 Jan Jancura 2005-04-27 16:34:22 UTC
Created attachment 21894 [details]
proposed patch for nb41
Comment 7 _ lcincura 2005-04-28 13:54:14 UTC
Patch for nb41 verified on latest 4.1 build [200504271930].
Please integrate into 4.1 branch.
Comment 8 Jan Jancura 2005-04-28 14:39:36 UTC
fixed in release41 branch:

Checking in viewmodel/src/org/netbeans/modules/viewmodel/TreeTable.java;
/cvs/debuggercore/viewmodel/src/org/netbeans/modules/viewmodel/TreeTable.java,v
 <--  TreeTable.java
new revision: 1.15.2.1; previous revision: 1.15
done
Checking in src/org/netbeans/modules/debugger/jpda/JPDADebuggerImpl.java;
/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/JPDADebuggerImpl.java,v
 <--  JPDADebuggerImpl.java
new revision: 1.64.2.3; previous revision: 1.64.2.2
done
Checking in
src/org/netbeans/modules/debugger/jpda/actions/ContinueActionProvider.java;
/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/actions/ContinueActionProvider.java,v
 <--  ContinueActionProvider.java
new revision: 1.3.38.2; previous revision: 1.3.38.1
done
Checking in src/org/netbeans/modules/debugger/jpda/actions/PauseActionProvider.java;
/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/actions/PauseActionProvider.java,v
 <--  PauseActionProvider.java
new revision: 1.3.38.2; previous revision: 1.3.38.1
done
Checking in src/org/netbeans/modules/debugger/jpda/expr/Evaluator.java;
/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/expr/Evaluator.java,v 
<--  Evaluator.java
new revision: 1.14.6.1; previous revision: 1.14
done
Comment 9 Max Sauer 2005-06-22 16:39:58 UTC
Verified.