-
Notifications
You must be signed in to change notification settings - Fork 240
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
"Errno::ECHILD: No child processes" on JRuby #341
Comments
Looks like guard-rspec command is failing. Could you patch:
to output the command (and possibly environment) - I believe running that command should reproduce the error, e.g: def _really_run
env = { "GUARD_RSPEC_RESULTS_FILE" => formatter_tmp_file }
STDERR.puts command.inspect
STDERR.puts env.inspect
pid = Kernel.spawn(env, command) # use spawn to stub in JRuby
result = ::Process.wait2(pid) Sorry about this - Guard traces calls to What's happening here is: rspec is failing almost immediately, and guard-rspec isn't (yet) patched to handle this edge cases. I'll need to patch both guard and guard-rspec to fix this, but meanwhile running rspec with the same command line and arguments should show you exactly what's wrong. |
BTW, it works for me (your test repo - exact same JRuby version even) |
Guard on master now should properly trace the call, so you don't need the patching. Still, I'm curious why your RSpec is failing (basically, so I can create a real-life based spec for this). |
Thanks for the quick reply! Transcript from a session is below running against master. Interestingly, my second save which typically would fail was ok, but then the third afterward gave the same failure. I wonder if something is sensitive to timing in this, which might explain why it works for you and (slightly inconsistently) for me.
|
Sorry, I didn't notice that RSpec actually succeeded (the "Finished (...)" output). It seems like it's a JRuby bug: jruby/jruby#3117 You might simply have to pull in a newer JRuby, containing at least this: jruby/jruby@6016c39 |
I updated the title so people can find this. If this occurs more frequently, I'll patch Guard::RSpec to show an error or something. |
Ah, good find. That does appear to be related, but I updated to JRuby 1.7.22 which has that commit in it, and I'm still getting a failure there, although the stack is a bit different:
(Full trace in a gist) Should I bring this up on the JRuby thread you think? |
Much better title by the way. Thanks! |
I just reported it here: jruby/jruby#3274 I can probably patch this with a call to Still, if it's a JRuby bug, it's worth fixing (especially since I can't reproduce it on Linux). |
Updating the Guardfile on Shoes 4 after the project reshuffled its files, and unfortunately started seeing some consistent crashes. It's been quite a while since I actively ran Guard on the project, so I don't know precisely when the problem crept in.
Fortunately, I reproduced the problem with a slimmed down test repository at https://github.com/jasonrclark/jruby-guard-rspec. I ran a similar minimal test for
guard-minitest
, and it didn't have the same failure, soguard-rspec
seemed a reasonable place to start given that.To run the sample, clone https://github.com/jasonrclark/jruby-guard-rspec and using JRuby run:
The effect seems to be:
spec/test_spec.rb
file, I don't see Guard to anythingVersions:
jruby 1.7.20.1 (1.9.3p551) 2015-06-10 d7c8c27 on Java HotSpot(TM) 64-Bit Server VM 1.8.0_20-b26 [darwin-x86_64]
guard (2.13.0)
guard-rspec (4.6.4)
rspec (3.3.0)
Log from failure:
The text was updated successfully, but these errors were encountered: