Hi,

At Tue, 15 Jan 2008 05:35:00 +0900,
Sam Ruby wrote in [ruby-core:15072]:
> Does it help to know that reverting the following change makes the 
> problem go away?
> 
> http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/thread.c?r1=15044&r2=15043&pathrev=15044

OK, it seems too strictly.

Does this patch help?


Index: thread.c =================================================================== --- thread.c (revision 15054) +++ thread.c (working copy) @@ -282,5 +282,4 @@ thread_cleanup_func(void *th_ptr) th->machine_register_stack_start = th->machine_register_stack_end = 0; #endif - native_mutex_destroy(&th->interrupt_lock); native_thread_destroy(th); } Index: thread_pthread.c =================================================================== --- thread_pthread.c (revision 15054) +++ thread_pthread.c (working copy) @@ -14,5 +14,4 @@ static void native_mutex_lock(pthread_mutex_t *lock); static void native_mutex_unlock(pthread_mutex_t *lock); -static void native_mutex_destroy(pthread_mutex_t *lock); static int native_mutex_trylock(pthread_mutex_t *lock); static void native_mutex_initialize(pthread_mutex_t *lock); @@ -157,4 +156,5 @@ static void native_thread_destroy(rb_thread_t *th) { + pthread_mutex_destroy(&th->interrupt_lock); pthread_cond_destroy(&th->native_thread_data.sleep_cond); } Index: thread_win32.c =================================================================== --- thread_win32.c (revision 15054) +++ thread_win32.c (working copy) @@ -419,4 +419,5 @@ native_thread_destroy(rb_thread_t *th) { HANDLE intr = th->native_thread_data.interrupt_event; + native_mutex_destroy(&th->interrupt_lock); thread_debug("close handle - intr: %p, thid: %p\n", intr, th->thread_id); th->native_thread_data.interrupt_event = 0;
-- Nobu Nakada