2 Replies Latest reply on Mar 26, 2012 1:17 PM by Stephen Dawkins

    JBoss 7.1 occasionally stops responding to HTTP requests

    Stephen Dawkins Newbie

      Hi

       

      I've just started doing load testing on our application after porting it to JBoss 7.1, but I've run into an issue where under load one of the main JBoss web worker threads locks up.

       

      A thread dump shows this:

       

      "http-127.0.0.1-127.0.0.1-8080-EventPoller" daemon prio=6 tid=0x0000000012093800 nid=0x16b8 waiting for monitor entry [0x0000000016dbf000]
         java.lang.Thread.State: BLOCKED (on object monitor)
              at java.lang.Object.wait(Native Method)
              at org.apache.tomcat.util.net.AprEndpoint$Poller.run(AprEndpoint.java:1678)
              - locked <0x00000000d4806c08> (a org.apache.tomcat.util.net.AprEndpoint$Poller)
              at java.lang.Thread.run(Unknown Source)
      

       

      I tracked down that line of code to this loop, in AprEndpoint.java:

       

                      // Check timeouts for suspended connections if the poller is empty
                      while (connectionCount < 1 && addList.size() < 1) {
                          // Reset maintain time.
                          try {
                              if (soTimeout > 0 && running) {
                                  maintain();
                              }
                              synchronized (this) {
                                  this.wait(10000);
                              }
                          } catch (InterruptedException e) {
                              // Ignore
                          } catch (Throwable t) {
                              log.error(sm.getString("endpoint.maintain.error"), t);
                          }
                      }
      

       

      I'm not entirely sure of the problem here, but since neither connectionCount or addList.size() are volatile, it's likely that they're not being re-read, effectively turning this into an infinite loop.

       

      The only way to get JBoss out of this state is to restart it. Is this a known issue?

       

      Regards

      Stephen