Deadlock with log4j

Solution Verified - Updated -

Issue

  • An application experiences deadlock during a logging operation. We are using a custom Appender (JDBC Appender), and it is involved in the deadlock.

See two thread dumps below:

  • Dump 1:
"EJB-Timer-2[target=jboss.j2ee:service=EJB3,jar=ebet-tipex-adapter.jar,name=TipexImporter]":  
        at java.lang.Throwable.printStackTrace(Throwable.java:461)  
        - waiting to lock <0x00007f53ecb6ed38> (a org.jboss.logging.util.LoggerStream)  
        at org.jboss.util.NestedSQLException.printStackTrace(NestedSQLException.java:137)  
        at org.jboss.util.NestedSQLException.printStackTrace(NestedSQLException.java:160)  
        at de.aaa.jboss.log4j.JDBCAppender.append(JDBCAppender.java:125)
  • Dump 2:
"EntityStoreManager watchdog timer":  
        at java.lang.Throwable.printStackTrace(Throwable.java:461)  
        - waiting to lock <0x00007fb471ade298> (a org.jboss.logging.util.LoggerStream)  
        at java.lang.Throwable.printStackTrace(Throwable.java:451)  
        at de.aaa.jboss.log4j.JDBCAppender.append(JDBCAppender.java:125)

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 4.3

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content