More on MySQL -- Fatal trap 12
David Xu
davidxu at freebsd.org
Wed Feb 18 17:16:59 PST 2004
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: */
More information about the freebsd-threads
mailing list