title: Thread BLOCKED on org.apache.log4j.Category.callAppenders, but not waiting for any lock
body: <p>My web application(delpoyed on weblogic) went down, when I check the jstack info, I found most threads are BLOCKED on a org.apache.log4j.spi.RootLogger. The thread owning this lock is also BLOCKED and stucked for at least 20min until i kill the process, but it's not waiting on any other lock, how does this happen?</p>
  
  <p>here is the jstack info:</p>
  
  <p>the BLOCKED thread owning lock &lt;783b8910>, but not waiting on other locks:</p>
  
  <pre><code>"[STUCK] ExecuteThread: '58' for queue: 'weblogic.kernel.Default (self-tuning)'" daemon prio=7 tid=02e45400 nid=86 lwp_id=7959740 waiting for monitor entry [61cff000]
  java.lang.Thread.State: BLOCKED (on object monitor)
  at org.apache.log4j.Category.callAppenders(Category.java:201)
  - locked &lt;783b8910&gt; (a org.apache.log4j.spi.RootLogger)
  at org.apache.log4j.Category.forcedLog(Category.java:388)
  at org.apache.log4j.Category.error(Category.java:302)
  </code></pre>
  
  <p>other threads waiting to lock &lt;783b8910>:</p>
  
  <pre><code>"[STUCK] ExecuteThread: '36' for queue: 'weblogic.kernel.Default (self-tuning)'" daemon prio=7 tid=02e0ea00 nid=64 lwp_id=7959717 waiting for monitor entry [62d7f000]
  java.lang.Thread.State: BLOCKED (on object monitor)
  at org.apache.log4j.Category.callAppenders(Category.java:201)
  - waiting to lock &lt;783b8910&gt; (a org.apache.log4j.spi.RootLogger)
  at org.apache.log4j.Category.forcedLog(Category.java:388)
  at org.apache.log4j.Category.error(Category.java:319)
  </code></pre>
  
  <p>and</p>
  
  <pre><code>"[STUCK] ExecuteThread: '34' for queue: 'weblogic.kernel.Default (self-tuning)'" daemon prio=7 tid=02e0a200 nid=62 lwp_id=7959715 waiting for monitor entry [62eff000]
  java.lang.Thread.State: BLOCKED (on object monitor)
  at org.apache.log4j.Category.callAppenders(Category.java:201)
  - waiting to lock &lt;783b8910&gt; (a org.apache.log4j.spi.RootLogger)
  at org.apache.log4j.Category.forcedLog(Category.java:388)
  at org.apache.log4j.Category.info(Category.java:663)
  </code></pre>
  
  <p>and so on, total 64 threads are waiting to lock &lt;783b8910></p>
  
  <p>this happens about 1-3 times a month, I cannot find a solution because I don't know why the thread owning the lock is BLOCKED while not waiting for other locks.</p>
  
  <p>the log4j version is 1.2.13</p>