users@grizzly.java.net

Re: do select spin on linux

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Thu, 09 Apr 2009 13:02:55 -0400

Salut,

John Franey wrote:
> Hi,
>
> I'm running stress tests on linux. At some point, cpu utilization goes
> high. I've verified using the debugger that Controller.doSelect gets
> zero keys back from handler's select.

Yes this is an issue I've reported awhile ago to the JDK team. This
sounds like bugparade 6403933

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6403933

A connection is reset causes the file descriptor to be selected with
events POLLHUP and POLLERR but unless there is data waiting to be read
then channel will not be selected. It's a awkward problem.

This has been fixed in JDK 7 build 50 and will be included in JDK 6u16.


>
> Google search led me to this page at apache mina jira DIRMINA-678
> <https://issues.apache.org/jira/browse/DIRMINA-678>.
>
> Please see especially, this comment from Emannual Lecharmy (31/Mar/09
> 03:23 PM)
> <https://issues.apache.org/jira/browse/DIRMINA-678?focusedCommentId=12696711&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_12696711>.
>
> So, I'm looking for this 'beautiful hack' in the Controller source code
> for 1.9.11 and am not seeing it. I think maybe I'm blind :) or the hack
> is in grizzly 2.0? If its in 2.0, do you think I can make it fit into
> 1.9.11? Or do you advise I try my application on 2.0 trunk?

I didn't put the hack there (just for Comet) as I never saw it on the
Controller. Can you share a test case?

Thanks

-- Jeanfrancois


>
> Thanks,
> John
>
>
>