-
-
Notifications
You must be signed in to change notification settings - Fork 922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UNIX Sockets raising Errno::ECONNRESET or EOFError ( 9.0.0.0 && 1.7.19 ) #2750
Comments
marked against 1.7.20 so we do not forget to evaluate what is wrong here before next release... |
Thanks @enebo. Short of brushing up on my JAVA is there any way I could perhaps troubleshoot this further and try to help you guys surround it? |
@digitalextremist if you could try JRuby 9.0.0.0pre1 and see if it works there it would help. Our IO subsystem was re-written and it would be good to know if we potentially have one or two problems. |
@enebo it's definitely not working with I've tested with |
For the record: you'll notice Important tidbit:
Both fail at the same call though, at different locations per version:
Both of those are failing at this line in the test: Here is the complete test: |
@enebo I think it's raising an exception near here for It's finding |
@enebo and for I'm sure it's in/after/during |
The only place where I see |
The extremely confusing thing is that we're wrapping the calls in a |
@digitalextremist This could be as simple as something we a missing in unix domain socket support causing getPartial to return nil. I am pretty sure we bypass Java and use our native callouts for uds. |
@enebo, right on. Is there a crash-test-dummy level of exposure I could get in actually attempting to modify the Java and test that on-the-fly without needing to rebuild jruby every time I modify a file? |
@enebo, @headius I've picked up a further down issue that's "cascading" into the ones I've shown, because I could see those failures. This one I had to dig to find: Entire chain for
Entire chain for
|
I've pushed revisions to jnr-enxio and jnr-unixsocket that modifies both to allow READ among the select operations for server sockets. I've also pushed a change to jruby-1_7 to update to these snapshot versions. Let me know how it goes! |
Alright! Well I built a custom jruby,
You said perhaps Thank you for giving so much of your time today. We really, really appreciate it. It was really cool to build, mount, and run my own |
Awesome! Thanks @headius. I'll check this in a bit and pin Reel 0.6.0.pre1 to the version that fixes this. What point release will that be? On March 26, 2015 4:45:38 AM PDT, Charles Oliver Nutter notifications@github.com wrote:
|
@headius I think this closed automatically but we've tested it and it didn't work, right? Can this be reopened until it does pass? |
@headius, thank you sir. |
Back on this one today... |
@headius so happy to hear that. Thank you. |
Ah-ha! I believe the remaining issue is a bug in nio4r; it uses a selector from the wrong provider, and that error gets misinterpreted as a bad selection operation. When I add printStackTrace to Nio4r.java:172, I get this:
UNIX sockets in JRuby come from jnr-enxio, which has its own selector provider. Selectors and selectable channels must come from the same provider. I'll see if I can come up with a patch for nio4r. |
Awesome! Excited to see what you turn up next. Will be ready to check-in a nio4r patch. /cc: @tarcieri |
This will take a bit more work than I'd hoped; nio4r needs to duplicate logic we have in JRuby for dealing with selectors from different providers. |
In the interim I will test 1.7 with the updated jnr-unixsocket stuff and see if it has reduced to the same problem. |
@headius is there any kind of API we can standardize on to avoid the duplication? |
I've confirmed the EOFError in 1.7 is now also caused by this illegal selector error. The difference in exception is probably due to 9k having recent ports of MRI's IO logic. I'm going to resolve this as fixed, since jnr-unixsocket and jnr-enxio and jruby itself appear to be doing the right thing. We'll deal with the nio4r issue separately. |
@tarcieri Should I file an issue about this, or shall we discuss realtime a bit more? In any case I'm closing this because JRuby should be doing the right thing if you use Ruby APIs, and the work to be done is in nio4r. |
Maybe open an nio4r issue about this and we can discuss there. FWIW I feel like nio4r is somewhat coupled to JRuby internals, and maybe needs some APIs surfaced (even just in Java-land) to bind to for this sort of thing. |
Breakage proven by the
break-unix-sockets
branch of Reel which were being held back until all rubies could support UNIX Socket connections properly.The test which passes under
rubinius
andMRI
, underjRuby
fails with:This issue is the only issue remaining in
0.6.0
of our release, and we'd be very excited to include UNIX Socket servers after a year or so of holding that functionality back.The text was updated successfully, but these errors were encountered: