Git Product home page Git Product logo

Comments (10)

voxik avatar voxik commented on July 2, 2024

It seems that the problem might be some race condition, since this works:

$ rspec ./spec/io_spec.rb
..........

Finished in 0.79139 seconds (files took 0.07509 seconds to load)
10 examples, 0 failures

from childprocess.

voxik avatar voxik commented on July 2, 2024

Ah, forgot to include the CHILDPROCESS_POSIX_SPAWN=true, so it doesn't work indeed.

from childprocess.

voxik avatar voxik commented on July 2, 2024

This was the last successful build:

https://travis-ci.org/github/enkessler/childprocess/jobs/687662868

and this is where the issue first appeared:

https://travis-ci.org/github/enkessler/childprocess/jobs/698756797

from childprocess.

voxik avatar voxik commented on July 2, 2024

So the cat: -: Resource temporarily unavailable is reported from here:

ret = Lib.posix_spawnp(
pid_ptr,
@args.first, # TODO: not sure this matches exec() behaviour
actions,
attrs,
argv,
envp
)

called from here:

process.start

Checking what was changed in Ruby, this is susceptible commit:

ruby/ruby@0e3b0fc

But that might be completely false lead 😇

from childprocess.

voxik avatar voxik commented on July 2, 2024

This seems to be the root cause, the change from RUBY_PIPE_NONBLOCK_DEFAULT, which was 0, to O_NONBLOCK. I have locally replaced the O_NONBLOCK by 0 and the test suite passes.

Unfortunately, other test case fails then:

  1) ChildProcess lets a detached child live on
     Failure/Error: expect(alive?(c_pid)).to be true
     
       expected true
            got false
     # ./spec/childprocess_spec.rb:214:in `block (2 levels) in <top (required)>'

from childprocess.

voxik avatar voxik commented on July 2, 2024

I have reported this against Ruby:

https://bugs.ruby-lang.org/issues/17607

from childprocess.

eregon avatar eregon commented on July 2, 2024

I wonder if #172 / #175 might solve this. At least CHILDPROCESS_UNSET=should-be-unset bundle exec rake passes for me on that PR with Ruby 3.0.0.

from childprocess.

eregon avatar eregon commented on July 2, 2024

Confirmed that #175 (comment) actually fixes the CI on ruby-head (the only ruby-head CI failing is then due to installing FFI, which is unrelated and no longer needed with that PR).

from childprocess.

voxik avatar voxik commented on July 2, 2024

Thx, the test suite passes with #175. Nevertheless, I'd still like to also understand the reasons why it started to fail, although it will have smaller priority 😇

from childprocess.

sds avatar sds commented on July 2, 2024

Closed by #175.

from childprocess.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.