Antonio Terceiro escreveu isso aí: > clone 673594 -1 > severity -1 important > retitle -1 ruby1.8: threaded code segfaults under kfreebsd-* > tags 673594 + pending > thanks > > Hi Steven, > > Steven Chamberlain escreveu isso aí: > > Whereas the buildds experience hangs during some tests, I see segfaults > > instead. This sometimes happens even before the first test has been run. > > > > This small Ruby testcase results in segfault 50% of the time under > > ruby1.8 1.8.7.358-2, but always succeeds with ruby1.9.1 1.9.3.0-2: > > > > > require 'thread' > > > Thread.new do > > > foo = "bar" > > > end > > > > (Measured out of 100 runs, on kfreebsd-i386 with 4-way SMP) > > > > Attached are outputs from ktrace for a success and from a failure; then > > I've tried to diff them. There seems to be a race whereby thread0 tries > > to call thr_kill on thread2, but if that happens too late thread2 will > > trigger a segfault instead. > > Thanks for the patch. I am preparing an upload to workaround the test > timeout and make the FTBFS go away ASAP.
Hm, not so fast. When building ruby1.8 on amd64, I also get a segfault very early in the test suite (although the build succeeds). At least your test case does not segfault for me with the built binaries. How exactly do you run it? I tried the following, and had no problems: $ cat foo.rb require 'thread' 1000.times do Thread.new do foo = "bar" end end $ for in in $(seq 1 100); do ruby foo.rb ; printf .; done ....................................................................................................$ -- Antonio Terceiro <terce...@debian.org>
signature.asc
Description: Digital signature