Bug 189146 - KenaiManager deadlock hangs NetBeans
KenaiManager deadlock hangs NetBeans
Status: RESOLVED FIXED
Product: connecteddeveloper
Classification: Unclassified
Component: Kenai
6.x
PC Windows XP
: P3 (vote)
: TBD
Assigned To: Tomas Stupka
issues@connecteddeveloper
: THREAD
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-03 07:09 UTC by vieiro
Modified: 2013-07-01 10:32 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Stack trace (34.07 KB, text/plain)
2010-08-03 07:10 UTC, vieiro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vieiro 2010-08-03 07:09:15 UTC
I *think* that KenaiManager is deadlocking NetBeans.

I'm attaching a stack trace. Most thread are waiting for a lock on 0x11fefc08.

I *think* this is hold by KenaiManager:

	- locked <0x11fefc08> (a sun.misc.Launcher$AppClassLoader)

This is for:

Product Version: NetBeans IDE 6.9 (Build 201006101454)
Java: 1.6.0_13; Java HotSpot(TM) Client VM 11.3-b02
System: Windows XP version 5.1 running on x86; Cp1252; es_ES (nb)
Userdir: C:\Documents and Settings\A148999\.netbeans\6.9

Cheers,
Antonio
Comment 1 vieiro 2010-08-03 07:10:26 UTC
Created attachment 101155 [details]
Stack trace

Deadlock on 0x11fefc08
Comment 2 Jan Becicka 2010-08-03 08:14:58 UTC
Deadlock between kenai and parsing loop.
Comment 3 Jan Becicka 2010-08-03 08:33:53 UTC
Adding Jesse (class loading expert :) to cc.
Comment 4 Jesse Glick 2010-08-03 13:50:04 UTC
Why is this a P1? Is it reproducible? Looks like just bad luck, that the native libs for JNA and SunMSCAPI are being loaded simultaneously.

I think it is a bug in the JRE - lock ordering conflict between Runtime and ClassLoader. Would have to be shown to a VM engineer to really diagnose.

It could be a problem with ProviderList.loadAll unnecessarily locking ClassLoader's. In 6u18 sources, there is no apparent locking, but the line numbers match your stack trace. Does the problem occur with the latest 6u21?
Comment 5 vieiro 2010-08-03 16:54:16 UTC
I'll try to run this on 6u21 tomorrow. 

I don't now which priority I should assign to deadlocks, will any of you please lower priority as required?

Cheers,
Antonio
Comment 6 vieiro 2010-08-03 16:59:33 UTC
The problem of me marking this as P1 initially is all yours: you should build software that hangs more often. Take eclipse or IBM/RSA for example.

You can't expect giving great software to users and then asking them not to mark deadlocks as P1 priority: we NetBeans users are not used to hangs.
Comment 7 Jesse Glick 2010-08-03 17:22:22 UTC
If the IDE hangs reproducibly or fairly frequently under some conditions, that is a P1. But a deadlock that was observed once is not P1. http://wiki.netbeans.org/BugPriorityGuidelines
Comment 8 vieiro 2010-08-04 06:39:38 UTC
Changing to P4. Will try to reproduce in the coming weeks. Will close if I can't reproduce it. Thanks all.
Comment 9 Tomas Zezula 2010-08-04 06:46:24 UTC
Nothing with  parsing loop. Caused by loading class with static initializers with synchronized blocks or causing loading of other class with initializers in opposite order.
Comment 10 j.boesl 2010-09-08 14:12:56 UTC
Every now and then I get a deadlock when I start my rpc-application since I
updated to 6.9.1. Antonio Vieiro suggested I attach the stacktrace here since the issue might be connected.


Found one Java-level deadlock:
=============================
"AWT-EventQueue-1":
waiting to lock monitor 0x1d72a064 (object 0x09a60490, a
sun.misc.Launcher$AppClassLoader),
which is held by "main"
"main":
waiting to lock monitor 0x18dbd7ec (object 0x09d93620, a
org.netbeans.StandardModule$OneModuleClassLoader),
which is held by "AWT-EventQueue-1"

Java stack information for the threads listed above:
===================================================
"AWT-EventQueue-1":
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:293)
- waiting to lock <0x09a60490> (a sun.misc.Launcher$AppClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:212)
- locked <0x09d93620> (a org.netbeans.StandardModule$OneModuleClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at
org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.pingIO(FileChangedManager.java:242)

at
org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.checkRead(FileChangedManager.java:111)

at org.netbeans.TopSecurityManager.notifyRead(TopSecurityManager.java:179)
at org.netbeans.TopSecurityManager.checkRead(TopSecurityManager.java:299)
at java.io.File.lastModified(File.java:824)
at
org.openide.filesystems.LocalFileSystem.lastModified(LocalFileSystem.java:360)

at
org.openide.filesystems.LocalFileSystem$Impl.lastModified(LocalFileSystem.java:588)

at
org.openide.filesystems.AbstractFileObject.initLastModified(AbstractFileObject.java:98)

at
org.openide.filesystems.AbstractFileObject.lastModified(AbstractFileObject.java:179)

at
org.openide.filesystems.AbstractFileObject.<init>(AbstractFileObject.java:83)

at
org.openide.filesystems.AbstractFileSystem.createFileObject(AbstractFileSystem.java:450)

at
org.openide.filesystems.AbstractFileObject.createFile(AbstractFileObject.java:140)

at org.openide.filesystems.AbstractFolder.getChild(AbstractFolder.java:366)
at org.openide.filesystems.AbstractFolder.getChild(AbstractFolder.java:337)
at
org.openide.filesystems.AbstractFolder.getChildren(AbstractFolder.java:258)
- locked <0x04a18988> (a org.openide.filesystems.AbstractFileObject)
at org.openide.filesystems.MultiFileObject.list(MultiFileObject.java:458)
at
org.openide.filesystems.AbstractFolder.getNewChildren(AbstractFolder.java:897)

at
org.openide.filesystems.AbstractFolder.refreshFolder(AbstractFolder.java:758)

at org.openide.filesystems.AbstractFolder.refresh(AbstractFolder.java:939)
at org.openide.filesystems.AbstractFolder.refresh(AbstractFolder.java:721)
at
org.openide.filesystems.MultiFileObject.refresh(MultiFileObject.java:525)
- locked <0x04a19ac8> (a org.openide.filesystems.MultiFileObject)
at org.openide.filesystems.AbstractFolder.check(AbstractFolder.java:654)
at
org.openide.filesystems.AbstractFolder.getChildren(AbstractFolder.java:248)
- locked <0x04a19ac8> (a org.openide.filesystems.MultiFileObject)
at org.openide.filesystems.MultiFileObject.list(MultiFileObject.java:458)
at
org.openide.filesystems.AbstractFolder.getNewChildren(AbstractFolder.java:897)

at
org.openide.filesystems.AbstractFolder.refreshFolder(AbstractFolder.java:758)

at org.openide.filesystems.AbstractFolder.refresh(AbstractFolder.java:939)
at org.openide.filesystems.AbstractFolder.refresh(AbstractFolder.java:721)
at
org.openide.filesystems.MultiFileObject.refresh(MultiFileObject.java:525)
- locked <0x04a1bae8> (a org.openide.filesystems.MultiFileObject)
at org.openide.filesystems.AbstractFolder.check(AbstractFolder.java:654)
at
org.openide.filesystems.AbstractFolder.getChildren(AbstractFolder.java:248)
- locked <0x04a1bae8> (a org.openide.filesystems.MultiFileObject)
at
org.netbeans.core.windows.persistence.PersistenceManager.copySettingsFiles(PersistenceManager.java:1230)

at
org.netbeans.core.windows.persistence.PersistenceManager.loadWindowSystem(PersistenceManager.java:1115)

at
org.netbeans.core.windows.PersistenceHandler.load(PersistenceHandler.java:120)

at
org.netbeans.core.windows.WindowSystemImpl.load(WindowSystemImpl.java:73)
at org.netbeans.core.GuiRunLevel$2.run(GuiRunLevel.java:181)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at
org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:137)

at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
"main":
at
org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.pingIO(FileChangedManager.java:242)

at
org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.checkRead(FileChangedManager.java:111)

at org.netbeans.TopSecurityManager.notifyRead(TopSecurityManager.java:179)
at org.netbeans.TopSecurityManager.checkRead(TopSecurityManager.java:299)
at java.io.File.exists(File.java:731)
at sun.misc.URLClassPath$FileLoader.getResource(URLClassPath.java:999)
at sun.misc.URLClassPath.getResource(URLClassPath.java:169)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
- locked <0x09a60490> (a sun.misc.Launcher$AppClassLoader)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
- locked <0x09a60490> (a sun.misc.Launcher$AppClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:212)
- locked <0x09d4f7c8> (a org.netbeans.StandardModule$OneModuleClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.netbeans.core.GuiRunLevel.run(GuiRunLevel.java:117)
at org.netbeans.core.startup.Main.start(Main.java:312)
at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:114)
at java.lang.Thread.run(Thread.java:619)

Found 1 deadlock.
Comment 11 Jan Becicka 2010-09-21 08:23:32 UTC
j.boesl, this does not look like issue related to kenai. Please file separate issue. Thanks.
Comment 12 Tomas Stupka 2013-07-01 10:32:05 UTC
did not appear since 2010. There was a lot of changes in parsing, as well as some in kenai. Probably fixed already, closing for now ...


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo