Bug #9198

Segfault in TestException#test_machine_stackoverflow

Added by Vit Ondruch over 2 years ago. Updated 28 days ago.

ruby -v:
ruby 2.1.0dev (2013-11-23 trunk 43807) [x86_64-linux]


I observe segfault in TestException#test_machine_stackoverflow test case for -preview2. Please see attached log.

segfault.log Magnifier (830 KB) Vit Ondruch, 12/02/2013 11:59 PM


#1 [ruby-core:58798] Updated by Vit Ondruch over 2 years ago

Forgot to mention that I am testing of Fedora Rawhide.

#2 [ruby-core:59508] Updated by Vit Ondruch over 2 years ago

Still observe the issue with ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]

#3 [ruby-core:60334] Updated by Eric Wong over 2 years ago

Does it go away if you wrap the test with
Likely the same problem I describe in

--- a/test/ruby/test_exception.rb
+++ b/test/ruby/test_exception.rb
@@ -480,10 +480,12 @@ def test_stackoverflow
def test_machine_stackoverflow
bug9109 = ' [Bug #9109]'
assert_separately([], <<-SRC)
+ do
assert_raise(SystemStackError, #{bug9109.dump}) {
h = {a: ->{h[:a].call}}
+ end
rescue SystemStackError

#4 [ruby-core:60386] Updated by Vit Ondruch over 2 years ago

Eric Wong wrote:

Does it go away if you wrap the test with

Yes, this patch helps.

#5 [ruby-core:60387] Updated by Vit Ondruch over 2 years ago

BTW I am not using some old glibc (as you say in ruby-core:60248), but the most recent version (glibc-2.18.90-26.fc21.x86_64).

#6 [ruby-core:60434] Updated by Eric Wong about 2 years ago

Interesting. Can you poke the Red Hat glibc/kernel folks to see if the
problem is specific to RH/Fedora systems?

Regardless, the current method of getting the address of the main thread
stack seems error prone and fragile on Linux. Perhaps we should avoid
pthread_getattr_np in the main thread.

#7 [ruby-core:68252] Updated by Vit Ondruch about 1 year ago

Since this happens with recent glibc more often then it used to be, I reported this issue to glibc maintainers in Fedora [1]. I hope they can provide some help.


#8 [ruby-core:74816] Updated by Vit Ondruch 28 days ago

  • Status changed from Open to Closed
  • Backport changed from 1.9.3: UNKNOWN, 2.0.0: UNKNOWN to 2.0.0: UNKNOWN

This test was disabled by r49550 => closing this issue.

Also available in: Atom PDF