[Design the new POJO MicroContainer] - Deadlock in DelegateUnitTestCase
by scott.stark@jboss.org
While doing an install of the mc I saw the install fail in the following unit test due to the deadlock shown in the thread dump:
| 11824 DEBUG [DelegateUnitTestCase] Got class: class org.jboss.test.classloader.delegate.support.a.TestAbstractFactory{cl=BaseClassLoader@670fe2b9 codeSource=(file:/home/svn/JBossMC/jbossmc/classloader/target/tests-classes/ <no signer certificates>)} for org.jboss.test.classloader.delegate.support.a.TestAbstractFactory from BaseClassLoader@670fe2b9
|
| Full thread dump Java HotSpot(TM) 64-Bit Server VM (1.5.0_11-b03 mixed mode):
|
| "B" prio=1 tid=0x0000002ae35e1fa0 nid=0x536c waiting for monitor entry [0x0000000041563000..0x0000000041565c30]
| at org.jboss.classloader.spi.base.BaseClassLoader.unlock(BaseClassLoader.java:701)
| - waiting to lock <0x0000002acaf81e50> (a org.jboss.classloader.spi.base.BaseClassLoader)
| at org.jboss.classloader.spi.base.BaseClassLoader.unlock(BaseClassLoader.java:583)
| at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:286)
| at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:145)
| at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:193)
| at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:752)
| at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:483)
| at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:158)
| - locked <0x0000002acaf88c70> (a org.jboss.classloader.spi.base.BaseClassLoader)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
| - locked <0x0000002acaf88c70> (a org.jboss.classloader.spi.base.BaseClassLoader)
| at java.lang.ClassLoader.defineClass1(Native Method)
| at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
| at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:58)
| at org.jboss.classloader.spi.base.BaseClassLoader$1.run(BaseClassLoader.java:279)
| at org.jboss.classloader.spi.base.BaseClassLoader$1.run(BaseClassLoader.java:246)
| at java.security.AccessController.doPrivileged(Native Method)
| at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:244)
| - locked <0x0000002acaf88c70> (a org.jboss.classloader.spi.base.BaseClassLoader)
| at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:217)
| at org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:75)
| at org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:90)
| at org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:449)
| at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:251)
| at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:145)
| at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:193)
| at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:752)
| at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:483)
| at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:158)
| - locked <0x0000002acaf88c70> (a org.jboss.classloader.spi.base.BaseClassLoader)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| at org.jboss.test.classloader.AbstractClassLoaderTest.assertLoadClass(AbstractClassLoaderTest.java:176)
| at org.jboss.test.classloader.AbstractClassLoaderTest.assertLoadClass(AbstractClassLoaderTest.java:158)
| at org.jboss.test.classloader.AbstractClassLoaderTest.assertLoadClass(AbstractClassLoaderTest.java:143)
| at org.jboss.test.classloader.delegate.test.DelegateUnitTestCase.access$100(DelegateUnitTestCase.java:54)
| at org.jboss.test.classloader.delegate.test.DelegateUnitTestCase$2.run(DelegateUnitTestCase.java:299)
|
| "A" prio=1 tid=0x0000002ae31e7220 nid=0x536b in Object.wait() [0x0000000040f5e000..0x0000000040f5fdb0]
| at java.lang.Object.wait(Native Method)
| - waiting on <0x0000002acb05a558> (a java.util.Collections$SynchronizedList)
| at java.lang.Object.wait(Object.java:474)
| at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:204)
| - locked <0x0000002acb05a558> (a java.util.Collections$SynchronizedList)
| at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:145)
| at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:193)
| at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:752)
| at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:483)
| at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:158)
| - locked <0x0000002acaf81e50> (a org.jboss.classloader.spi.base.BaseClassLoader)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
| - locked <0x0000002acaf81e50> (a org.jboss.classloader.spi.base.BaseClassLoader)
| at java.lang.Class.getDeclaredMethods0(Native Method)
| at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
| at java.lang.Class.getMethod0(Class.java:2642)
| at java.lang.Class.getMethod(Class.java:1579)
| at org.jboss.test.classloader.delegate.test.DelegateUnitTestCase$1.run(DelegateUnitTestCase.java:277)
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4081109#4081109
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4081109
17 years, 1 month
[Design of AOP on JBoss (Aspects/JBoss)] - Re: AOP asintegration WITHOUT the integration :-)
by adrian@jboss.org
"adrian(a)jboss.org" wrote :
| i.e. if:
| -loaderA exports org.acme, and also has the private org.private package (which contains the class Something)
| -loaderB imports loaderA (see my question at the end, I'm not 100% sure how this works), and does not redefine org.acme or org.private classes
|
| Then as I understand it, we can do
| loaderB.loadClass("org.acme.Blah")
| while this will return nothing
| loaderB.loadClass("org.private.Something")
|
| Will this still hold?
| loaderB.getResource("org/acme/Blah.class") //valid
| loaderB.getResource("org/private/Something.class) //nothing
|
| If this is the case, then we are probably good, unless you think it is a bad idea to depend on this?
|
Its not necessarily true (there's seperate filters for resources and classes)
but I don't see why you would implement something that did it differently?
The seperate filters is more so you can do things optimized to the different
syntaxes.
anonymous wrote :
| One further question regarding importAll and delegates... Does importAll=true imply that every other classloader in the domain is a delegate. If importAll is false, will we only look in the delegates we have explicitly declared?
Effectively yes. But importAll isn't implemented that way. It would be too
much of a pain to update all the other classloaders every time a classloader appears or
disappears. :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4081031#4081031
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4081031
17 years, 1 month
[Design the new POJO MicroContainer] - Re: Adding ManagedObjectCreator support to AbstractSimpleRea
by scott.stark@jboss.org
"adrian(a)jboss.org" wrote :
| You can't do that. Its perfectly possible that the AbstractRealDeployer
| is dealing with a transient attachment that is not intended for the management layer.
|
| In fact, thinking about it. We shouldn't be encouraging the real deployers to do
| the managed objects anyway. That should really be done in the parsing deployers.
| I would be in favour of making the parsing deployers require Serializable attachments
| which would mean the AppParsing deployer would currently fail to compile. ;-)
|
that is true and will show up when we try to do management in a profile service setup without the real deployers. The first parsing deployer AbstractParsingDeployerWithOutput. The buildManagedObject could control whether the managed object is created and the Serializable cast could be implicit rather than explicit. In the future we may want to relax the Serializable since jboss serialization does not need it.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4081028#4081028
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4081028
17 years, 1 month