Project

General

Profile

Actions

Bug #3880

closed

Ruby 1.9.1 - crash in timeout.rb

Added by elvitalobo (Elvita Lobo) about 14 years ago. Updated over 5 years ago.

Status:
Third Party's Issue
Target version:
-
ruby -v:
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32]
[ruby-core:32589]

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

crashLog.txt (4.2 KB) crashLog.txt crash console output elvitalobo (Elvita Lobo), 09/28/2010 04:38 AM
serial_equipment_connection.rb (1.24 KB) serial_equipment_connection.rb elvitalobo (Elvita Lobo), 09/28/2010 04:38 AM
equipment_connection.rb (1.79 KB) equipment_connection.rb elvitalobo (Elvita Lobo), 09/28/2010 04:38 AM
Actions #1

Updated by naruse (Yui NARUSE) about 14 years ago

  • Status changed from Open to Feedback
  • Priority changed from 5 to Normal

=begin
Is this reproducible on Ruby 1.9.2?
=end

Actions #2

Updated by elvitalobo (Elvita Lobo) about 14 years ago

=begin
I see a crash in 1.9.2p0 also, although from the stack trace it looks like the crash does not occur at the same place in the code

Running Test 232901 test iteration 1 session iteration 1
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:145: [BUG
] Segmentation fault
ruby 1.9.2p0 (2010-08-18) [i386-mingw32]

-- control frame ----------
c:0025 p:---- s:0117 b:0117 l:000116 d:000116 CFUNC :load
c:0024 p:0015 s:0113 b:0113 l:000102 d:000112 BLOCK C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesuppo
rt-2.3.8/lib/active_support/dependencies.rb:145
c:0023 p:0055 s:0111 b:0111 l:000110 d:000110 METHOD C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesuppo
rt-2.3.8/lib/active_support/dependencies.rb:521
c:0022 p:0041 s:0103 b:0103 l:000102 d:000102 METHOD C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesuppo
rt-2.3.8/lib/active_support/dependencies.rb:145
c:0021 p:0734 s:0097 b:0097 l:00051c d:00051c METHOD C:/VATF_source/atf_session_runner.rb:426
c:0020 p:0135 s:0078 b:0078 l:000068 d:000077 BLOCK C:/VATF_source/atf_session_runner.rb:311
c:0019 p:---- s:0075 b:0075 l:000074 d:000074 FINISH
c:0018 p:---- s:0073 b:0073 l:000072 d:000072 CFUNC :upto
c:0017 p:0258 s:0069 b:0069 l:000068 d:000068 METHOD C:/VATF_source/atf_session_runner.rb:306
c:0016 p:0024 s:0062 b:0062 l:000023 d:000061 BLOCK atf_run.rb:50
c:0015 p:---- s:0059 b:0059 l:000058 d:000058 FINISH
c:0014 p:---- s:0057 b:0057 l:000056 d:000056 CFUNC :each
c:0013 p:0032 s:0054 b:0054 l:000023 d:000053 BLOCK atf_run.rb:49
c:0012 p:---- s:0051 b:0051 l:000050 d:000050 FINISH
c:0011 p:---- s:0049 b:0049 l:000048 d:000048 CFUNC :each
c:0010 p:0017 s:0046 b:0046 l:000023 d:000045 BLOCK atf_run.rb:47
c:0009 p:---- s:0043 b:0043 l:000042 d:000042 FINISH
c:0008 p:---- s:0041 b:0041 l:000040 d:000040 CFUNC :upto
c:0007 p:0229 s:0037 b:0037 l:000023 d:000036 BLOCK atf_run.rb:46
c:0006 p:---- s:0029 b:0029 l:000028 d:000028 FINISH
c:0005 p:---- s:0027 b:0027 l:000026 d:000026 CFUNC :each
c:0004 p:0475 s:0024 b:0024 l:000023 d:000023 METHOD atf_run.rb:41
c:0003 p:0084 s:0006 b:0006 l:00215c d:001ec4 EVAL atf_run.rb:107
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:00215c d:00215c TOP

-- Ruby level backtrace information ----------------------------------------
atf_run.rb:107:in <main>' atf_run.rb:41:in run_session'
atf_run.rb:41:in each' atf_run.rb:46:in block in run_session'
atf_run.rb:46:in upto' atf_run.rb:47:in block (2 levels) in run_session'
atf_run.rb:47:in each' atf_run.rb:49:in block (3 levels) in run_session'
atf_run.rb:49:in each' atf_run.rb:50:in block (4 levels) in run_session'
C:/VATF_source/atf_session_runner.rb:306:in init_test_iterations' C:/VATF_source/atf_session_runner.rb:306:in upto'
C:/VATF_source/atf_session_runner.rb:311:in block in init_test_iterations' C:/VATF_source/atf_session_runner.rb:426:in start_test'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:145:in l oad_with_new_constant_marking' C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in n
ew_constants_in'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:145:in b lock in load_with_new_constant_marking' C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:145:in l
oad'

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

=end

Updated by naruse (Yui NARUSE) over 13 years ago

  • Status changed from Feedback to Assigned
  • Assignee set to nahi (Hiroshi Nakamura)

Updated by nahi (Hiroshi Nakamura) over 13 years ago

  • Target version changed from 1.9.1 to 1.9.3

Updated by nahi (Hiroshi Nakamura) over 13 years ago

  • Status changed from Assigned to Feedback

Hi Elvita, sorry for late response. We're planning 1.9.3 release soon and we want to know if it still causes SEGV or not.

I installed RubyInstaller (ruby 1.9.2p180 (2011-02-18) [i386-mingw32]) and DevKit on Windows 7 64bit, then installed serialport 1.0.4 by a gem. For this env, basic serialport communication looks working.

Can you show us a way to replicate the bug on our side?

Updated by nahi (Hiroshi Nakamura) over 13 years ago

  • Assignee changed from nahi (Hiroshi Nakamura) to usa (Usaku NAKAMURA)

Usa, can you take at look at this? If 'Feedback' is enough, reassign to me.

Updated by usa (Usaku NAKAMURA) over 13 years ago

This is a 3rd party issue, I guess.

Actions #8

Updated by naruse (Yui NARUSE) over 11 years ago

  • Target version changed from 1.9.3 to 2.6
Actions #9

Updated by naruse (Yui NARUSE) almost 7 years ago

  • Target version deleted (2.6)
Actions #10

Updated by jeremyevans0 (Jeremy Evans) over 5 years ago

  • Status changed from Feedback to Third Party's Issue
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0