tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 53186] New: JIoEndpoint LimitLatch will leak if setsockopt is called on a closed socket on Solaris
Date Thu, 03 May 2012 17:50:43 GMT

          Priority: P2
            Bug ID: 53186
           Summary: JIoEndpoint LimitLatch will leak if setsockopt is
                    called on a closed socket on Solaris
          Severity: normal
    Classification: Unclassified
                OS: Solaris
          Hardware: Sun
            Status: NEW
           Version: 7.0.20
         Component: Connectors
           Product: Tomcat 7

Overview Description: uses a
org.apache.tomcat.util.threads.LimitLatch to limit the amount of connections to
whatever was set using the maxConnections property of the connector.

In the implementation this is
incremented as part of the main Acceptor run method (JIoEndpoint:204) but only
decremented during a specific case of

If for any reason line 310 does not execute then, over time, the limitlatch
will steadily increment with no possibility of decrementing. Until the limit is
reached and no more connections can be serviced.

In my particular case the problem occurs when the setSocketOptions method is
called (JIoEndpoint:221) and the native implementation of PlainSocketImpl
causes an error due to the socket being closed (as described in the comment on
line 942 of

Steps to Reproduce: 

Can't reproduce in isolation (due to unknown root cause creating initial error
in native code). Reproducible under load in Performance and Production

Reading the code shows a number of possible reasons why this COULD happen.

Actual Results: 

The container stops responding to requests. 

The process continues to run and scheduled tasks etc will continue occuring and
logging. Can't even telnet to the port (as the Acceptor thread is blocked by
the LimitLatch).

Additional Builds and Platforms:

 - Occurs On

 - Doesn't Occur On
        Linux (although I would expect any other intermittent exception in
JIoEndpointsetSocketOptions or JIoEndpoint$ to produce the
same result on any platform)

You are receiving this mail because:
You are the assignee for the bug.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message