[
https://jira.jboss.org/jira/browse/JBAOP-713?page=com.atlassian.jira.plug...
]
Flavia Rainone commented on JBAOP-713:
--------------------------------------
Another thread dump of a second scenario of deadlock suggests that we have extra locks for
what needs to be done:
Thread-2" prio=1 tid=0x8c72dfa8 nid=0x38c3 waiting for monitor entry
[0x8c969000..0x8c96c030]
at org.jboss.aop.AspectManager.translate(AspectManager.java:1048)
- waiting to lock <0xaf700088> (a org.jboss.aop.AspectManager)
at org.jboss.aop.AspectManager.transform(AspectManager.java:1010)
at org.jboss.aop.standalone.AOPTransformer.aspectTransform(AOPTransformer.java:87)
at org.jboss.aop.standalone.AOPTransformer.transform(AOPTransformer.java:75)
at sun.instrument.TransformerManager.transform(TransformerManager.java:122)
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:155)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
- locked <0xaf7012b8> (a sun.misc.Launcher$AppClassLoader)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
- locked <0xaf7012b8> (a sun.misc.Launcher$AppClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
- locked <0xaf7012b8> (a sun.misc.Launcher$AppClassLoader)
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2259)
at java.lang.Class.getField0(Class.java:2590)
at java.lang.Class.getField(Class.java:1505)
at
org.jboss.aop.instrument.JoinPointGenerator.findAdvisedField(JoinPointGenerator.java:497)
at org.jboss.aop.instrument.JoinPointGenerator.<init>(JoinPointGenerator.java:187)
at
org.jboss.aop.instrument.ConstructorJoinPointGenerator.<init>(ConstructorJoinPointGenerator.java:75)
at
org.jboss.aop.GeneratedClassAdvisor$ClassAdvisorStrategy.getJoinPointGenerator(GeneratedClassAdvisor.java:1364)
at
org.jboss.aop.GeneratedClassAdvisor$ClassAdvisorStrategy.finalizeConstructorChain(GeneratedClassAdvisor.java:1564)
at org.jboss.aop.GeneratedClassAdvisor.finalizeChains(GeneratedClassAdvisor.java:580)
at org.jboss.aop.ClassAdvisor.createInterceptorChains(ClassAdvisor.java:607)
at org.jboss.aop.GeneratedClassAdvisor.access$201(GeneratedClassAdvisor.java:65)
at
org.jboss.aop.GeneratedClassAdvisor$ClassAdvisorStrategy.createInterceptorChains(GeneratedClassAdvisor.java:1305)
at
org.jboss.aop.GeneratedClassAdvisor.createInterceptorChains(GeneratedClassAdvisor.java:407)
at org.jboss.aop.ClassAdvisor$1.run(ClassAdvisor.java:304)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.aop.ClassAdvisor.attachClass(ClassAdvisor.java:274)
- locked <0xae219188> (a
org.jboss.test.aop.rebuildingchain.ConstructorExecutionSyncThread$Pojo$ConstructorExecutionSyncThread$PojoAdvisor)
at org.jboss.aop.AspectManager.initialiseClassAdvisor(AspectManager.java:743)
- locked <0xae21a9c8> (a java.util.WeakHashMap)
- locked <0xae21a918> (a org.jboss.aop.GeneratedAdvisorDomain)
at
org.jboss.aop.GeneratedClassAdvisor$ClassAdvisorStrategy.initialise(GeneratedClassAdvisor.java:1293)
at org.jboss.aop.GeneratedClassAdvisor.initialise(GeneratedClassAdvisor.java:143)
at
org.jboss.test.aop.rebuildingchain.ConstructorExecutionSyncThread$Pojo$ConstructorExecutionSyncThread$PojoAdvisor.initialise(ConstructorExecutionSyncThread$Pojo$ConstructorExecutionSyncThread$PojoAdvisor.java)
at
org.jboss.test.aop.rebuildingchain.ConstructorExecutionSyncThread$Pojo$ConstructorExecutionSyncThread$PojoAdvisor.<init>(ConstructorExecutionSyncThread$Pojo$ConstructorExecutionSyncThread$PojoAdvisor.java)
at
org.jboss.test.aop.rebuildingchain.ConstructorExecutionSyncThread$Pojo.<clinit>(ConstructorExecutionSyncThread.java)
at
org.jboss.test.aop.rebuildingchain.ConstructorExecutionSyncThread.invokeJoinPoint(ConstructorExecutionSyncThread.java:36)
at org.jboss.test.aop.rebuildingchain.SyncThread.run(SyncThread.java:44)
"Thread-3" prio=1 tid=0x8c714b20 nid=0x38c2 waiting on condition
[0x8c8ea000..0x8c8eafb0]
at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:681)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:711)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1041)
at
java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync.wlock(ReentrantReadWriteLock.java:342)
at
java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock(ReentrantReadWriteLock.java:637)
at org.jboss.aop.util.AOPLock.lockWrite(AOPLock.java:59)
at org.jboss.aop.AspectManager.addBinding(AspectManager.java:1464)
- locked <0xaf700088> (a org.jboss.aop.AspectManager)
at org.jboss.test.aop.rebuildingchain.RebuildThread.linkNewAdvice(RebuildThread.java:84)
at org.jboss.test.aop.rebuildingchain.RebuildThread.run(RebuildThread.java:53)
"ReaderThread" prio=1 tid=0x8ca60228 nid=0x38bf runnable
[0x8c9ec000..0x8c9ece30]
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:411)
at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:453)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)
- locked <0x91bb7a78> (a java.io.InputStreamReader)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
- locked <0x91bb7a78> (a java.io.InputStreamReader)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner$ReaderThread.run(RemoteTestRunner.java:140)
"Low Memory Detector" daemon prio=1 tid=0x0a2451e8 nid=0x38bd runnable
[0x00000000..0x00000000]
"CompilerThread1" daemon prio=1 tid=0x0a243d28 nid=0x38bc waiting on condition
[0x00000000..0x8cc91098]
"CompilerThread0" daemon prio=1 tid=0x0a1f8cd0 nid=0x38bb waiting on condition
[0x00000000..0x8cd12258]
"AdapterThread" daemon prio=1 tid=0x0a1e7f28 nid=0x38ba waiting on condition
[0x00000000..0x00000000]
"Signal Dispatcher" daemon prio=1 tid=0x0a1eb930 nid=0x38b9 waiting on condition
[0x00000000..0x00000000]
"Finalizer" daemon prio=1 tid=0x0a0c5a38 nid=0x38b7 in Object.wait()
[0x8d74b000..0x8d74c0b0]
at java.lang.Object.wait(Native Method)
- waiting on <0xaf74c2a0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
- locked <0xaf74c2a0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
"Reference Handler" daemon prio=1 tid=0x0a0c43c8 nid=0x38b6 in Object.wait()
[0x8d7cc000..0x8d7cce30]
at java.lang.Object.wait(Native Method)
- waiting on <0xaf7a6da0> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:474)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
- locked <0xaf7a6da0> (a java.lang.ref.Reference$Lock)
"main" prio=1 tid=0x0a01ed48 nid=0x38ad in Object.wait()
[0xbfc67000..0xbfc67ad8]
at java.lang.Object.wait(Native Method)
- waiting on <0xae11d068> (a
org.jboss.test.aop.rebuildingchain.ConstructorExecutionSyncThread)
at java.lang.Thread.join(Thread.java:1095)
- locked <0xae11d068> (a
org.jboss.test.aop.rebuildingchain.ConstructorExecutionSyncThread)
at java.lang.Thread.join(Thread.java:1148)
at
org.jboss.test.aop.rebuildingchain.RebuildingChainTestCase.assertRebuildingChainWithJoin(RebuildingChainTestCase.java:236)
at
org.jboss.test.aop.rebuildingchain.RebuildingChainTestCase.testConstructorExecutionWithJoin(RebuildingChainTestCase.java:115)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
"VM Thread" prio=1 tid=0x0a0c1ec8 nid=0x38b5 runnable
"GC task thread#0 (ParallelGC)" prio=1 tid=0x0a038cd8 nid=0x38b3 runnable
"GC task thread#1 (ParallelGC)" prio=1 tid=0x0a039928 nid=0x38b4 runnable
"VM Periodic Task Thread" prio=1 tid=0x0a23af10 nid=0x38be waiting on condition
Deadlock on Rebuildingchain test
--------------------------------
Key: JBAOP-713
URL:
https://jira.jboss.org/jira/browse/JBAOP-713
Project: JBoss AOP
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 2.1.0.CR2
Reporter: Flavia Rainone
Assignee: Flavia Rainone
Fix For: 2.0.2.GA
I found this deadlock when fixing JBAOP-567:
[junit] Full thread dump Java HotSpot(TM) Server VM (1.5.0_12-b04 mixed mode):
[junit]
[junit] "Thread-19" prio=1 tid=0x8c86a4a0 nid=0x22a8 waiting on condition
[0x8c9a4000..0x8c9a5130]
[junit] at sun.misc.Unsafe.park(Native Method)
[junit] at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
[junit] at
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:716)
[junit] at
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:746)
[junit] at
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1076)
[junit] at
java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync.wlock(ReentrantReadWriteLock.java:342)
[junit] at
java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock(ReentrantReadWriteLock.java:637)
[junit] at org.jboss.aop.Advisor.lockWriteChain(Advisor.java:1795)
[junit] at org.jboss.aop.ClassAdvisor.lockWriteChains(ClassAdvisor.java:706)
[junit] at
org.jboss.aop.ClassAdvisor.doRebuildInterceptorsForAddedBinding(ClassAdvisor.java:1156)
[junit] at
org.jboss.aop.ClassAdvisor$RebuildInterceptorsAction$1$2.run(ClassAdvisor.java:2297)
[junit] at java.security.AccessController.doPrivileged(Native Method)
[junit] at
org.jboss.aop.ClassAdvisor$RebuildInterceptorsAction$1.rebuildInterceptorsForAddedBinding(ClassAdvisor.java:2293)
[junit] at
org.jboss.aop.ClassAdvisor.rebuildInterceptorsForAddedBinding(ClassAdvisor.java:1143)
[junit] at
org.jboss.aop.GeneratedClassAdvisor.access$1501(GeneratedClassAdvisor.java:65)
[junit] at
org.jboss.aop.GeneratedClassAdvisor$ClassAdvisorStrategy.rebuildInterceptorsForAddedBinding(GeneratedClassAdvisor.java:1538)
[junit] at
org.jboss.aop.GeneratedClassAdvisor.rebuildInterceptorsForAddedBinding(GeneratedClassAdvisor.java:244)
[junit] at org.jboss.aop.Advisor.newBindingAdded(Advisor.java:1124)
[junit] - locked <0xadd75028> (a
org.jboss.test.aop.rebuildingchain.ConstructorExecutionSyncThread$Pojo$ConstructorExecutionSyncThread$PojoAdvisor)
[junit] at
org.jboss.aop.AspectManager.updateAdvisorsForAddedBinding(AspectManager.java:1515)
[junit] - locked <0xadd76870> (a java.util.WeakHashMap)
[junit] at
org.jboss.aop.AspectManager.updateAdvisorsForAddedBinding(AspectManager.java:1538)
[junit] - locked <0x91c3aaa0> (a java.util.WeakHashMap)
[junit] at org.jboss.aop.AspectManager.addBinding(AspectManager.java:1473)
[junit] - locked <0x91bf58d8> (a java.util.WeakHashMap)
[junit] at
org.jboss.test.aop.rebuildingchain.RebuildThread.linkNewAdvice(RebuildThread.java:84)
[junit] at
org.jboss.test.aop.rebuildingchain.RebuildThread.run(RebuildThread.java:53)
[junit]
[junit] "Low Memory Detector" daemon prio=1 tid=0x8d60dbb0 nid=0x2292
runnable [0x00000000..0x00000000]
[junit]
[junit] "CompilerThread1" daemon prio=1 tid=0x8d60c7b0 nid=0x2291 waiting
on condition [0x00000000..0x8d1fa018]
[junit]
[junit] "CompilerThread0" daemon prio=1 tid=0x8d60b810 nid=0x2290 waiting
on condition [0x00000000..0x8d27b198]
[junit]
[junit] "AdapterThread" daemon prio=1 tid=0x8d60a840 nid=0x228f waiting on
condition [0x00000000..0x00000000]
[junit]
[junit] "Signal Dispatcher" daemon prio=1 tid=0x8d609950 nid=0x228e waiting
on condition [0x00000000..0x00000000]
[junit]
[junit] "Finalizer" daemon prio=1 tid=0x8d6004b0 nid=0x228c in
Object.wait() [0x8d5fe000..0x8d5ff0b0]
[junit] at java.lang.Object.wait(Native Method)
[junit] - waiting on <0x91c21260> (a java.lang.ref.ReferenceQueue$Lock)
[junit] at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
[junit] - locked <0x91c21260> (a java.lang.ref.ReferenceQueue$Lock)
[junit] at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
[junit] at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
[junit]
[junit] "Reference Handler" daemon prio=1 tid=0x0921f1a0 nid=0x228b in
Object.wait() [0x8d79c000..0x8d79ce30]
[junit] at java.lang.Object.wait(Native Method)
[junit] - waiting on <0x91c249e0> (a java.lang.ref.Reference$Lock)
[junit] at java.lang.Object.wait(Object.java:474)
[junit] at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
[junit] - locked <0x91c249e0> (a java.lang.ref.Reference$Lock)
[junit]
[junit] "main" prio=1 tid=0x09179988 nid=0x2285 in Object.wait()
[0xbfd97000..0xbfd97d68]
[junit] at java.lang.Object.wait(Native Method)
[junit] - waiting on <0xadfc0540> (a
org.jboss.test.aop.rebuildingchain.RebuildThread)
[junit] at java.lang.Thread.join(Thread.java:1095)
[junit] - locked <0xadfc0540> (a
org.jboss.test.aop.rebuildingchain.RebuildThread)
[junit] at java.lang.Thread.join(Thread.java:1148)
[junit] at
org.jboss.test.aop.rebuildingchain.RebuildingChainTestCase.assertRebuildingChainWithJoin(RebuildingChainTestCase.java:237)
[junit] at
org.jboss.test.aop.rebuildingchain.RebuildingChainTestCase.testConstructorExecutionWithJoin(RebuildingChainTestCase.java:115)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:585)
[junit] at junit.framework.TestCase.runTest(TestCase.java:154)
[junit] at junit.framework.TestCase.runBare(TestCase.java:127)
[junit] at junit.framework.TestResult$1.protect(TestResult.java:106)
[junit] at junit.framework.TestResult.runProtected(TestResult.java:124)
[junit] at junit.framework.TestResult.run(TestResult.java:109)
[junit] at junit.framework.TestCase.run(TestCase.java:118)
[junit] at junit.framework.TestSuite.runTest(TestSuite.java:208)
[junit] at junit.framework.TestSuite.run(TestSuite.java:203)
[junit] at junit.framework.TestSuite.runTest(TestSuite.java:208)
[junit] at junit.framework.TestSuite.run(TestSuite.java:203)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766)
[junit]
[junit] "VM Thread" prio=1 tid=0x0921cc68 nid=0x228a runnable
[junit]
[junit] "GC task thread#0 (ParallelGC)" prio=1 tid=0x09193a78 nid=0x2288
runnable
[junit]
[junit] "GC task thread#1 (ParallelGC)" prio=1 tid=0x091946c8 nid=0x2289
runnable
[junit]
[junit] "VM Periodic Task Thread" prio=1 tid=0x8d60f748 nid=0x2293 waiting
on condition
[junit]
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira