Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Crash after Guard test run #2102

Closed
tmornini opened this Issue Dec 19, 2012 · 14 comments

Comments

Projects
None yet
5 participants
Contributor

tmornini commented Dec 19, 2012

I decided to test the Boocx core code base against Rubinius.

After the tests run, Guard should wait for the next file change then run again. Instead, it crashes.

https://gist.github.com/4341512

Let me know how I can help!

P.S. Rubinius appears to be quite a bit quicker than it was 8 months ago. :-)

Owner

jc00ke commented Dec 25, 2012

Are you running in 1.9 mode? What version of OS X are you on?

Owner

dbussink commented Dec 28, 2012

Is there a way for us to reproduce the problem? Or can it be reproduced with any project with guard?

Just put together a quick dummy environment you can use to reproduce the error.

git clone git://github.com/meskyanichi/rbx-guard-issue.git
cd rbx-guard-issue
bundle
guard

It'll run the tests and then error out with:

rbx-guard git:master ❯ guard                                                                                           ⏎ ✖ ✹ ✭
13:18:09 - INFO - Guard uses TerminalTitle to send notifications.
13:18:09 - INFO - Guard::RSpec is running
13:18:09 - INFO - Running all specs
.

Finished in 0.00143 seconds
1 example, 0 failures

13:18:14 - INFO - Guard is now watching at '/Users/Michael/Desktop/rbx-guard'
An exception occurred running /Users/Michael/.gem/rbx/1.9.3/bin/guard
    Bad file descriptor - select(2) failed (Errno::EBADF)

Backtrace:
                              IO.select at kernel/common/io.rb:358
                            FSEvent#run at /Users/Michael/.gem/rbx/1.9.3/gems/rb-fsevent-0.9.2/lib/rb-fsevent/fsevent.rb:40
  { } in Listen::Adapters::Darwin#start at /Users/Michael/.gem/rbx/1.9.3/gems/listen-0.6.0/lib/listen/adapters/darwin.rb:31
                         Thread#__run__ at kernel/bootstrap/thread19.rb:41

The issue might not lie directly in Guard, but indirectly through rb-fsevent which I believe is Mac OSX specific (and would require OSX to debug. I'm not entirely sure this is the case though.)

@dbussink dbussink referenced this issue in thibaudgg/rb-fsevent Dec 28, 2012

Merged

Fix race condition in stopping FSEvent runner #40

Owner

dbussink commented Dec 28, 2012

Looks like a race condition in rb-fsevent, opened a pull request there.

ttilley commented Dec 31, 2012

rb-fsevent 0.9.3 released. please test.

Contributor

tmornini commented Jan 12, 2013

Tested just now.

It no longer crashes, but it hangs after successfully running the tests.

Here's the output:

Welcome to the Boocx core rake machine!

Run options: --seed 8465

# Running tests:

.........................................................................................................................................................................................................................................................................................................................................

Fabulous tests in 0.433254s, 759.3698 tests/s, 1034.0355 assertions/s.

329 tests, 448 assertions, 0 failures, 0 errors, 0 skips
20:33:02 - INFO - Guard uses TerminalTitle to send notifications.
20:33:02 - INFO - Guard is now watching at '/Users/tmornini/Desktop/Boocx2/boocx-core'

And that's it. It just hangs their forever.

Contributor

tmornini commented Jan 12, 2013

P.S. Rubinius is running our tests very nearly as quickly as 1.9.3, and I understand that running tests is sort of worst-case for it right now.

## 1.9.3

Welcome to the Boocx core rake machine!

Run options: --seed 46139

# Running tests:

.........................................................................................................................................................................................................................................................................................................................................

Fabulous tests in 0.354089s, 929.1449 tests/s, 1265.2186 assertions/s.

329 tests, 448 assertions, 0 failures, 0 errors, 0 skips
20:38:39 - INFO - Guard uses TerminalTitle to send notifications.
20:38:39 - INFO - Guard is now watching at '/Users/tmornini/Desktop/Boocx2/boocx-core'

Go team! :-)

Contributor

tmornini commented Jan 19, 2013

Another update. Tonight's HEAD.

The [Listen warning] at the bottom is new behavior, but Rubinius still hangs after that.

Welcome to the Boocx core rake machine!

Run options: --seed 26185

# Running tests:

.........................................................................................................................................................................................................................................................................................................................................................................

Fabulous tests in 0.688474s, 524.3481 tests/s, 723.3389 assertions/s.

361 tests, 498 assertions, 0 failures, 0 errors, 0 skips
23:29:02 - INFO - Guard uses TerminalTitle to send notifications.
23:29:02 - INFO - Guard is now watching at '/Users/tmornini/Desktop/Boocx2/boocx-core'
[Listen warning]:
  Listen will be polling changes. Learn more at https://github.com/guard/listen#polling-fallback.
Contributor

tmornini commented Mar 1, 2013

Tried it again, still no luck. The process does stop if I sent it ctrl-\ (SIGQUIT)

Owner

dbussink commented Mar 1, 2013

Could you provide us with a way to reproduce the problem? The test app I've used guard with and tested with works fine, so I'm not sure what's different in your situation.

Contributor

tmornini commented Mar 1, 2013

Same issue last night.

@dbussink: Are you using OS X?

Owner

dbussink commented Mar 1, 2013

@tmornini Yeah, using OS X here. I used the repro from @meskyanichi to fix the original problem and that one worked fine for me. That's why I asked about whether you could create a repro, since there must be something different there then.

Contributor

tmornini commented Jul 15, 2013

Here's the JRuby bug ticket:

https://jira.codehaus.org/browse/JRUBY-7176

Contributor

tmornini commented Nov 30, 2013

I'll try my app again and re-open if needed.

@tmornini tmornini closed this Nov 30, 2013

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