ruby-debug / ruby-debug-ide

An interface which glues ruby-debug to IDEs like Eclipse (RDT), NetBeans and RubyMine.
https://www.jetbrains.com/ruby/features/ruby_debugger.html
Other
371 stars 83 forks source link

Exception in DebugThread loop: Bad file descriptor(Errno::EBADF) #58

Closed tyler-ball closed 10 years ago

tyler-ball commented 10 years ago

Got another one of these!

18592: Exception in DebugThread loop: Bad file descriptor(Errno::EBADF) Backtrace:
/Users/tball/.rvm/gems/ruby-2.1.1@chef/gems/ruby-debug-ide-0.4.23.beta1/lib/ruby-debug-ide/interface.rb:30:in `close'   
from: /Users/tball/.rvm/gems/ruby-2.1.1@chef/gems/ruby-debug-ide-0.4.23.beta1/lib/ruby-debug-ide/interface.rb:30:in `close'   
from: /Users/tball/.rvm/gems/ruby-2.1.1@chef/gems/ruby-debug-ide-0.4.23.beta1/lib/ruby-debug-ide/ide_processor.rb:105:in `process_commands'   
from: /Users/tball/.rvm/gems/ruby-2.1.1@chef/gems/ruby-debug-ide-0.4.23.beta1/lib/ruby-debug-ide.rb:124:in `block in start_control' 

I'm trying to debug the chef-client project. Most of the time I try debugging, my code blows up at https://github.com/opscode/chef/blob/master/spec/spec_helper.rb#L92. Basically, Ohai is trying to shell-out to the system to collect information. The shell out command fails with the above exception on stderr. When I run it without the debugger, I never see this failure.

I'm running OSX 10.9.4 and Ruby 2.1.1 via RVM.

I reproduce by:

  1. Check out the chef-client project and bundle install it
  2. Set a breakpoint in RubyMine at https://github.com/opscode/ohai/blob/master/lib/ohai/mixin/command.rb#L34
  3. Examine the m object - in the @stderr instance variable you can see the above exception
os97673 commented 10 years ago

could you please try with the latest version of ruby-debug-ide

tyler-ball commented 10 years ago

With 0.4.23.beta7 I haven't run into this again. It also seems to be starting my debugger much faster!