This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 110934 - IOE bad file descriptor when killing session
Summary: IOE bad file descriptor when killing session
Status: VERIFIED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Martin Krauskopf
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-25 14:11 UTC by Tomas Danek
Modified: 2007-08-13 17:42 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Danek 2007-07-25 14:11:13 UTC
20070724
--------
jruby classic debugger
Started two sessions (accidentaly) and finished the second one. Script contained only helloworld.

FINE [org.rubyforge.debugcommons.Util]: Running [basedir: /Users/tester/NetBeansProjects/RubyApplication4/lib]:
"/Applications/NetBeans 6.0 200707240000.app/Contents/Resources/NetBeans 6.0 200707240000/ruby1/jruby-1.0/bin/jruby
-I/Users/tester/NetBeansProjects/RubyApplication4/lib -I/Users/tester/NetBeansProjects/RubyApplication4/test -I
/Applications/NetBeans 6.0 200707240000.app/Contents/Resources/NetBeans 6.0 200707240000/ruby1/ruby/debug-commons-0.9.4
-r /private/tmp/classic-debug53413.rb -r /private/tmp/io-synchronizer53414.rb -r classic-debug.rb
/Users/tester/NetBeansProjects/RubyApplication4/lib/main.rb"
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50945. Trying again...(19)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50945. Trying again...(18)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50945. Trying again...(17)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50945. Trying again...(16)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50945. Trying again...(15)
FINE [org.rubyforge.debugcommons.Util]: Running [basedir: /Users/tester/NetBeansProjects/RubyApplication4/lib]:
"/Applications/NetBeans 6.0 200707240000.app/Contents/Resources/NetBeans 6.0 200707240000/ruby1/jruby-1.0/bin/jruby
-I/Users/tester/NetBeansProjects/RubyApplication4/lib -I/Users/tester/NetBeansProjects/RubyApplication4/test -I
/Applications/NetBeans 6.0 200707240000.app/Contents/Resources/NetBeans 6.0 200707240000/ruby1/ruby/debug-commons-0.9.4
-r /private/tmp/classic-debug53415.rb -r /private/tmp/io-synchronizer53416.rb -r classic-debug.rb
/Users/tester/NetBeansProjects/RubyApplication4/lib/main.rb"
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50945. Trying again...(14)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50945. Trying again...(13)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50945. Trying again...(12)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50953. Trying again...(19)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50945. Trying again...(11)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50953. Trying again...(18)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50945. Trying again...(10)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50953. Trying again...(17)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50945. Trying again...(9)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50953. Trying again...(16)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50945. Trying again...(8)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50953. Trying again...(15)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50945. Trying again...(7)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50953. Trying again...(14)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50945. Trying again...(6)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50953. Trying again...(13)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50945. Trying again...(5)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50953. Trying again...(12)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50945. Trying again...(4)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50953. Trying again...(11)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50945. Trying again...(3)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50953. Trying again...(10)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50945. Trying again...(2)
FINEST [org.netbeans.modules.ruby.debugger.Util]: Performing "kill"
FINEST [org.netbeans.modules.ruby.debugger.Util]: Finishing session: localhost:50953
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50953. Trying again...(9)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50945. Trying again...(1)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50953. Trying again...(8)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50953. Trying again...(7)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50953. Trying again...(6)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50953. Trying again...(5)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50953. Trying again...(4)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50953. Trying again...(3)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50953. Trying again...(2)
FINEST [org.rubyforge.debugcommons.Util]: Cannot connect to localhost:50953. Trying again...(1)
SEVERE [org.rubyforge.debugcommons.Util]: Bad file descriptor
java.io.IOException: Bad file descriptor
        at java.io.FileInputStream.read(Native Method)
[catch] at org.rubyforge.debugcommons.RubyDebuggerProxy.dumpStream(RubyDebuggerProxy.java:411)
        at org.rubyforge.debugcommons.RubyDebuggerProxy.dumpProcess(RubyDebuggerProxy.java:402)
        at org.rubyforge.debugcommons.RubyDebuggerProxy.attach(RubyDebuggerProxy.java:383)
        at org.rubyforge.debugcommons.RubyDebuggerProxy.getCommandSocket(RubyDebuggerProxy.java:224)
        at org.rubyforge.debugcommons.RubyDebuggerProxy.startClassicDebugger(RubyDebuggerProxy.java:102)
        at org.rubyforge.debugcommons.RubyDebuggerProxy.startDebugging(RubyDebuggerProxy.java:80)
        at org.netbeans.modules.ruby.debugger.RubyDebugger.startDebugging(RubyDebugger.java:141)
        at org.netbeans.modules.ruby.debugger.RubyDebugger.debug(RubyDebugger.java:69)
        at org.netbeans.modules.ruby.rubyproject.execution.ExecutionService$2.run(ExecutionService.java:287)
        at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:129)
SEVERE [org.rubyforge.debugcommons.Util]: Stream closed
java.io.IOException: Stream closed
        at java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:145)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:189)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
[catch] at org.rubyforge.debugcommons.RubyDebuggerProxy.dumpStream(RubyDebuggerProxy.java:411)
        at org.rubyforge.debugcommons.RubyDebuggerProxy.dumpProcess(RubyDebuggerProxy.java:403)
        at org.rubyforge.debugcommons.RubyDebuggerProxy.attach(RubyDebuggerProxy.java:383)
        at org.rubyforge.debugcommons.RubyDebuggerProxy.getCommandSocket(RubyDebuggerProxy.java:224)
        at org.rubyforge.debugcommons.RubyDebuggerProxy.startClassicDebugger(RubyDebuggerProxy.java:102)
        at org.rubyforge.debugcommons.RubyDebuggerProxy.startDebugging(RubyDebuggerProxy.java:80)
        at org.netbeans.modules.ruby.debugger.RubyDebugger.startDebugging(RubyDebugger.java:141)
        at org.netbeans.modules.ruby.debugger.RubyDebugger.debug(RubyDebugger.java:69)
        at org.netbeans.modules.ruby.rubyproject.execution.ExecutionService$2.run(ExecutionService.java:287)
        at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:129)
Comment 1 Tomas Danek 2007-07-25 14:55:34 UTC
I found steps to reproduce the IOE:
- start two sessions 
- second session stops at breakpoint, finish it using session view
- first session has empty output windows, finish it using sessions view
- you get dialog "Cannot connect to debugged process in 10s" + IOE
Comment 2 Martin Krauskopf 2007-08-08 11:50:46 UTC
Fixed/polished in the backend. You will get message that 'process was terminated before connection was established' in
those rare cases.

debug-commons-java/manifest.mf;
new revision: 1.10; previous revision: 1.9
debugger/nbproject/project.xml;
new revision: 1.11; previous revision: 1.10
external/debug-commons-java-0.7.3.jar;
new revision: 1.11; previous revision: 1.10
Comment 3 Tomas Danek 2007-08-13 17:42:09 UTC
yup, there's a dialog now, no more exceptions. Verified 20070813