SelectorProvider.openSelector() will sometimes fail on Windows
--------------------------------------------------------------
Key: JRUBY-5076
URL: http://jira.codehaus.org/browse/JRUBY-5076
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.5.2
Reporter: Ola Bini
Assignee: Ola Bini
On Windows, a call to openSelector() on SelectorProvider can sometimes (very
seldom - depending on resources on the machine) throw an IOException that says
"Unable to establish loopback connection" and with a root cause exception being
a BindException saying "Address already in use : connect()".
The current code doesn't exhibit this behavior. You will only see it if you
apply the patch Charles created for JRUBY-5051 that solves the NPE. This NPE
was triggered by this bug, but the root cause was hidden since the NPE happened
in the finally block.
The reason for this behavior seem to be that at least some implementations of
Java on Windows actually randomly chooses a port to open a loopback connection
for selection on. Sometimes it seems that this choice is bad, and Java chokes.
Since we don't have any reports on anything like this on Linux, I'll assume
it's a bug in the JDK.
I'm working on a patch that builds on Charles patch and that will retry when
this specific problem happens.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email