[#30872] segv when reentering into Fiber with callcc — sheepman <sheepman@...>

こんばんは、sheepman です。

15 messages 2007/06/01
[#30899] Re: segv when reentering into Fiber with callcc — SASADA Koichi <ko1@...> 2007/06/06

 ささだです。

[#30905] Re: segv when reentering into Fiber with callcc — "Yusuke ENDOH" <mame@...> 2007/06/06

遠藤と申します。

[#30906] Re: segv when reentering into Fiber with callcc — SASADA Koichi <ko1@...> 2007/06/06

 ささだです。

[#30929] secrand.rb — "NAKAMURA, Hiroshi" <nakahiro@...>

-----BEGIN PGP SIGNED MESSAGE-----

51 messages 2007/06/08
[#30930] Re: secrand.rb — Tanaka Akira <akr@...> 2007/06/08

In article <4669066C.2080307@sarion.co.jp>,

[#30934] Re: secrand.rb — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/06/08

-----BEGIN PGP SIGNED MESSAGE-----

[#30935] Re: secrand.rb — Tanaka Akira <akr@...> 2007/06/08

In article <46694461.4060706@sarion.co.jp>,

[#30936] Re: secrand.rb — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/06/08

-----BEGIN PGP SIGNED MESSAGE-----

[#30938] Re: secrand.rb — Tanaka Akira <akr@...> 2007/06/08

In article <46697C0B.8060402@sarion.co.jp>,

[#30939] Re: secrand.rb — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/06/08

-----BEGIN PGP SIGNED MESSAGE-----

[#30940] Re: secrand.rb — Tanaka Akira <akr@...> 2007/06/08

In article <4669DAB0.4050705@sarion.co.jp>,

[#30944] Re: secrand.rb — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/06/09

-----BEGIN PGP SIGNED MESSAGE-----

[#30945] Re: secrand.rb — Tanaka Akira <akr@...> 2007/06/09

In article <466AA73C.9030407@sarion.co.jp>,

[#30946] Re: secrand.rb — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/06/09

-----BEGIN PGP SIGNED MESSAGE-----

[#30950] Re: secrand.rb — Nobuyoshi Nakada <nobu@...> 2007/06/11

なかだです。

[#31173] Re: Random — Tanaka Akira <akr@...> 2007/07/10

In article <469253E9.9010203@sarion.co.jp>,

[#31174] Re: Random — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/07/10

-----BEGIN PGP SIGNED MESSAGE-----

[#31178] Re: Random — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/07/11

-----BEGIN PGP SIGNED MESSAGE-----

[#31179] Re: Random — Tanaka Akira <akr@...> 2007/07/11

In article <4694338C.7090303@sarion.co.jp>,

[#31183] Re: Random — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/07/11

-----BEGIN PGP SIGNED MESSAGE-----

[#30971] Linux/ia64で'ucontext_t' undeclared — akira yamada / やまだあきら <akira@...>

最近のRuby 1.9をLinux/ia64上でmakeしようとすると

16 messages 2007/06/13
[#30973] Re: Linux/ia64で'ucontext_t' undeclared — Yukihiro Matsumoto <matz@...> 2007/06/13

まつもと ゆきひろです

[#30974] Re: Linux/ia64で'ucontext_t' undeclared — akira@... 2007/06/13

Yukihiro Matsumoto さんは書きました:

[#30975] Re: Linux/ia64で'ucontext_t' undeclared — Yukihiro Matsumoto <matz@...> 2007/06/13

まつもと ゆきひろです

[ruby-dev:31031] Re: [BUG] queue 0x424010 freed with live thread(s) waiting

From: Nobuyoshi Nakada <nobu@...>
Date: 2007-06-20 08:04:23 UTC
List: ruby-dev #31031
なかだです。

At Sat, 26 May 2007 01:44:25 +0900,
nobu@ruby-lang.org wrote in [ruby-dev:30822]:
> > > 次のスクリプトのようなQueueを待ってるスレッドがある状態で
> > > メインスレッドが終了するケースで
> > >  [BUG] queue 0x424010 freed with live thread(s) waiting
> > > となりました。
> > 
> > r12068でwait_condvar()が常にmutexを再ロックするようになったせい
> > のようです。
> 
> [ruby-dev:30809]でも、ロックしたままforkすると[BUG]になります。

1.8.6-p36には[ruby-dev:30822]じゃなくて[ruby-dev:30809]が入って
いますが、再現テストはないものの[ruby-Bugs-11507]でエラーが起き
るという報告が来ています。

とりあえずrelock_mutexはたしかにまずそうなので以下のようなパッ
チを出してみたのですが、[ruby-dev:30653]に対する影響がよくわか
りません。再現するはずと思ったのですが、手元ではなぜか起きませ
んでした。どなたか確認できるでしょうか。


Index: ext/thread/thread.c
===================================================================
--- ext/thread/thread.c	(revision 12567)
+++ ext/thread/thread.c	(working copy)
@@ -13,7 +13,4 @@
 #include <intern.h>
 #include <rubysig.h>
-#include <node.h>
-
-enum rb_thread_status rb_thread_status _((VALUE));
 
 static VALUE rb_cMutex;
@@ -263,8 +260,8 @@ wait_list_cleanup(List *list)
 }
 
-static void
+static VALUE
 wait_list(List *list)
 {
-    rb_ensure(wait_list_inner, (VALUE)list, wait_list_cleanup, (VALUE)list);
+    return rb_ensure(wait_list_inner, (VALUE)list, wait_list_cleanup, (VALUE)list);
 }
 
@@ -447,20 +444,4 @@ rb_mutex_lock(VALUE self)
 }
 
-static VALUE
-relock_mutex(Mutex *mutex)
-{
-    VALUE current = rb_thread_current();
-
-    switch (rb_thread_status(current)) {
-      case THREAD_RUNNABLE:
-      case THREAD_STOPPED:
-	lock_mutex(mutex);
-	break;
-      default:
-	break;
-    }
-    return Qundef;
-}
-
 /*
  * Document-method: unlock
@@ -676,5 +657,5 @@ wait_condvar(ConditionVariable *condvar,
 	wake_thread(waking);
     }
-    rb_ensure(wait_list, (VALUE)&condvar->waiting, relock_mutex, (VALUE)mutex);
+    rb_ensure(wait_list, (VALUE)&condvar->waiting, lock_mutex, (VALUE)mutex);
 }
 


-- 
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
    中田 伸悦

In This Thread

Prev Next