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 161146 - deadlock while activating java EE
Summary: deadlock while activating java EE
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 6.x
Hardware: Sun All
: P2 blocker (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-25 15:00 UTC by Jindrich Sedek
Modified: 2009-04-24 14:35 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
thread dump (24.08 KB, text/plain)
2009-03-25 15:00 UTC, Jindrich Sedek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jindrich Sedek 2009-03-25 15:00:02 UTC
Create new maven web application -> IDE hangs 
in thread dump it seems that glassfish inicialization is the root of problem - see attached thread dump
Comment 1 Jindrich Sedek 2009-03-25 15:00:41 UTC
Created attachment 78829 [details]
thread dump
Comment 2 Vince Kraemer 2009-03-29 23:08:19 UTC
The thread with GF code is blocked and doesn't appear to be holding any locks that would contribute to a problem in the
AWT thread...

I am puzzled by three threads that are waiting and locking on 0xafeba5d0...  "Default RequestProcessor", "Find Modules"
and "AWT-EventQueue-1"...

There may be a conflict between j2eeserver, ergonomics and autoupdate, though....
Comment 3 Marian Mirilovic 2009-03-30 10:56:13 UTC
OK, so reassign to ergonomics for evaluation 
Comment 4 Jaroslav Tulach 2009-03-30 17:07:31 UTC
 at org.openide.util.lookup.ProxyLookup.lookup(ProxyLookup.java:205)
 at o.n.m.j2ee.deployment.impl.Server.<init>(Server.java:117)
 at o.n.m.j2ee.deployment.impl.ServerRegistry.addPlugin(ServerRegistry.java:179)
	- locked <0xb0f3e588> (a o.n.m.j2ee.deployment.impl.ServerRegistry)

vs.

 at o.n.m.j2ee.deployment.impl.ServerRegistry.getServerInstance(ServerRegistry.java:294)
	- waiting to lock <0xb0f3e588> (a o.n.m.j2ee.deployment.impl.ServerRegistry)
 at o.n.m.j2ee.deployment.plugins.api.InstanceProperties.getInstanceProperties(InstanceProperties.java:152)
 at o.n.m.glassfish.javaee.JavaEEServerModuleFactory.createModule(JavaEEServerModuleFactory.java:107)
 at o.n.m.glassfish.common.GlassfishInstance.updateModuleSupport(GlassfishInstance.java:157)
 at o.n.m.glassfish.common.GlassfishInstance.<init>(GlassfishInstance.java:125)
 at o.n.m.glassfish.common.GlassfishInstance.create(GlassfishInstance.java:196)
 at o.n.m.glassfish.common.GlassfishInstanceProvider.registerDefaultInstance(GlassfishInstanceProvider.java:585)
 at o.n.m.glassfish.common.GlassfishInstanceProvider.<init>(GlassfishInstanceProvider.java:171)
 at o.n.m.glassfish.common.GlassfishInstanceProvider.getPrelude(GlassfishInstanceProvider.java:118)
 at o.n.m.glassfish.common.wizards.GlassfishWizardProvider.createPrelude(GlassfishWizardProvider.java:56)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

What can we do about that?
Comment 5 Jaroslav Tulach 2009-03-30 17:10:04 UTC
Can we delay following code in GlassfishInstanceProvider:

        try {
            registerDefaultInstance();
            loadServerInstances();
        } catch(RuntimeException ex) {
            getLogger().log(Level.INFO, null, ex);
        }

to be done lazily and not in the constructor of the provider? Will that help?
Comment 6 Petr Hejl 2009-04-01 15:30:07 UTC
I think instance should not be loaded directly when creating the provider. Is there a reason for that? Vince can you fix
it - load instances lazily? Imo it would also solve issue 160579.
Comment 7 Vince Kraemer 2009-04-01 16:29:44 UTC
what do you mean by lazily?
Comment 8 Petr Hejl 2009-04-01 16:50:23 UTC
There is a typo in previous post - (server) instances should be loaded lazily.

I mean when they are really needed - on the first call to getInstances(), not when the provider is instantiated.
Comment 9 Vince Kraemer 2009-04-06 21:19:51 UTC
likely fixed by http://hg.netbeans.org/web-main/rev/55b6b94e9165
Comment 10 Vince Kraemer 2009-04-07 20:30:59 UTC
http://hg.netbeans.org/main-golden/rev/55b6b94e9165
Comment 11 Jindrich Sedek 2009-04-24 14:35:17 UTC
v.
NetBeans IDE Dev (Build web-main-465-on-090424)