Hi,
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
Well Ubuntu is pretty big, so I'd expect other people to have seen this
as well.
I have been able to reproduce a select busy loop in the JDK myself, by
registering for OP_CONNECT *before* calling socketChannel.connect(). In
the time between the two, the selector keeps returning 0 without
blocking. By reversing the operations the busy wait goes away.
The problem that I have now seems to be related to sockets going bad on
one side of the equation but without being closed, but I have not been
able to reproduce the exact conditions under which it happens.
I have seen bug reports on the sun developer sites/forums related to NIO
busy waiting, but no resolutions, and was hoping somebody here had
similar experiences.
Regards,
Sebastiaan
so far I haven't seen the behavior you've explained.
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]