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 150096 - [65cat] NetBeans deadlock
Summary: [65cat] NetBeans deadlock
Status: CLOSED WONTFIX
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 6.x
Hardware: PC Linux
: P1 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-14 14:30 UTC by Unknown
Modified: 2010-04-29 09:44 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
console output (54.77 KB, text/plain)
2008-10-14 14:31 UTC, Unknown
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Unknown 2008-10-14 14:30:58 UTC
[ BUILD # : 200810111401 ]
[ JDK VERSION : 1.6.0_07 ]

Attaching console output
Comment 1 Unknown 2008-10-14 14:31:39 UTC
Created attachment 71767 [details]
console output
Comment 2 David Simonek 2008-10-14 16:03:37 UTC
From console output I'm not able to demystify where the deadlock is. It seems that system frozen during debugging
session, when user tried to change thread:

at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Container.getMousePosition(Container.java:2430)
        at org.netbeans.modules.debugger.jpda.ui.debugging.ClickableIcon.changeThread(ClickableIcon.java:115)
        at org.netbeans.modules.debugger.jpda.ui.debugging.DebuggingView$IconsPanel.addIcon(DebuggingView.java:1041)
        at org.netbeans.modules.debugger.jpda.ui.debugging.DebuggingView$ViewRefresher.addPanels(DebuggingView.java:896)
        at org.netbeans.modules.debugger.jpda.ui.debugging.DebuggingView$ViewRefresher.run(DebuggingView.java:832)

Another things that may contribute are following warnings:
WARNING [org.netbeans.api.java.source.JavaSource]: JavaSource.runUserActionTask called in AWT event thread by:
org.netbeans.modules.refactoring.java.ui.RefactoringActionsProvider$TextComponentTask.run(RefactoringActionsProvider.java:720)
WARNING [org.netbeans.api.java.source.JavaSource]: JavaSource.runUserActionTask called in AWT event thread by:
org.netbeans.modules.groovy.refactoring.GroovyRefactoringFactory.resolveClass(GroovyRefactoringFactory.java:173)

Passing to debugger, please evaluate and assign further if I'm wrong.

Reporter please, we need you to generate full thread dump of the system when in frozen state. Here is how to do it:
http://wiki.netbeans.org/GenerateThreadDump

Comment 3 Jiri Kovalsky 2008-10-22 09:57:34 UTC
Martine, can you please investigate this? Thanks!
Comment 4 Martin Entlicher 2008-10-22 11:08:27 UTC
IMHO we can not do anything about this. It looks like an AWT defect.

INFO [null]: AWT Event Dispatch Thread is blocked for 3,229,099 ms
Thread AWT-EventQueue-1
        sun.misc.Unsafe.park:-2
        java.util.concurrent.locks.LockSupport.park:158
        java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt:747
        java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued:778
        java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire:1114
        java.util.concurrent.locks.ReentrantLock$NonfairSync.lock:186
        java.util.concurrent.locks.ReentrantLock.lock:262
        sun.awt.SunToolkit.awtLock:245
        sun.awt.X11.XMouseInfoPeer.fillPointWithCoords:32
        java.awt.MouseInfo.getPointerInfo:66
        java.awt.Container$1.run:2433
        java.security.AccessController.doPrivileged:-2
        java.awt.Container.getMousePosition:2430
        org.netbeans.modules.debugger.jpda.ui.debugging.ClickableIcon.changeThread:115

From debugger we call Container.getMousePosition() method. This method has blocked AWT. I do not see how we could
influence this.
If we have steps to reproduce, we could investigate more...
Comment 5 Martin Entlicher 2008-10-22 13:27:27 UTC
Submitted a defect for JDK 6762411.
Comment 6 Martin Entlicher 2008-10-22 18:09:53 UTC
I've submitted a bug for JDK, but we need real thread dump (taken via CTRL-\) with info about AWT locks.
Please provide that thread dump when this occurs again. I do not think it will be fixed without that.

Also, if you can provide steps to reproduce, that would be great.
Thanks.
Comment 7 Unknown 2008-10-22 18:20:36 UTC
Since NetBeans locked my keyboard and mouse inputs, I had to ssh to my 
session from another pc in order to kill NetBeans which was running in a 
console.  Meaning I couldn't dump the thread (I've dumped many in the 
past).  I can only provide the information NetBeans allows me to provide.
Comment 8 Martin Entlicher 2008-10-22 18:26:29 UTC
Aha, in such case it's very likely a duplicate of issue #93076.
Do you know what were you debugging when the lock occurred? Was it a pop-up menu or a combo-box?
Comment 9 Martin Entlicher 2008-10-22 18:34:14 UTC
BTW: Even when you can not access the GUI or console, you can create full thread dump via jps and jstack <pid>.
Comment 10 Unknown 2008-10-22 18:34:45 UTC
No, it's not a duplicate of #93076.
As I recall I had no break points set in the debugger at a point when combo boxes or menus were invoked.
I learned that one the hard way.
Comment 11 Martin Entlicher 2008-10-22 18:46:45 UTC
O.K., therefore the lock that locked your X-windows is likely in NetBeans' JDK and not the debuggee. The block of AWT at
sun.awt.SunToolkit.awtLock:245 seems to be causing this.

If it happens again, please provide full thread dump taken via jstack. (CTRL-ALT-F1 should bring you to a text console -
no need to ssh in from a different PC. ALT-F7 will bring you back from the text console to the GUI)
Thank you.
Comment 12 Quality Engineering 2010-04-29 09:44:43 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.