From owner-freebsd-threads@FreeBSD.ORG Wed Feb 18 17:16:59 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7038316A4CE for ; Wed, 18 Feb 2004 17:16:59 -0800 (PST) Received: from bento.FreeBSD.org (bento.freebsd.org [216.136.204.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 685CB43D1F; Wed, 18 Feb 2004 17:16:59 -0800 (PST) (envelope-from davidxu@freebsd.org) Received: from freebsd.org (localhost [127.0.0.1]) by bento.FreeBSD.org (8.12.10/8.12.10) with ESMTP id i1J1GuQt031780; Wed, 18 Feb 2004 17:16:57 -0800 (PST) (envelope-from davidxu@freebsd.org) Message-ID: <40340E9E.3090302@freebsd.org> Date: Thu, 19 Feb 2004 09:17:18 +0800 From: David Xu User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030723 Thunderbird/0.1 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Eischen References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-threads@freebsd.org Subject: Re: More on MySQL -- Fatal trap 12 X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2004 01:16:59 -0000 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: */