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

Fix IO#syswrite. Fixes #3799 #4123

Merged
merged 1 commit into from Nov 22, 2016

Conversation

Projects
None yet
2 participants
@etehtsea
Contributor

etehtsea commented Aug 31, 2016

As a result of debugging I found out that SystemCallError that happens during syswrite is actually "Resource temporarily unavailable" that corresponds to EAGAIN. So first idea of fix was to put select somewhere. Related fix for IO#sysread gave me hope that I'm moving in right direction.

As a result I did similar fix as in 857b76f

@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Sep 6, 2016

Member

@etehtsea I do not see the equivalent logic in MRI's implementation, which makes me reluctant to include this. I think the actual problem may be that jnr-unixsocket is not properly doing a blocking write, or the UNIX socket is getting set non-blocking for some reason.

I think we should try to investigate from the bottom up and figure out why jnr-unixsocket's write is not blocking and handling EAGAIN the same way as the write call MRI makes.

Member

headius commented Sep 6, 2016

@etehtsea I do not see the equivalent logic in MRI's implementation, which makes me reluctant to include this. I think the actual problem may be that jnr-unixsocket is not properly doing a blocking write, or the UNIX socket is getting set non-blocking for some reason.

I think we should try to investigate from the bottom up and figure out why jnr-unixsocket's write is not blocking and handling EAGAIN the same way as the write call MRI makes.

@etehtsea

This comment has been minimized.

Show comment
Hide comment
@etehtsea

etehtsea Nov 16, 2016

Contributor

@headius, updated. Needs new jnr-enxio snapshot with jnr/jnr-enxio#23 merged in.
Hope this time I fixed it right.

Contributor

etehtsea commented Nov 16, 2016

@headius, updated. Needs new jnr-enxio snapshot with jnr/jnr-enxio#23 merged in.
Hope this time I fixed it right.

@etehtsea etehtsea changed the title from IO#syswrite should always block. Fixes #3799 to Fix IO#syswrite. Fixes #3799 Nov 16, 2016

@headius headius merged commit 723f2da into jruby:master Nov 22, 2016

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
continuous-integration/appveyor/pr AppVeyor build failed
Details

@headius headius added this to the JRuby 9.1.7.0 milestone Nov 22, 2016

@etehtsea etehtsea deleted the etehtsea:gh-3799-syswrite-block branch Nov 22, 2016

@etehtsea etehtsea restored the etehtsea:gh-3799-syswrite-block branch Nov 22, 2016

@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Nov 22, 2016

Member

Thank you!

Member

headius commented Nov 22, 2016

Thank you!

@etehtsea etehtsea deleted the etehtsea:gh-3799-syswrite-block branch Nov 22, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment