Bug #3880
closedRuby 1.9.1 - crash in timeout.rb
Description
=begin
I am using the serialport 1.0.4 Ruby gem. In my serial port connection code, I have the following piece of code [1] that causes Ruby to crash from time to time.
[1] In serial_equipment_connection.rb
23 status = Timeout::timeout(timeout) {
24 while (!listener.match)
25 sleep 0.5
26 end
27 }
ruby –v
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32]
I am running on a Windows XP SP 3 machine.
I have attached the two related files - serial_equipment_connection.rb, equipment_connection.rb, and the crash log.
[2] Crash log (file attached)
MXP>(eval):2: [BUG] The handle is invalid.
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32]
-- control frame ----------
c:0044 p:0054 s:0226 b:0226 l:000225 d:000225 METHOD c:/Ruby191/lib/ruby/1.9.1/monitor.rb:178
c:0043 p:---- s:0232 b:0232 l:000231 d:000231 CFUNC :to_i
c:0042 p:---- s:0235 b:0235 l:000234 d:000234 CFUNC :instance_variable_set
c:0041 p:0098 s:0230 b:0230 l:000229 d:000229 METHOD c:/Ruby191/lib/ruby/gems/1.9.1/gems/activesuppo
rt-2.3.8/lib/active_support/core_ext/class/inheritable_attributes.rb:135
c:0040 p:---- s:0226 b:0226 l:000225 d:000225 CFUNC :index
c:0039 p:---- s:0223 b:0223 l:000222 d:000222 CFUNC :sleep
c:0038 p:0019 s:0219 b:0219 l:001a24 d:000218 BLOCK C:/VATF_source/target/serial_equipment_connecti
on.rb:25
c:0037 p:0109 s:0217 b:0217 l:002698 d:002698 METHOD c:/Ruby191/lib/ruby/1.9.1/timeout.rb:52
c:0036 p:0153 s:0205 b:0205 l:001a24 d:001a24 METHOD C:/VATF_source/target/serial_equipment_connecti
on.rb:23
c:0035 p:0014 s:0194 b:0194 l:000193 d:000193 METHOD C:/VATF_source/target/equipment_connection.rb:5
4
=end
Files