JRuby (please use github issues at http://bugs.jruby.org)
  1. JRuby (please use github issues at http://bugs.jruby.org)
  2. JRUBY-6235

IO#read_nonblock always raises Errno::EAGAIN: Resource temporarily unavailable

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.6.5
    • Fix Version/s: JRuby 1.7.0.pre2
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      1

      Description

      IO#read_nonblock always raises Errno::EAGAIN.

      $ jruby -Xerrno.backtrace=true -e 'IO.popen("date").read_nonblock(10)'
      #<Class:0x2bab5dae>: Resource temporarily unavailable - 
        read_nonblock at org/jruby/RubyIO.java:2515
               (root) at -e:1
      

        Activity

        Hide
        Charles Oliver Nutter added a comment -

        I improved this for pre2, so it at least doesn't always raise EAGAIN. There are other bugs for continued issues with nonblocking reads on SSL sockets, so I'll mark this particular issue resolved.

        Show
        Charles Oliver Nutter added a comment - I improved this for pre2, so it at least doesn't always raise EAGAIN. There are other bugs for continued issues with nonblocking reads on SSL sockets, so I'll mark this particular issue resolved.
        Hide
        Brett Porter added a comment -

        Do you have a reference to the other issues to follow? I still get the same result running the test case on 1.7.0.RC2, and I'm unable to build master at the moment to check if my other changes still apply/help.

        Show
        Brett Porter added a comment - Do you have a reference to the other issues to follow? I still get the same result running the test case on 1.7.0.RC2, and I'm unable to build master at the moment to check if my other changes still apply/help.
        Hide
        Joshua Krall added a comment -

        This issue is marked as Fixed... but it still seems broken to me.

        On 1.7.0, running the attached script:

        D, [2013-02-18T04:03:14.713000 #67462] DEBUG -- net.ssh.transport.session[3f7a]: establishing connection to github.com:22
        D, [2013-02-18T04:03:14.792000 #67462] DEBUG -- net.ssh.transport.session[3f7a]: connection established
        I, [2013-02-18T04:03:14.793000 #67462]  INFO -- net.ssh.transport.server_version[3f7c]: negotiating protocol version
        D, [2013-02-18T04:03:15.294000 #67462] DEBUG -- net.ssh.transport.server_version[3f7c]: remote is `SSH-2.0-OpenSSH_5.5p1 Debian-6+squeeze1+github8'
        D, [2013-02-18T04:03:15.294000 #67462] DEBUG -- net.ssh.transport.server_version[3f7c]: local is `SSH-2.0-Ruby/Net::SSH_2.6.5 java'
        JRuby::EAGAINReadable: Resource temporarily unavailable - errno backtraces disabled; run with -Xerrno.backtrace=true to enable
        

        And on 1.7.2:

        D, [2013-02-18T04:04:52.161000 #67462] DEBUG -- net.ssh.transport.session[81c6]: establishing connection to github.com:22
        D, [2013-02-18T04:04:52.205000 #67462] DEBUG -- net.ssh.transport.session[81c6]: connection established
        I, [2013-02-18T04:04:52.208000 #67462]  INFO -- net.ssh.transport.server_version[81c8]: negotiating protocol version
        D, [2013-02-18T04:04:52.745000 #67462] DEBUG -- net.ssh.transport.server_version[81c8]: remote is `SSH-2.0-OpenSSH_5.5p1 Debian-6+squeeze1+github8'
        D, [2013-02-18T04:04:52.745000 #67462] DEBUG -- net.ssh.transport.server_version[81c8]: local is `SSH-2.0-Ruby/Net::SSH_2.6.5 java'
        JRuby::EAGAINReadable: Resource temporarily unavailable - errno backtraces disabled; run with -Xerrno.backtrace=true to enable
        

        Maybe I'm doing something wrong... but this is manifesting in being unable to use JRuby with Capistrano due to my ssh config file using ProxyCommand's. Unfortunately, this is a total blocker for me right now, going to have to come up with another deployment solution or ditch jruby

        Show
        Joshua Krall added a comment - This issue is marked as Fixed... but it still seems broken to me. On 1.7.0, running the attached script: D, [2013-02-18T04:03:14.713000 #67462] DEBUG -- net.ssh.transport.session[3f7a]: establishing connection to github.com:22 D, [2013-02-18T04:03:14.792000 #67462] DEBUG -- net.ssh.transport.session[3f7a]: connection established I, [2013-02-18T04:03:14.793000 #67462] INFO -- net.ssh.transport.server_version[3f7c]: negotiating protocol version D, [2013-02-18T04:03:15.294000 #67462] DEBUG -- net.ssh.transport.server_version[3f7c]: remote is `SSH-2.0-OpenSSH_5.5p1 Debian-6+squeeze1+github8' D, [2013-02-18T04:03:15.294000 #67462] DEBUG -- net.ssh.transport.server_version[3f7c]: local is `SSH-2.0-Ruby/Net::SSH_2.6.5 java' JRuby::EAGAINReadable: Resource temporarily unavailable - errno backtraces disabled; run with -Xerrno.backtrace= true to enable And on 1.7.2: D, [2013-02-18T04:04:52.161000 #67462] DEBUG -- net.ssh.transport.session[81c6]: establishing connection to github.com:22 D, [2013-02-18T04:04:52.205000 #67462] DEBUG -- net.ssh.transport.session[81c6]: connection established I, [2013-02-18T04:04:52.208000 #67462] INFO -- net.ssh.transport.server_version[81c8]: negotiating protocol version D, [2013-02-18T04:04:52.745000 #67462] DEBUG -- net.ssh.transport.server_version[81c8]: remote is `SSH-2.0-OpenSSH_5.5p1 Debian-6+squeeze1+github8' D, [2013-02-18T04:04:52.745000 #67462] DEBUG -- net.ssh.transport.server_version[81c8]: local is `SSH-2.0-Ruby/Net::SSH_2.6.5 java' JRuby::EAGAINReadable: Resource temporarily unavailable - errno backtraces disabled; run with -Xerrno.backtrace= true to enable Maybe I'm doing something wrong... but this is manifesting in being unable to use JRuby with Capistrano due to my ssh config file using ProxyCommand's. Unfortunately, this is a total blocker for me right now, going to have to come up with another deployment solution or ditch jruby
        Hide
        Ajit Joglekar added a comment -

        I am also stuck due to this bug which I don't think is fixed yet. I have tried the attached test with jruby-1.7.1, jruby-1.7.2 with the same error.
        The application I am working on already uses java libraries. So moving to MRI it out of question

        Charles, could you please point us to a passing test case where EAGAIN is not raised?

        Thanks

        Show
        Ajit Joglekar added a comment - I am also stuck due to this bug which I don't think is fixed yet. I have tried the attached test with jruby-1.7.1, jruby-1.7.2 with the same error. The application I am working on already uses java libraries. So moving to MRI it out of question Charles, could you please point us to a passing test case where EAGAIN is not raised? Thanks
        Hide
        Joshua Krall added a comment -

        Since this issue is resolved and seems to have gotten lost... I've opened a new issue as a dup of this one: JRUBY-7110

        Show
        Joshua Krall added a comment - Since this issue is resolved and seems to have gotten lost... I've opened a new issue as a dup of this one: JRUBY-7110

          People

          • Assignee:
            Charles Oliver Nutter
            Reporter:
            Samuel Kadolph
          • Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: