Skip to content
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

sysread hangs on EOF on mac #5287

andrewdotn opened this issue Aug 21, 2018 · 1 comment

sysread hangs on EOF on mac #5287

andrewdotn opened this issue Aug 21, 2018 · 1 comment


Copy link


Provide at least:

  • JRuby version (jruby -v) and command line (flags, JRUBY_OPTS, etc)
    jruby (2.5.0) 2018-05-24 81156a8 Java HotSpot(TM) 64-Bit Server VM 25.161-b12 on 1.8.0_161-b12 +jit [darwin-x86_64]
  • Operating system and platform (e.g. uname -a)
    Darwin localhost 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64

Expected Behavior

With this script, I expect to see EOFError raised:

f ='/etc/passwd', 'r')
loop do
  x = f.sysread(1024)
  puts "read #{x.length}"

This is what MRI ruby does, as well as JRuby and earlier.

Actual Behavior

The script hangs at EOF with JRuby on the mac. The Java debugger shows it’s inside calling Linux seems to be unaffected.

git bisect traces it to dad9ab0, which was cherry-picked as 3493a91, so and are affected as well.

Copy link

headius commented Oct 26, 2018

Thank you for your help on this!

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

No branches or pull requests

3 participants