Deadlock dumps core

e$B$3$s$P$s$O!"e(Bsheepman e$B$G$9!#e(B

e$B$D$.$N$h$&$Je(B deadlock e$B$r5/$3$9%3!<%I$r<B9T$9$k$H!"e(B
ruby-1.8 e$B$,e(B core e$B$rEG$-$^$9!#e(B
–enable-pthread e$B$G%3%s%Q%$%k$7$F$$$^$9!#e(B
Linux 2.4.33-0vl0.5 i686
glibc-2.3.3-3vl1.3
e$B$G$9!#e(B

$ cat dlck.rb
Thread.new do
sleep 0.5
p 2
Thread.stop
end
sleep 0.1
p 1
Thread.stop

$ ruby-1.8 -v dlck.rb
ruby 1.8.6 (2007-06-18 patchlevel 5000) [i686-linux]
1
2
deadlock 0x4022e6fc: sleep:- (main) - dlck.rb:8
deadlock 0x40221a4c: sleep:- - dlck.rb:4
dlck.rb:4: [BUG] Segmentation fault
ruby 1.8.6 (2007-06-18) [i686-linux]

zsh: abort ruby-1.8 -v dlck.rb

e$B0J2<$N$h$&$J%Q%C%A$GD>$j$^$7$?$,!"$"$s$^$jNI$/M}2r$G$-$F$$$J$$$N$G!"<+?.$O$"$j$^$;$s!#e(B

$ svn diff eval.c
Index: eval.c

— eval.c (revision 12578)
+++ eval.c (working copy)
@@ -10527,7 +10527,7 @@
if (curr_thread == main_thread) {
rb_exc_raise(e);
}

  • rb_thread_main_jump(e, RESTORE_RAISE);
  • rb_thread_raise(1, &e, main_thread);
    }

static void

[email protected]$G$9!#e(B

At Sat, 23 Jun 2007 23:07:05 +0900,
sheepman wrote in [ruby-dev:31038]:

e$B$D$.$N$h$&$Je(B deadlock e$B$r5/$3$9%3!<%I$r<B9T$9$k$H!"e(B
ruby-1.8 e$B$,e(B core e$B$rEG$-$^$9!#e(B
–enable-pthread e$B$G%3%s%Q%$%k$7$F$$$^$9!#e(B
Linux 2.4.33-0vl0.5 i686
glibc-2.3.3-3vl1.3
e$B$G$9!#e(B

e$B:F8=$G$-$J$$$N$G$9$,!"$I$3$GMn$A$F$$$k$+$o$+$j$^$9$+!#e(B

e$B0J2<$N$h$&$J%Q%C%A$GD>$j$^$7$?$,!"$"$s$^$jNI$/M}2r$G$-$F$$$J$$$N$G!"<+?.$O$"$j$^$;$s!#e(B

  • rb_thread_main_jump(e, RESTORE_RAISE);
  • rb_thread_raise(1, &e, main_thread);

rb_thread_save_context()e$B$He(BTHREAD_SAVE_CONTEXT()e$B$N0c$$e(B?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs