tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeanfrancois Arcand <jfarc...@apache.org>
Subject Re: NIOSelector busy wait
Date Fri, 01 Jun 2007 19:01:26 GMT
Hi,

Sebastiaan van Erk wrote:
> 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.

I'm the submitter of that bug :-) Yes it will backported to 1.6.0_03.

-- Jeanfrancois

> 
>> 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
> 

---------------------------------------------------------------------
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


Mime
View raw message