Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 54691 invoked from network); 1 Jun 2007 09:03:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Jun 2007 09:03:59 -0000 Received: (qmail 60541 invoked by uid 500); 1 Jun 2007 08:54:27 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 60521 invoked by uid 500); 1 Jun 2007 08:54:27 -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 60505 invoked by uid 99); 1 Jun 2007 08:54:27 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jun 2007 01:54:27 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of sebster@sebster.com designates 213.196.5.53 as permitted sender) Received: from [213.196.5.53] (HELO mail.servoy.com) (213.196.5.53) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 01 Jun 2007 01:54:21 -0700 Received: (qmail 1988 invoked from network); 1 Jun 2007 08:53:56 -0000 Received: from unknown (HELO ?10.0.0.169?) (svanerk@81.171.14.156) by mail.servoy.com with SMTP; 1 Jun 2007 08:53:56 -0000 Message-ID: <465FDEA4.4070604@sebster.com> Date: Fri, 01 Jun 2007 10:53:56 +0200 From: Sebastiaan van Erk User-Agent: Thunderbird 1.5.0.10 (X11/20070403) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: NIOSelector busy wait References: <463A16EA.5070309@sebster.com> <463A1F1F.5060900@hanik.com> In-Reply-To: <463A1F1F.5060900@hanik.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, Filip Hanik - Dev Lists wrote: > it will return 0 after the timeout has expired if there was no events. > most likely its not a bug in the JDK but in your linux kernel/distro > I just found the Sun bug report + workaround confirming this issue as a Linux JDK bug. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6403933 It's fixed in Java 7, earlier versions are not reported to be fixed, so I'm guessing they're not backporting the fix, though I hope they do, since it's a serious problem. > so far I haven't seen the behavior you've explained. > In my Comet application I'm seeing this problem consistently: the Tomcat poller thread goes into a busy loop with the selector returning 0. Could be I'm forgetting to do something which causes this, but I haven't found a way to solve the problem yet. Regards, Sebastiaan > Filip > > Sebastiaan van Erk wrote: >> Hi, >> >> I have a problem that sometimes the NIO selector goes into a busy >> wait loop. >> >> In line 1430 the code of NIOEndpoint.java, >> >> keyCount = selector.select(selectorTimeout); >> >> select keeps returning 0 without waiting. >> >> I'm running on the latest trunk version of tomcat 6, on Ubuntu Linux >> Feisty, with java version: >> >> java version "1.6.0" >> Java(TM) SE Runtime Environment (build 1.6.0-b105) >> Java HotSpot(TM) Server VM (build 1.6.0-b105, mixed mode) >> >> However, I've seen this same behavior with other JDK's (1.5). >> >> To me it seems that it's a bug in the JVM implementation because >> select should only return 0 if it's woken up, which does not happen >> (since all other threads are suspended in my debugger). However, I >> was wondering if anybody else has seen this behavior and perhaps >> knows what's causing it in the first place. >> >> Regards, >> Sebastiaan >> >> --------------------------------------------------------------------- >> To start a new topic, e-mail: users@tomcat.apache.org >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >> For additional commands, e-mail: users-help@tomcat.apache.org >> >> >> > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org