Skip to content
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

private method `split' called for nil:NilClass #111

Closed
mipearson opened this issue Dec 28, 2011 · 2 comments
Closed

private method `split' called for nil:NilClass #111

mipearson opened this issue Dec 28, 2011 · 2 comments

Comments

@mipearson
Copy link

Investigating this now, but chucking the issue up now just in case somebody else has seen this.

Guessing that one of the values in @readers is nil.

Procfile:

sphinx: searchd --console -c config/development.sphinx.conf
redis: redis-server
web: bundle exec unicorn -c config/unicorn.rb
job: bundle exec script/delayed_job

Trace:

private method `split' called for nil:NilClass 
/Users/mp/.rvm/gems/ree-1.8.7-2011.03/gems/foreman-0.30.1/lib/foreman/engine.rb:93:in `watch_for_output'
/Users/mp/.rvm/gems/ree-1.8.7-2011.03/gems/foreman-0.30.1/lib/foreman/engine.rb:92:in `each'
/Users/mp/.rvm/gems/ree-1.8.7-2011.03/gems/foreman-0.30.1/lib/foreman/engine.rb:92:in `watch_for_output'
/Users/mp/.rvm/gems/ree-1.8.7-2011.03/gems/foreman-0.30.1/lib/foreman/engine.rb:90:in `loop'
/Users/mp/.rvm/gems/ree-1.8.7-2011.03/gems/foreman-0.30.1/lib/foreman/engine.rb:90:in `watch_for_output'
/Users/mp/.rvm/gems/ree-1.8.7-2011.03/gems/foreman-0.30.1/lib/foreman/engine.rb:88:in `initialize'
/Users/mp/.rvm/gems/ree-1.8.7-2011.03/gems/foreman-0.30.1/lib/foreman/engine.rb:88:in `new'
/Users/mp/.rvm/gems/ree-1.8.7-2011.03/gems/foreman-0.30.1/lib/foreman/engine.rb:88:in `watch_for_output'
/Users/mp/.rvm/gems/ree-1.8.7-2011.03/gems/foreman-0.30.1/lib/foreman/engine.rb:44:in `start'
/Users/mp/.rvm/gems/ree-1.8.7-2011.03/gems/foreman-0.30.1/lib/foreman/cli.rb:19:in `start'
/Users/mp/.rvm/gems/ree-1.8.7-2011.03/gems/thor-0.14.6/lib/thor/task.rb:22:in `send'
/Users/mp/.rvm/gems/ree-1.8.7-2011.03/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
/Users/mp/.rvm/gems/ree-1.8.7-2011.03/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
/Users/mp/.rvm/gems/ree-1.8.7-2011.03/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
/Users/mp/.rvm/gems/ree-1.8.7-2011.03/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
/Users/mp/.rvm/gems/ree-1.8.7-2011.03/gems/foreman-0.30.1/bin/foreman:7
/Users/mp/.rvm/gems/ree-1.8.7-2011.03/bin/foreman:19:in `load'
/Users/mp/.rvm/gems/ree-1.8.7-2011.03/bin/foreman:19
^CSIGINT received
@mipearson
Copy link
Author

Everything in @readers looks fine. Chucking debugging in to check the response from IO::Select. Unfortunately, this issue is only happening to me about once an hour, so it's difficult to reproduce.

Didn't occur with Foreman 0.25. Only started occuring when bumping to latest version, but I bumped a lot of other gems at the same time.

@mipearson
Copy link
Author

Right, it looks like IO.select is returning IO handles that don't actually have data waiting: the r.gets is returning nil.

If I'd been paying attention ...

Not sure what the correct response is here. Check the return from r.gets before parsing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants