Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Feb 2004 09:17:18 +0800
From:      David Xu <davidxu@freebsd.org>
To:        Daniel Eischen <eischen@vigrid.com>
Cc:        freebsd-threads@freebsd.org
Subject:   Re: More on MySQL -- Fatal trap 12
Message-ID:  <40340E9E.3090302@freebsd.org>
In-Reply-To: <Pine.GSO.4.10.10402181421150.15667-100000@pcnet5.pcnet.com>
References:  <Pine.GSO.4.10.10402181421150.15667-100000@pcnet5.pcnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Daniel Eischen wrote:

>On Tue, 17 Feb 2004, Daniel Eischen wrote:
>
>  
>
>>On Tue, 17 Feb 2004, Daniel Eischen wrote:
>>    
>>
>>>On Tue, 17 Feb 2004, Kris Gale wrote:
>>>      
>>>
>>>>Does this look like a fixable problem with KSE
>>>>to anyone on this list?
>>>>        
>>>>
>>>I would like to see how MySQL works when using process
>>>scope threads.  Do you know enough to hack it to do that?
>>>      
>>>
>>Alternatively, this patch to libpthread should force all
>>threads to be process scope.
>>    
>>
>
>That patch doesn't work.  It's not as simple to force the
>library to use scope process threads, since we make use
>of a special thread to handle signals and it has to be
>scope system.
>
I am running with following patch and 4BSD scheduler, it is working 
without deadlock. ;-)

Index: thr_create.c
===================================================================
RCS file: /home/ncvs/src/lib/libpthread/thread/thr_create.c,v
retrieving revision 1.53
diff -u -r1.53 thr_create.c
--- thr_create.c    8 Jan 2004 15:37:09 -0000    1.53
+++ thr_create.c    19 Feb 2004 01:13:11 -0000
@@ -142,6 +142,9 @@
         }
 #ifdef SYSTEM_SCOPE_ONLY
         new_thread->attr.flags |= PTHREAD_SCOPE_SYSTEM;
+#else
+         if (_thr_sig_daemon)
+                         new_thread->attr.flags &= ~PTHREAD_SCOPE_SYSTEM;
 #endif
         if (create_stack(&new_thread->attr) != 0) {
             /* Insufficient memory to create a stack: */




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40340E9E.3090302>