[前][次][番号順一覧][スレッド一覧][生データ]

yarv-dev:918

From: sheepman <sheepman sheepman.sakura.ne.jp>
Date: Fri, 17 Feb 2006 22:34:37 +0900
Subject: [yarv-dev:918] open> Thread#kill and wakeup dump core

こんばんは、sheepman です。
手元の環境以外で再現するか分からないのですが、
以下のようにすると core を吐きます。

$ cat t.rb
mth = Thread.current
th = Thread.new do
   begin
     sleep 0.5
     mth.wakeup
     Thread.stop
   ensure
     Thread.pass
   end
end
Thread.pass
th.kill
th.wakeup
Thread.stop

$ ./miniruby -v t.rb
ruby 1.9.0 (2006-02-14) [i686-linux]
YARVCore 0.3.3 (rev: 435) [opts: ]
t.rb: DBG> : "t.rb:8:in `block in <main>'"
-- stack frame ------------
0x401ff008 (0000): 00000001
0x401ff00c (0001): 08141f6d
0x401ff010 (0002): 402af204
0x401ff014 (0003): 00000004
0x401ff018 (0004): 401ff00d (= 1) <- dfp
-- control frame ----------
c:0004 p:0019 s:0005 b:0005 l:-599 d:0004 BLOCK  i:ensure in block in <main> s:         -
c:0003 p:0046 s:0003 b:0002 l:-599 d:0001 PROC   i:block in <main> s:         -
c:0002 p:-001 s:0001 b:0001 l:0000 d:0000 FINISH i:-        s:         -
c:0001 p:-001 s:0000 b:-001 l:0000 d:0000 ------ i:-        s:         -
---------------------------
[BUG] Segmentation fault
ruby 1.9.0 (2006-02-14) [i686-linux]

zsh: abort      ./miniruby -v t.rb

以下はバックトレースです。

(gdb) bt
#0  0x400ecc11 in kill () from /lib/i686/libc.so.6
#1  0x4002a341 in pthread_kill () from /lib/i686/libpthread.so.0
#2  0x4002a6bb in raise () from /lib/i686/libpthread.so.0
#3  0x400ec8a4 in raise () from /lib/i686/libc.so.6
#4  0x400ee008 in abort () from /lib/i686/libc.so.6
#5  0x080c9c7e in rb_bug (fmt=0x80f3471 "Segmentation fault") at ../yarv/error.c:171
#6  0x0809fd43 in sigsegv () at ../yarv/signal.c:467
#7  0x4002ce8e in __pthread_clock_settime () from /lib/i686/libpthread.so.0
#8  0x400ec908 in killpg () from /lib/i686/libc.so.6
#9  0x080bb2d8 in rb_thread_stop () at ../yarv/thread.c:805
#10 0x080b77ef in call_cfunc (func=0xbfffe35c, recv=3221218352, len=1073937284, argc=1073937284,
    argv=0x6) at call_cfunc.h:21
#11 0x080b5a6d in th_eval (th=0x813d6c0, initial=0) at insns.def:1246
#12 0x080b7468 in th_eval_body (th=0x813d6c0) at ../yarv/vm.c:1461
#13 0x080b8a70 in yarvcore_eval_iseq (iseq=1076459392) at yarv.h:49
#14 0x080588b4 in ruby_exec_internal () at ../yarv/eval.c:261
#15 0x080588e8 in ruby_exec () at ../yarv/eval.c:275
#16 0x08058923 in ruby_run () at ../yarv/eval.c:293
#17 0x080560f0 in th_get_ruby_level_cfp (th=0x809fcdc, cfp=0x6) at ../yarv/main.c:46
#18 0x400d9c1f in __libc_start_main () from /lib/i686/libc.so.6


-- 
sheepman / TAMURA Takashi
sheepman sheepman.sakura.ne.jp http://sheepman.parfait.ne.jp/

-- 
ML: yarv-dev quickml.atdot.net
使い方: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧][生データ]

->     918 2006-02-17 22:34 [sheepman sheepman.sa] open> Thread#kill and wakeup dump core  
       919 2006-02-17 23:23 ┗[sheepman sheepman.sa]                                       
       924 2006-02-18 03:05  ┗[ko1 atdot.net       ] fixed> Re: open> Thread#kill and wakeup dump core
       958 2006-02-21 23:54   ┗[sheepman sheepman.sa] close> Thread#kill and wakeup dump core