Bug #9198
closedSegfault in TestException#test_machine_stackoverflow
Description
I observe segfault in TestException#test_machine_stackoverflow test case for -preview2. Please see attached log.
Files
Updated by vo.x (Vit Ondruch) almost 11 years ago
Forgot to mention that I am testing of Fedora Rawhide.
Updated by vo.x (Vit Ondruch) almost 11 years ago
Still observe the issue with ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]
Updated by normalperson (Eric Wong) almost 11 years ago
Does it go away if you wrap the test with Thread.new?
Likely the same problem I describe in [ruby-core:60248]
--- a/test/ruby/test_exception.rb
+++ b/test/ruby/test_exception.rb
@@ -480,10 +480,12 @@ def test_stackoverflow
def test_machine_stackoverflow
bug9109 = '[ruby-dev:47804] [Bug #9109]'
assert_separately([], <<-SRC)
- Thread.new do
assert_raise(SystemStackError, #{bug9109.dump}) {
h = {a: ->{h[:a].call}}
h[:a].call
} - end
SRC
rescue SystemStackError
end
Updated by vo.x (Vit Ondruch) almost 11 years ago
Eric Wong wrote:
Does it go away if you wrap the test with Thread.new?
Yes, this patch helps.
Updated by vo.x (Vit Ondruch) almost 11 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).
Updated by normalperson (Eric Wong) almost 11 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.
Updated by vo.x (Vit Ondruch) over 9 years 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.
Updated by vo.x (Vit Ondruch) over 8 years 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.