]
Kabir Khan commented on JBAOP-501:
----------------------------------
I cannot get a thread dump on cygwin
If I create a thread dump using ant on dos, I get the expected output APART from Thread-1
and Thread-2, so I don't see the problem
Here is my command-line to do this directly on DOS:
C:\cygwin\home\Kabir\sourcecontrol\jboss-aop\aop>java
-javaagent:C:\cygwin\home\Kabir\sourcecontrol\jboss-aop\aop\output\lib\jboss-aop-jdk50.jar
-Djboss.aop.path=C:\cygwin\home\Kabir\sourcecontrol\jboss-aop\aop\src\resources\test\rebuildingchain\jboss-aop.xml
-classpath
..\tools\lib\ant.jar;..\thirdparty\apache-log4j\lib\log4j.jar;..\thirdparty\javassist\lib\javassist.jar;..\thirdparty\jboss\profiler\jvmti\lib\jboss-profiler-jvmti.jar;..\thirdparty\jboss\common-core\lib\jboss-common-core.jar;..\thirdparty\jboss\common-logging-log4j\lib\jboss-logging-log4j.jar;..\thirdparty\jboss\common-logging-jdk\lib\jboss-logging-jdk.jar;..\thirdparty\jboss\common-logging-spi\lib\jboss-logging-spi.jar;..\thirdparty\jboss\microcontainer\lib\jboss-aop-mc-int.jar;..\thirdparty\jboss\microcontainer\lib\jboss-classloader.jar;..\thirdparty\jboss\microcontainer\lib\jboss-container.jar;..\thirdparty\jboss\microcontainer\lib\jboss-container-metadata.jar;..\thirdparty\jboss\microcontainer\lib\jboss-container-metadata-spi.jar;..\thirdparty\jboss\microcontainer\lib\jboss-dependency.jar;..\thirdparty\jboss\microcontainer\lib\jboss-deployers-core.jar;..\thirdparty\jboss\microcontainer\lib\jboss-deployers-core-spi.jar;..\thirdparty\jboss\microcontainer\lib\jboss-deployers-client.jar;..\thirdparty\jboss\microcontainer\lib\jboss-deployers-client-spi.jar;..\thirdparty\jboss\microcontainer\lib\jboss-deployers-impl.jar;..\thirdparty\jboss\microcontainer\lib\jboss-deployers-spi.jar;..\thirdparty\jboss\microcontainer\lib\jboss-deployers-structure-spi.jar;..\thirdparty\jboss\microcontainer\lib\jboss-deployers-vfs.jar;..\thirdparty\jboss\microcontainer\lib\jboss-deployers-vfs-spi.jar;..\thirdparty\jboss\microcontainer\lib\jboss-managed.jar;..\thirdparty\jboss\microcontainer\lib\jboss-metatype.jar;..\thirdparty\jboss\microcontainer\lib\jboss-kernel.jar;..\thirdparty\jboss\test\lib\jboss-test.jar;..\thirdparty\junit\lib\junit.jar;..\thirdparty\qdox\lib\qdox.jar;..\thirdparty\trove\lib\trove.jar;..\thirdparty\xdoclet\lib\xdoclet-ejb-module.jar;..\thirdparty\xdoclet\lib\xdoclet-hibernate-module.jar;..\thirdparty\xdoclet\lib\xdoclet-java-module.jar;..\thirdparty\xdoclet\lib\xdoclet-jboss-module.jar;..\thirdparty\xdoclet\lib\xdoclet-jmx-module.jar;..\thirdparty\xdoclet\lib\xdoclet-portlet-module.jar;..\thirdparty\xdoclet\lib\xdoclet-web-module.jar;..\thirdparty\xdoclet\lib\xdoclet-xdoclet-module.jar;..\thirdparty\xdoclet\lib\xjavadoc.jar;..\thirdparty\xdoclet\lib\xdoclet.jar;..\aop\output\lib\jboss-aop-jdk50.jar;..\aop\output\tests.classes;..\tools\lib\junit.jar;..\tools\lib\ant-launcher.jar;..\tools\lib\ant-junit.jar
org.jboss.test.aop.rebuildingchain.RebuildingChainTestCase
When running directly on DOS I often get the following error:
Deadlock involving exclusively AspectManager and ClassLoader locks
------------------------------------------------------------------
Key: JBAOP-501
URL:
http://jira.jboss.com/jira/browse/JBAOP-501
Project: JBoss AOP
Issue Type: Sub-task
Security Level: Public(Everyone can see)
Affects Versions: 2.0.0.CR2
Reporter: Flavia Rainone
Fix For: 2.0.0.GA
Attachments: aop_deadlock.txt
This deadlock involves only the AspectManager and the class loader locks. The scenario,
result of a rebuildingchain test execution, follows:
-Thread 0 (org.jboss.test.aop.rebuldingchain.SyncThread)
When this thread calls the joinpoint SyncThread.checkStatus, its wrapper is executed.
This wrapper needs to generate the Joinpoint class to perform the interception and, for
that, it has to acquire the read lock for InterceptorChain. This thread starts waiting
for Thread1 to release the interceptor chain write lock.
- Thread 1 (org.jboss.test.aop.rebuildingchain.RebuildThread)
This thread adds a binding to AspectManager. As part of the addBinding method
execution, the AspectManager lock is acquired. As soon as the binding is addded to the
bindings collection, the affected advisors have to rebuild their interceptor chains.
SyncThread advisor is the affected advisor in this scenario and, to rebuild chains, it
needs the write lock for the SyncThread.checkStatus inteceptor chain. This lock is
acquired and the rebuild chain algorithm starts being executed. During the finalization of
fhe chains, interceptors are created. For that, the interceptor class needs to be loaded,
so this thread starts waiting for the class loader lock, held by Main Thread.
- Main Thread
Test tries to finish execution (without joining the other threads) and, for that, it
starts loading a class, acquiring the class loader lock. The class loading proccess
triggers AOPTransformer, that tries to transform the loaded class. For that, the
AspectManager lock, held by Thread1, is required, so thist thread starts waiting for that
lock.
Notice that the deadlock involves only Thread1 and MainThread (Thread0 is present only
for completion).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: