DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=40418>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40418 Summary: APR connector deadlock Product: Tomcat 5 Version: 5.5.17 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Connector:HTTP AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] Under high ssl load (SPECweb2005 Banking application) the acceptor thread stops accepting new connections. The acceptor blocks in getWorkerThread() because there isn't Worker threads available and maxThreads has been reached. The problem is that all Worker threads are blocked waiting for a socket to process, but this socket is never assigned because there is a leak in the Acceptor thread code. I can attach the stacktrace of the relevant threads if necessary. Regards, - Vicenç This modification remove the leak of Worker threads. Index: connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java =================================================================== --- connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java (revision 130) +++ connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java (working copy) @@ -980,6 +980,7 @@ */ public void run() { + Worker workerThread = null; // Loop until we receive a shutdown command while (running) { @@ -994,12 +995,15 @@ try { // Allocate a new worker thread - Worker workerThread = getWorkerThread(); + if (workerThread == null) + workerThread = getWorkerThread(); + // Accept the next incoming connection from the server socket long socket = Socket.accept(serverSock); // Hand this socket off to an appropriate processor if (setSocketOptions(socket)) { workerThread.assign(socket); + if(socket != 0) workerThread = null; } else { // Close socket and pool right away Socket.destroy(socket); -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]