Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 10C849793 for ; Thu, 5 Apr 2012 07:32:16 +0000 (UTC) Received: (qmail 89011 invoked by uid 500); 5 Apr 2012 07:32:13 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 87619 invoked by uid 500); 5 Apr 2012 07:32:07 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 87602 invoked by uid 99); 5 Apr 2012 07:32:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Apr 2012 07:32:06 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of oferi@checkpoint.com designates 194.29.34.68 as permitted sender) Received: from [194.29.34.68] (HELO michael.checkpoint.com) (194.29.34.68) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Apr 2012 07:31:55 +0000 Received: from il-ex01.ad.checkpoint.com (il-ex01.ad.checkpoint.com [194.29.34.26]) by michael.checkpoint.com (8.13.8/8.13.8) with ESMTP id q357VXp0018730 for ; Thu, 5 Apr 2012 10:31:34 +0300 X-CheckPoint: {4F7D57F1-4-1B221DC2-5FFFF} Received: from il-ex03.ad.checkpoint.com (194.29.34.71) by il-ex01.ad.checkpoint.com (194.29.34.26) with Microsoft SMTP Server (TLS) id 8.3.213.0; Thu, 5 Apr 2012 10:31:33 +0300 Received: from il-ex01.ad.checkpoint.com ([126.0.0.2]) by il-ex03.ad.checkpoint.com ([194.29.34.71]) with mapi; Thu, 5 Apr 2012 10:31:33 +0300 From: Ofer Israeli To: Tomcat Users List Date: Thu, 5 Apr 2012 10:31:31 +0300 Subject: RE: Bug in Tomcat AJP Connector? Thread-Topic: Bug in Tomcat AJP Connector? Thread-Index: Ac0ShpqUxaPBmRK+TNGu5OyPC+ytdgAdyjUg Message-ID: <217DDBC2BB1E394CA9E7446337CBDEF20102DEDB4FA0@il-ex01.ad.checkpoint.com> References: <217DDBC2BB1E394CA9E7446337CBDEF20102DEDB4F4A@il-ex01.ad.checkpoint.com> <4F7C81BB.1040804@apache.org> In-Reply-To: <4F7C81BB.1040804@apache.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US x-kse-antivirus-interceptor-info: scan successful x-kse-antivirus-info: Clean Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: protection disabled Mark Thomas wrote: > On 04/04/2012 17:02, Ofer Israeli wrote: >> Hi all, >>=20 >> We have recently witnessed a strange situation. Our Tomcat (6.0.35) >> listens on 2 ports: 8080 and 8009, handling HTTP and AJP >> respectively. At some point in time we found that Apache is replying >> HTTP 503s to all clients and a look at netstat showed that indeed >> Apache could not communicate with Tomcat - there were many >> connections in state SYN_SENT, that were never replied. A test of >> attempting to connect to Tomcat's 8009 port turned out to give the >> same result, so the issue was obviously in Tomcat and not Apache. >> But netstat also showed that Tomcat was listening on port 8009. >> After digging into the logs, we found that there was an Out of Memory >> exception in the JK's accept() sequence and once this exception was >> caught there was a message of "terminating thread". >>=20 >> So although the exception is caught and handled by killing the thread >> (isn't that a little drastic?), the socket isn't closed beforehand >> and thus the OS thinks that the port is still fine (in LISTENING >> state), as although the thread is dead, the process is alive. Has >> anyone encountered this or knows if this bug is known? >=20 > Once you have an OOME all bets are off. The JVM needs to be restarted. > There is no guarantee of reliable operation after an OOME. >=20 > Mark Hi Mark, I agree that there in such a situation the JVM should be restarted, but it = isn't restarted by Tomcat. On the other hand, Tomcat does take some precau= tious actions and kills the accepting thread, but in such a case it should = also close the socket that thread is listening on otherwise it is leaving g= arbage around after the thread's death. Do you see any reason as not to close the listening socket? Ofer= --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org