[#39954] Fwd: [ruby-cvs:33451] Ruby:r26235 (trunk): * trace.h: new file. wraps tracing mechanisms. — SASADA Koichi <ko1@...>

 ささだです.

16 messages 2010/01/04
[#39957] Re: Fwd: [ruby-cvs:33451] Ruby:r26235 (trunk): * trace.h: new file. wraps tracing mechanisms. — Yugui <yugui@...> 2010/01/04

2010/1/4 SASADA Koichi <ko1@atdot.net>:

[#39959] Re: Fwd: [ruby-cvs:33451] Ruby:r26235 (trunk): * trace.h: new file. wraps tracing mechanisms. — SASADA Koichi <ko1@...> 2010/01/04

 ささだです.

[#39975] [Feature #2571] 文字列のハミング距離 — Kenta Murata <redmine@...>

Feature #2571: 文字列のハミング距離

14 messages 2010/01/07

[#39978] "require 'logge'" fails on ruby 1.8.7 from http://github.com/shyouhei/ruby — MOROHASHI Kyosuke <moronatural@...>

諸橋です。

7 messages 2010/01/07

[#40004] [Bug:trunk] require_relative depends on current directory — Yusuke ENDOH <mame@...>

遠藤です。

13 messages 2010/01/09

[#40074] [Bug #2603] NetBSD 5.0以降でpthreadの処理に由来する不具合 — Takahiro Kambe <redmine@...>

Bug #2603: NetBSD 5.0以降でpthreadの処理に由来する不具合

29 messages 2010/01/14
[#40086] Re: [Bug #2603] NetBSD 5.0以降でpthreadの処理に由来する不具合 — f-miura@... (MIURA, Fumiaki) 2010/01/14

NTTレゾナントの三浦です。不完全なpatchを書いてすみません。

[#40088] Re: [Bug #2603] NetBSD 5.0以降でpthreadの処理に由来する不具合 — Takahiro Kambe <taca@...> 2010/01/14

こんばんは。

[#40091] Re: [Bug #2603] NetBSD 5.0以降でpthreadの処理に由来する不具合 — KOSAKI Motohiro <kosaki.motohiro@...> 2010/01/15

kosakiです

[#40092] Re: [Bug #2603] NetBSD 5.0以降でpthreadの処理に由来する不具合 — Takahiro Kambe <taca@...> 2010/01/15

こんにちは。

[#40077] [Bug #2604] test_dsa_sign_verify() in test/openssl/test_ec.rb failes — Takahiro Kambe <redmine@...>

Bug #2604: test_dsa_sign_verify() in test/openssl/test_ec.rb failes

11 messages 2010/01/14

[#40153] [Bug:trunk] three bugs of Matrix::Scalar — Yusuke ENDOH <mame@...>

連投すみません。

19 messages 2010/01/25
[#40184] Re: [Bug:trunk] three bugs of Matrix::Scalar — keiju@... (石塚圭樹) 2010/01/27

けいじゅ@いしつかです.

[#40189] Re: [Bug:trunk] three bugs of Matrix::Scalar — Yusuke ENDOH <mame@...> 2010/01/27

遠藤です。

[#40191] Re: [Bug:trunk] three bugs of Matrix::Scalar — keiju@... (石塚圭樹) 2010/01/27

けいじゅ@いしつかです.

[#40224] Re: [Bug:trunk] three bugs of Matrix::Scalar — Yukihiro Matsumoto <matz@...> 2010/01/28

まつもと ゆきひろです

[#40162] [Bug #2658] rubyspec: Ruby character strings interpolates the return value of Object#inspect, without ivars, if Object#to_s does not return a String instance ERROR — Yusuke Endoh <redmine@...>

Bug #2658: rubyspec: Ruby character strings interpolates the return value of Object#inspect, without ivars, if Object#to_s does not return a String instance ERROR

8 messages 2010/01/26
[#40163] Re: [Bug #2658] rubyspec: Ruby character strings interpolates the return value of Object#inspect, without ivars, if Object#to_s does not return a String instance ERROR — Tanaka Akira <akr@...> 2010/01/26

2010年1月26日20:39 Yusuke Endoh <redmine@ruby-lang.org>:

[#40168] [Bug #2662] BigDecimal#ceil, etc. should not return Integer — Yusuke Endoh <redmine@...>

Bug #2662: BigDecimal#ceil, etc. should not return Integer

10 messages 2010/01/26

[#40200] [Feature #2673] the length for an enumerator generated by Array#permutation and Array#combination — Kenta Murata <redmine@...>

Feature #2673: the length for an enumerator generated by Array#permutation and Array#combination

14 messages 2010/01/28

[#40221] [Bug:trunk] rubyspec: SimpleDelegator when frozen creates a frozen clone ERROR — Yusuke ENDOH <mame@...>

まつもとさん、または lib/delegator.rb についてわかる誰か

13 messages 2010/01/28

[#40265] MonitorMixin::ConditionVariable#wait timeout — Tanaka Akira <akr@...>

手元の Ubuntu 9.10 の環境で Ruby 1.9.2 を make test-all すると

38 messages 2010/01/30
[#40326] Re: MonitorMixin::ConditionVariable#wait timeout — Shugo Maeda <shugo@...> 2010/02/05

前田です。

[#41155] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/05

前田さん、akr さん

[#41157] Re: MonitorMixin::ConditionVariable#wait timeout — Tanaka Akira <akr@...> 2010/05/05

2010年5月5日9:32 Yusuke ENDOH <mame@tsg.ne.jp>:

[#41158] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/05

遠藤です。

[#41159] Re: MonitorMixin::ConditionVariable#wait timeout — Tanaka Akira <akr@...> 2010/05/05

2010年5月5日11:46 Yusuke ENDOH <mame@tsg.ne.jp>:

[#41160] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/05

遠藤です。

[#41182] Re: MonitorMixin::ConditionVariable#wait timeout — Tanaka Akira <akr@...> 2010/05/06

2010年5月5日13:22 Yusuke ENDOH <mame@tsg.ne.jp>:

[#41183] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/06

遠藤です。

[#41186] Re: MonitorMixin::ConditionVariable#wait timeout — Tanaka Akira <akr@...> 2010/05/06

2010年5月6日19:58 Yusuke ENDOH <mame@tsg.ne.jp>:

[#41205] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/06

遠藤です。

[#41207] Re: MonitorMixin::ConditionVariable#wait timeout — KOSAKI Motohiro <kosaki.motohiro@...> 2010/05/06

2010年5月6日23:08 Yusuke ENDOH <mame@tsg.ne.jp>:

[#41208] Re: MonitorMixin::ConditionVariable#wait timeout — Tanaka Akira <akr@...> 2010/05/06

2010年5月6日23:15 KOSAKI Motohiro <kosaki.motohiro@gmail.com>:

[#41245] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/10

遠藤です。

[#41252] Re: MonitorMixin::ConditionVariable#wait timeout — KOSAKI Motohiro <kosaki.motohiro@...> 2010/05/10

kosakiです

[#41255] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/10

遠藤です。

[#41256] Re: MonitorMixin::ConditionVariable#wait timeout — Masaya TARUI <tarui@...> 2010/05/10

樽家です。

[#40269] [Feature #2695] Supported Platforms — Kazuhiro NISHIYAMA <redmine@...>

Feature #2695: Supported Platforms

17 messages 2010/01/31
[#40760] [Feature #2695] Supported Platforms — Yusuke Endoh <redmine@...> 2010/03/25

チケット #2695 が更新されました。 (by Yusuke Endoh)

[ruby-dev:40109] Re: [Bug #2603] NetBSD 5.0以降でpthreadの処理に由来する不具合

From: f-miura@... (MIURA, Fumiaki)
Date: 2010-01-18 02:40:44 UTC
List: ruby-dev #40109
NTTレゾナントの三浦です。
改良版かもしれないfork patchその2を作ってみました。

■前回の反省点とその対応:
[ruby-dev:40074]
> (1) fork(2)した子プロセスは非同期シグナルに対して安全な関数だけを使
>     用でき、pthread_*()な関数も使用できません
これはダメダメなままです。

[ruby-dev:40091]
> 本件の方針を確認させてもらえませんか?
三浦の思いとしては、規格には(我慢してもらえる範囲で)目をつぶってもらっ
て、なるべく使えるものになって欲しい。もしくは、「rubyの仕様でそこは知
らん」と明確化できるのでもいいかも。

[ruby-dev:40092]
> 3. fork(2)した子プロセスがexec(3)せずに動作を続ける場合
たとえば、rubyの管理下にないthreadが行うmalloc(3)の類の影響はそのまま
残り、それを使えるthreadは存在しなくなります。つまりメモリーリーク。
それでも使えるようにがんばるものか、やるなというのか。
・最小の手続きが済んだらすぐexec(3)(もしくはexit(3))しろと推奨
・close on execはやっとけ
ぐらいは必要そう。

[ruby-dev:40096]
> このpatch-2、公開 API である rb_thread_stop_timer の引数を void から
> int に変えているんですが、大丈夫ですか。
変えないのを作ってみました。その代わり神戸さんpatch-2より規格的に怪し
い。

[ruby-dev:40102]
> MacOS X 対策じゃないかなぁ。
> [ruby-core:9848]
fork(2)の前には*rubyのthreadは*1つになります。でもそれ以外のthreadを
使いたいから--enable-pthreadするんじゃないのかなあ?

■今回のpatchの基本方針。
[ruby-dev:40051]に[ruby-dev:38996]のパクリました。
違いはpthread_mutex_destroy()とpthread_mutex_init()の追加です。POSIX的
な怪しさはなくなっていませんが、減ってると期待しています。
32bitと64bitのlinuxで試した範囲ではこれで(も)大丈夫そうです。
--
        ▽R← 三浦史光 X;M 
        R←+/,(?1↑ρM)/M←X≠.- 運命 X▽ 

--- eval.c	2010/01/07 01:03:01	1.1
+++ eval.c	2010/01/18 01:28:53
@@ -12292,9 +12292,15 @@
     pthread_t thread;
 } time_thread = {PTHREAD_COND_INITIALIZER, PTHREAD_MUTEX_INITIALIZER};
 
+static inline void pthread_cleanup_force(pthread_mutex_t *lock)
+{
+    pthread_mutex_unlock(lock);
+    pthread_mutex_destroy(lock);
+}
+
 #define safe_mutex_lock(lock) \
     pthread_mutex_lock(lock); \
-    pthread_cleanup_push((void (*)_((void *)))pthread_mutex_unlock, lock)
+    pthread_cleanup_push((void (*)_((void *)))pthread_cleanup_force, lock)
 
 static void*
 thread_timer(dummy)
@@ -12329,6 +12335,17 @@
     return NULL;
 }
 
+/* fix inconsistent data */
+static void
+rb_thread_stop_timer_atfork(void)
+{
+    if (!thread_init) return;
+    (void)pthread_cond_init(&time_thread.cond, NULL);
+    (void)pthread_mutex_init(&time_thread.lock, NULL);
+    thread_init = 0;
+}
+
+
 void
 rb_thread_start_timer()
 {
@@ -12343,7 +12360,8 @@
     safe_mutex_lock(&time_thread.lock);
     if (pthread_create(&time_thread.thread, 0, thread_timer, args) == 0) {
 	thread_init = 1;
-	pthread_atfork(0, 0, rb_thread_stop_timer);
+	pthread_atfork(rb_thread_stop_timer,
+	    rb_thread_stop_timer_atfork, rb_thread_stop_timer_atfork);
 	pthread_cond_wait(&start, &time_thread.lock);
     }
     pthread_cleanup_pop(1);

In This Thread