Details

    • Type: Bug Bug
    • Status: Reopened Reopened
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: JRuby 1.6.6
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      OSX 10.7.2
    • Number of attachments :
      0

      Description

      jruby-1.6.5 :001 > IO.popen4("sh -c \"echo\"; echo $?") {}; $?
       => #<Process::Status: pid=36500,exited(0)>
      jruby-1.6.6 :002 > IO.popen4("sh -c \"echo\"; echo $?") {}; $?
       => #<Process::Status: pid=36395,exited(143)>
      

      Note the exit code on 1.6.6 is 143, not 0.

        Activity

        Hide
        Thomas E Enebo added a comment -

        Trying the same thing on my machine:

        Darwin mrpopo 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64
        

        I don't see your issue:

        system ~/work/jruby jruby-1_6 963% jirb
        irb(main):001:0> IO.popen4("sh -c \"echo\"; echo $?") {}; p $?
        IO.popen4("sh -c \"echo\"; echo $?") {}; p $?
        #<Process::Status: pid=34886,exited(0)>
        => nil
        

        I am unclear how pre-Lion could do this. Which version of Java are you using?

        Show
        Thomas E Enebo added a comment - Trying the same thing on my machine: Darwin mrpopo 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64 I don't see your issue: system ~/work/jruby jruby-1_6 963% jirb irb(main):001:0> IO.popen4("sh -c \"echo\"; echo $?") {}; p $? IO.popen4("sh -c \"echo\"; echo $?") {}; p $? #<Process::Status: pid=34886,exited(0)> => nil I am unclear how pre-Lion could do this. Which version of Java are you using?
        Hide
        Xavier Shay added a comment -

        Uhm, I can't reproduce now either :S
        NFI what is going on, closing for now.

        Show
        Xavier Shay added a comment - Uhm, I can't reproduce now either :S NFI what is going on, closing for now.
        Hide
        Xavier Shay added a comment -

        Argh this is non-deterministic :S

        jruby-1.6.6 :001 > IO.popen4("sh -c \"echo\"; echo $?") {}; $?
         => #<Process::Status: pid=94720,exited(0)> 
        jruby-1.6.6 :002 > IO.popen4("sh -c \"echo\"; echo $?") {}; $?
         => #<Process::Status: pid=94725,exited(0)> 
        jruby-1.6.6 :003 > IO.popen4("sh -c \"echo\"; echo $?") {}; $?
         => #<Process::Status: pid=94730,exited(143)> 
        jruby-1.6.6 :004 > IO.popen4("sh -c \"echo\"; echo $?") {}; $?
         => #<Process::Status: pid=94735,exited(143)> 
        jruby-1.6.6 :005 > IO.popen4("sh -c \"echo\"; echo $?") {}; $?
         => #<Process::Status: pid=94742,exited(143)> 
        jruby-1.6.6 :006 > IO.popen4("sh -c \"echo\"; echo $?") {}; $?
         => #<Process::Status: pid=94747,exited(0)> 
        jruby-1.6.6 :007 > IO.popen4("sh -c \"echo\"; echo $?") {}; $?
         => #<Process::Status: pid=94752,exited(143)> 
        jruby-1.6.6 :008 > IO.popen4("sh -c \"echo\"; echo $?") {}; $?
         => #<Process::Status: pid=94757,exited(0)> 
        jruby-1.6.6 :009 > IO.popen4("sh -c \"echo\"; echo $?") {}; $?
         => #<Process::Status: pid=94762,exited(143)> 
        jruby-1.6.6 :010 > IO.popen4("sh -c \"echo\"; echo $?") {}; $?
         => #<Process::Status: pid=94767,exited(143)> 
        jruby-1.6.6 :011 > IO.popen4("sh -c \"echo\"; echo $?") {}; $?
         => #<Process::Status: pid=94774,exited(0)>
        

        I also see non-deterministic results on 1.6.5 and 1.6.7 also (though with an exit code of 0 or 1, not 143), so my initial labeling of this as a regression was incorrect. I was not able to reproduce a changing exit code just using a shell. Wish I could provide more insight into this problem.

        Darwin koopa.local 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64
        
        java version "1.6.0_29"
        Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-11D50)
        Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)
        
        Show
        Xavier Shay added a comment - Argh this is non-deterministic :S jruby-1.6.6 :001 > IO.popen4("sh -c \"echo\"; echo $?") {}; $? => #<Process::Status: pid=94720,exited(0)> jruby-1.6.6 :002 > IO.popen4("sh -c \"echo\"; echo $?") {}; $? => #<Process::Status: pid=94725,exited(0)> jruby-1.6.6 :003 > IO.popen4("sh -c \"echo\"; echo $?") {}; $? => #<Process::Status: pid=94730,exited(143)> jruby-1.6.6 :004 > IO.popen4("sh -c \"echo\"; echo $?") {}; $? => #<Process::Status: pid=94735,exited(143)> jruby-1.6.6 :005 > IO.popen4("sh -c \"echo\"; echo $?") {}; $? => #<Process::Status: pid=94742,exited(143)> jruby-1.6.6 :006 > IO.popen4("sh -c \"echo\"; echo $?") {}; $? => #<Process::Status: pid=94747,exited(0)> jruby-1.6.6 :007 > IO.popen4("sh -c \"echo\"; echo $?") {}; $? => #<Process::Status: pid=94752,exited(143)> jruby-1.6.6 :008 > IO.popen4("sh -c \"echo\"; echo $?") {}; $? => #<Process::Status: pid=94757,exited(0)> jruby-1.6.6 :009 > IO.popen4("sh -c \"echo\"; echo $?") {}; $? => #<Process::Status: pid=94762,exited(143)> jruby-1.6.6 :010 > IO.popen4("sh -c \"echo\"; echo $?") {}; $? => #<Process::Status: pid=94767,exited(143)> jruby-1.6.6 :011 > IO.popen4("sh -c \"echo\"; echo $?") {}; $? => #<Process::Status: pid=94774,exited(0)> I also see non-deterministic results on 1.6.5 and 1.6.7 also (though with an exit code of 0 or 1, not 143), so my initial labeling of this as a regression was incorrect. I was not able to reproduce a changing exit code just using a shell. Wish I could provide more insight into this problem. Darwin koopa.local 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64 java version "1.6.0_29" Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-11D50) Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)
        Hide
        Xavier Shay added a comment -

        See most recent comment.

        Show
        Xavier Shay added a comment - See most recent comment.
        Hide
        Xavier Shay added a comment -

        Can also replicate occasionally on

        Linux somehost 2.6.18-274.3.1.el5 #1 SMP Tue Sep 6 20:13:52 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
        
        Show
        Xavier Shay added a comment - Can also replicate occasionally on Linux somehost 2.6.18-274.3.1.el5 #1 SMP Tue Sep 6 20:13:52 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
        Hide
        Charles Oliver Nutter added a comment -

        FWIW, this seems consistently correct on OS X. I let a script run for many hundreds of process launches and it was 0 result every time.

        Could be specific to Linux, since Tom could not reproduce either.

        Show
        Charles Oliver Nutter added a comment - FWIW, this seems consistently correct on OS X. I let a script run for many hundreds of process launches and it was 0 result every time. Could be specific to Linux, since Tom could not reproduce either.

          People

          • Assignee:
            Thomas E Enebo
            Reporter:
            Xavier Shay
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: