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 141644 - [65cat] com.sun.jdi.InternalException: Unexpected JDWP Error: 13
Summary: [65cat] com.sun.jdi.InternalException: Unexpected JDWP Error: 13
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Entlicher
URL: http://statistics.netbeans.org/except...
Keywords:
: 141646 156578 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-25 06:18 UTC by _ theanuradha
Modified: 2009-04-21 13:36 UTC (History)
18 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 79550


Attachments
stacktrace (869 bytes, text/plain)
2009-02-03 17:17 UTC, jbsabmello
Details
stacktrace (869 bytes, text/plain)
2009-02-10 15:33 UTC, Max Sauer
Details
stacktrace (869 bytes, text/plain)
2009-02-10 18:42 UTC, Filip Zamboj
Details
stacktrace (869 bytes, text/plain)
2009-02-18 13:11 UTC, Max Sauer
Details
stacktrace (869 bytes, text/plain)
2009-03-23 14:44 UTC, rajivderas
Details
stacktrace (869 bytes, text/plain)
2009-04-05 23:57 UTC, tbrunhoff
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ theanuradha 2008-07-25 06:18:02 UTC
Build: NetBeans IDE Dev (Build 080723)
VM: Java HotSpot(TM) Client VM, 11.0-b14, Java(TM) SE Runtime Environment, 1.6.0_10-rc-b27
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
com.sun.jdi.InternalException: Unexpected JDWP Error: 13
        at com.sun.tools.jdi.JDWPException.toJDIException(JDWPException.java:47)
        at com.sun.tools.jdi.ThreadReferenceImpl.currentContendedMonitor(ThreadReferenceImpl.java:433)
        at org.netbeans.modules.debugger.jpda.models.JPDAThreadImpl.checkForBlockingThreads(JPDAThreadImpl.java:1055)
        at org.netbeans.modules.debugger.jpda.SingleThreadWatcher.run(SingleThreadWatcher.java:81)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
Comment 1 _ theanuradha 2008-07-25 06:22:11 UTC
*** Issue 141646 has been marked as a duplicate of this issue. ***
Comment 2 Daniel Prusa 2008-07-25 10:23:25 UTC
Fixed.
changeset f8ecb6bca0d6 in main
details: http://hg.netbeans.org/main?cmd=changeset;node=f8ecb6bca0d6
Comment 3 Exceptions Reporter 2009-01-09 18:22:59 UTC
Reopening - reproduced in NetBeans IDE 6.5 Beta (Build 200808111757)
http://statistics.netbeans.org/exceptions/detail.do?id=79550
Comment 4 Martin Entlicher 2009-01-15 08:27:57 UTC
*** Issue 156578 has been marked as a duplicate of this issue. ***
Comment 5 Martin Entlicher 2009-01-15 08:32:48 UTC
Error 13 means THREAD_NOT_SUSPENDED - "If the specified thread has not been suspended by an event."

It's hard to believe though that the thread must be suspended by an event in order to get the current contended monitor.
IMHO suspended state is enough.
Better synchronization is necessary.
Comment 6 jbsabmello 2009-02-03 17:17:17 UTC
Build: NetBeans IDE Dev (Build 200902010201)
VM: Java HotSpot(TM) Server VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
com.sun.jdi.InternalException: Unexpected JDWP Error: 13
        at com.sun.tools.jdi.JDWPException.toJDIException(JDWPException.java:47)
        at com.sun.tools.jdi.ThreadReferenceImpl.currentContendedMonitor(ThreadReferenceImpl.java:433)
        at org.netbeans.modules.debugger.jpda.jdi.ThreadReferenceWrapper.currentContendedMonitor(ThreadReferenceWrapper.java:60)
        at org.netbeans.modules.debugger.jpda.models.JPDAThreadImpl.checkForBlockingThreads(JPDAThreadImpl.java:1197)
        at org.netbeans.modules.debugger.jpda.SingleThreadWatcher.run(SingleThreadWatcher.java:83)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:573)
Comment 7 jbsabmello 2009-02-03 17:17:29 UTC
Created attachment 76518 [details]
stacktrace
Comment 8 Max Sauer 2009-02-10 15:33:28 UTC
Build: NetBeans IDE Dev (Build 20090206071818)
VM: Java HotSpot(TM) 64-Bit Server VM, 1.6.0_07-b06-57, Java(TM) SE Runtime Environment, 1.6.0_07-b06-153
OS: Mac OS X, 10.5.6, x86_64

User Comments: 
Applying code changes

Stacktrace: 
com.sun.jdi.InternalException: Unexpected JDWP Error: 13
        at com.sun.tools.jdi.JDWPException.toJDIException(JDWPException.java:47)
        at com.sun.tools.jdi.ThreadReferenceImpl.currentContendedMonitor(ThreadReferenceImpl.java:433)
        at org.netbeans.modules.debugger.jpda.jdi.ThreadReferenceWrapper.currentContendedMonitor(ThreadReferenceWrapper.java:60)
        at org.netbeans.modules.debugger.jpda.models.JPDAThreadImpl.checkForBlockingThreads(JPDAThreadImpl.java:1202)
        at org.netbeans.modules.debugger.jpda.SingleThreadWatcher.run(SingleThreadWatcher.java:83)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:573)
Comment 9 Max Sauer 2009-02-10 15:33:43 UTC
Created attachment 76797 [details]
stacktrace
Comment 10 Filip Zamboj 2009-02-10 18:42:11 UTC
Build: NetBeans IDE Dev (Build 200902091451)
VM: Java HotSpot(TM) 64-Bit Server VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03
OS: Linux, 2.6.27-11-generic, amd64

User Comments: 
was using F8 while debugging

Stacktrace: 
com.sun.jdi.InternalException: Unexpected JDWP Error: 13
        at com.sun.tools.jdi.JDWPException.toJDIException(JDWPException.java:47)
        at com.sun.tools.jdi.ThreadReferenceImpl.currentContendedMonitor(ThreadReferenceImpl.java:433)
        at org.netbeans.modules.debugger.jpda.jdi.ThreadReferenceWrapper.currentContendedMonitor(ThreadReferenceWrapper.java:60)
        at org.netbeans.modules.debugger.jpda.models.JPDAThreadImpl.checkForBlockingThreads(JPDAThreadImpl.java:1202)
        at org.netbeans.modules.debugger.jpda.SingleThreadWatcher.run(SingleThreadWatcher.java:83)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:573)
Comment 11 Filip Zamboj 2009-02-10 18:42:34 UTC
Created attachment 76812 [details]
stacktrace
Comment 12 Max Sauer 2009-02-18 13:11:44 UTC
Build: NetBeans IDE Dev (Build 20090206071818)
VM: Java HotSpot(TM) 64-Bit Server VM, 1.6.0_07-b06-57, Java(TM) SE Runtime Environment, 1.6.0_07-b06-153
OS: Mac OS X, 10.5.6, x86_64

User Comments: 
Neverending stream of exceptions while having debugger session active.

Stacktrace: 
com.sun.jdi.InternalException: Unexpected JDWP Error: 13
        at com.sun.tools.jdi.JDWPException.toJDIException(JDWPException.java:47)
        at com.sun.tools.jdi.ThreadReferenceImpl.currentContendedMonitor(ThreadReferenceImpl.java:433)
        at org.netbeans.modules.debugger.jpda.jdi.ThreadReferenceWrapper.currentContendedMonitor(ThreadReferenceWrapper.java:60)
        at org.netbeans.modules.debugger.jpda.models.JPDAThreadImpl.checkForBlockingThreads(JPDAThreadImpl.java:1202)
        at org.netbeans.modules.debugger.jpda.SingleThreadWatcher.run(SingleThreadWatcher.java:83)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:573)
Comment 13 Max Sauer 2009-02-18 13:11:54 UTC
Created attachment 77096 [details]
stacktrace
Comment 14 rajivderas 2009-03-23 14:43:57 UTC
Build: NetBeans IDE Dev (Build 20090321211250)
VM: OpenJDK Client VM, 14.0-b10, Java(TM) SE Runtime Environment, 1.6.0_14-ea-b01
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
com.sun.jdi.InternalException: Unexpected JDWP Error: 13
        at com.sun.tools.jdi.JDWPException.toJDIException(JDWPException.java:47)
        at com.sun.tools.jdi.ThreadReferenceImpl.currentContendedMonitor(ThreadReferenceImpl.java:433)
        at org.netbeans.modules.debugger.jpda.jdi.ThreadReferenceWrapper.currentContendedMonitor(ThreadReferenceWrapper.java:60)
        at org.netbeans.modules.debugger.jpda.models.JPDAThreadImpl.checkForBlockingThreads(JPDAThreadImpl.java:1220)
        at org.netbeans.modules.debugger.jpda.SingleThreadWatcher.run(SingleThreadWatcher.java:83)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:573)
Comment 15 rajivderas 2009-03-23 14:44:08 UTC
Created attachment 78645 [details]
stacktrace
Comment 16 Marian Mirilovic 2009-03-26 14:44:37 UTC
153 duplicates so far ... P2
Comment 17 Martin Entlicher 2009-03-26 14:51:08 UTC
Unexpected JDWP Error: 13 is clearly a defect of JDI, not NetBeans.

Unfortunately we can not expect this to be fixed, thus we must find what exactly triggers this and what JDI/JDWP
expects. After that we can try to create a workaround.
Comment 18 Martin Entlicher 2009-03-26 15:45:16 UTC
The documentation is really poor,
http://java.sun.com/javase/6/docs/platform/jpda/jdwp/jdwp-protocol.html#JDWP_ThreadReference_CurrentContendedMonitor
says that the thread must be suspended, but THREAD_NOT_SUSPENDED is not listed in it's error codes.

I've submitted http://bugs.sun.com/view_bug.do?bug_id=6822609 for the poor JDWP documentation.
And http://bugs.sun.com/view_bug.do?bug_id=6822613 for InternalException being thrown.
Comment 19 Martin Entlicher 2009-03-27 09:56:15 UTC
Workarounded in changeset:   123880:f69f00b6ffa7
http://hg.netbeans.org/main/rev/f69f00b6ffa7
Comment 20 Quality Engineering 2009-03-28 20:40:16 UTC
Integrated into 'main-golden', will be available in build *200903281400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/f69f00b6ffa7
User: mentlicher@netbeans.org
Log: #141644 - Workaround implemented, instead of "InternalException: Unexpected JDWP Error: 13" we throw the expected "IncompatibleThreadStateException".
Comment 21 Filip Zamboj 2009-03-30 11:38:09 UTC
verified for netbeans ... hope we can expect fix in jdwp soon ... 
Comment 22 tbrunhoff 2009-04-05 23:57:32 UTC
Build: NetBeans IDE Dev (Build 200902231810)
VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_05-b13
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
com.sun.jdi.InternalException: Unexpected JDWP Error: 13
        at com.sun.tools.jdi.JDWPException.toJDIException(JDWPException.java:47)
        at com.sun.tools.jdi.ThreadReferenceImpl.currentContendedMonitor(ThreadReferenceImpl.java:433)
        at org.netbeans.modules.debugger.jpda.jdi.ThreadReferenceWrapper.currentContendedMonitor(ThreadReferenceWrapper.java:60)
        at org.netbeans.modules.debugger.jpda.models.JPDAThreadImpl.checkForBlockingThreads(JPDAThreadImpl.java:1227)
        at org.netbeans.modules.debugger.jpda.SingleThreadWatcher.run(SingleThreadWatcher.java:83)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:573)
Comment 23 tbrunhoff 2009-04-05 23:57:37 UTC
Created attachment 79492 [details]
stacktrace
Comment 24 Filip Zamboj 2009-04-21 13:36:48 UTC
verified on 
Product Version: NetBeans IDE 6.7 Beta (Build 200904192254)
Java: 1.6.0_13; Java HotSpot(TM) 64-Bit Server VM 11.3-b02