Deadlock on JBoss startup

Latest response

Hi all,

I am having some issues where from time to time my JBoss 5.2 instance(s) won't fully start up.

I can see in the logs, that the JBoss instance(s) gets until the ** INFO [Version] HV000001: Hibernate Validator 4.3.1.Final ** point, and after that it just hangs and never completes. I have found so far that this happens due to deadlocks that occur while the instance(s) is starting. Running "jstack
", would show me the deadlock which i provide below. The instances are running an ATG10.2 application. I don't see any resource issues on my servers(plenty of memory, plenty of space)

Here is where the deadlock happens:

Found one Java-level deadlock:

waiting to lock monitor 0x000000004956e470 (object 0x0000000400d9e870, a java.lang.Object),
which is held by "main"
waiting for ownable synchronizer 0x00000004013f1bd8, (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync),
which is held by "Thread-12"

And here are the top line of the stack for "main" and "Thread-12":

Java stack information for the threads listed above:

at java.beans.Introspector.getBeanInfo(
- waiting to lock <0x0000000400d9e870> (a java.lang.Object)
at org.jboss.aop.advice.GenericAspectFactory.configureInstance(
at org.jboss.aop.advice.GenericAspectFactory.createPerVM(
at org.jboss.aop.AspectManager.createPerVmAspect(
- locked <0x00000006d7b9c0b0> (a org.jboss.aop.advice.AspectDefinition)
at org.jboss.aop.AspectManager.getPerVMAspect(
- locked <0x00000006d7b9c0b0> (a org.jboss.aop.advice.AspectDefinition)
at org.jboss.aop.AspectManager.getPerVMAspect(
at org.jboss.aop.advice.PerVmAdvice.generateOptimized(
- locked <0x00000003f4949dc0> (a java.lang.Class for org.jboss.aop.advice.PerVmAdvice)
at org.jboss.aop.advice.AdviceFactory.create(
at org.jboss.aop.Advisor.createInterceptorChain(
at org.jboss.aop.Advisor.pointcutResolved(
at org.jboss.aop.MethodMatchInfo.applyBinding(
at org.jboss.aop.MethodMatchInfo.simplePopulateBindings(
at org.jboss.aop.MethodMatchInfo.populateBindings(
at org.jboss.aop.Advisor.finalizeMethodChain(
at org.jboss.aop.ClassAdvisor.finalizeChains(
at org.jboss.aop.ClassAdvisor.doRebuildInterceptorsForAddedBinding(
at org.jboss.aop.ClassAdvisor$RebuildInterceptorsAction$2.rebuildInterceptorsForAddedBinding(
at org.jboss.aop.ClassAdvisor.rebuildInterceptorsForAddedBinding(
at org.jboss.aop.Advisor.newBindingAdded(
- locked <0x00000007487bcde0> (a org.jboss.aop.ClassAdvisor)
at org.jboss.aop.AspectManager.updateAdvisorsForAddedBinding(
- locked <0x00000004012d09b0> (a java.util.WeakHashMap)
at org.jboss.aop.AspectManager.addBinding(
- locked <0x00000004012d09b0> (a java.util.WeakHashMap)
at org.jboss.aop.AspectXmlLoader.deployBinding(
at org.jboss.aop.AspectXmlLoader.deployTopElements(
at org.jboss.aop.AspectXmlLoader.deployXML(
at org.jboss.aop.AspectXmlLoader.deployXML(
at org.jboss.jms.client.container.JmsClientAspectXMLLoader.deployXML(
- locked <0x00000004012d0908> (a org.jboss.aop.AspectManager)

at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000004013f1bd8> (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync)
at java.util.concurrent.locks.LockSupport.park(
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireShared(
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireShared(
at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.lock(
at org.jboss.aop.util.AOPLock.lockRead(
at org.jboss.aop.AspectManager.translate(
at org.jboss.aop.AspectManager.transform(
at org.jboss.aop.standalone.AOPTransformer.aspectTransform(
at org.jboss.aop.standalone.AOPTransformer.transform(
at sun.instrument.TransformerManager.transform(
at sun.instrument.InstrumentationImpl.transform(
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(
at java.lang.ClassLoader.defineClass(
at org.jboss.classloader.spi.base.BaseClassLoader.access$200(
at org.jboss.classloader.spi.base.BaseClassLoader$
at org.jboss.classloader.spi.base.BaseClassLoader$
at Method)
at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(
- locked <0x00000007406c4210> (a org.jboss.classloader.spi.base.BaseClassLoader)
at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(
at org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(
at org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(
at org.jboss.classloader.spi.base.ClassLoadingTask$
at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(
at org.jboss.classloader.spi.base.ClassLoaderManager.process(
at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(
at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(
at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(
at org.jboss.classloader.spi.base.BaseClassLoader.doLoadClass(
- locked <0x00000007406c4210> (a org.jboss.classloader.spi.base.BaseClassLoader)

Anyone has ran into this deadlock before? Any suggestion is highly appreciated. If you need any other information, please let me know.
If it helps to see the full stack of the two deadlocks, i can also provide that.

Thank you in advance !



What Java version is this running under. We're probably going to need to see the full thread stack and such so you may be better of raising a case against this issue. First of all take a look a the following Knowledge Base Articles to see if they provide any further assistance to you [1] and [2]


Hi Mustafa,
Thank you for your reply. I am running:

java version "1.6.0_75"
Java(TM) SE Runtime Environment (build 1.6.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 20.75-b01, mixed mode)

Runnin "/usr/sbin/alternatives --config java", i can see that the selected jdk is: /usr/lib/jvm/jre-1.6.0-sun.x86_64/bin/java

I have uploaded also the full stack of the two deadlocked threads. As I am reading the first link. As for the second link you posted, the solution it suggests does not apply in my case, as i already a running JBoss 5.2. The second link suggests to upgrade to 5.1.x

Thank you !

Hi Pierin

If you need urgent assistance with this then I'd suggest you raise a case. Otherwise I'll try and get one of our JVM engineers to take a look at your stack trace as soon as possible.


Hi Mustafa,

Please, try to see if you can get one of your engineers to take a look at the stack trace. If it becomes urgent and we still have not seen any solution in this discussion or elsewhere, then will raise a case.


Hi Mustafa
Have updated the uploaded stack trace file, as now contains the entire output of "jstack PID"

Thank you !

Thanks Pierin. Usually if an issue is complex enough to require analysis of a stack trace we would encourage you to open a support case for it. Hopefully someone will be able to assist here, but please don't hesitate to open a case if required.

Was there ever a resolution to this issue?

I believe the issue was not yet fully resolved, but Pierin may be able to suggest a workaround.

Hello Ed, David,

I eventually opened a support ticket with RedHat for this issue. One of their suggestions was to upgrade to Java 7, but currently we can't do that cause our application does not entirely support it.

We still have deadlocks appearing during the start up of the instances, but because of other tasks and projects in our portfolio, as a workaround we restart the instance(s) whenever they start up with a deadlock. We will get back to this issue with more focus when the time allows it.
So, a complete resolution has not been found yet.

Thank you for your time and interest,

Hi Ed,

I forgot to ask. Are you having a similar issue ?


Hi Pierin,

I ran into the issue working with the JON server. Different version of JBoss and I'm running Java 7, but same error. It appears to be intermittent though, as you've found.