From owner-freebsd-stable Sat Mar 25 20:54:18 2000 Delivered-To: freebsd-stable@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 83CFE37B943 for ; Sat, 25 Mar 2000 20:53:47 -0800 (PST) (envelope-from eischen@vigrid.com) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.8.7/PCNet) id XAA06149; Sat, 25 Mar 2000 23:53:17 -0500 (EST) Date: Sat, 25 Mar 2000 23:53:16 -0500 (EST) From: Daniel Eischen To: Thimble Smith Cc: freebsd-stable@FreeBSD.ORG Subject: Re: pthread_kill() not killing thread In-Reply-To: <20000324191602.A38647@threads.polyesthetic.msg> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 24 Mar 2000, Thimble Smith wrote: > On Fri, Mar 24, 2000 at 06:07:30PM -0500, Daniel Eischen wrote: > >My "interpretation" of the POSIX spec was that intra-process signals > >sent via pthread_kill() were treated differently than if the signal was > >sent to the process. I'll have to go back and re-read the POSIX spec -- > >perhaps I misunderstood it. > > > >At any rate, FreeBSDs threads implementation of pthread_kill() will > >not have the same effect as kill(2) -- the process will not be terminated > >by issuing a pthread_kill(thrd, SIGTERM) to a thread. Signals sent > >to threads via pthread_kill will invoke a signal handler if it is > >installed and will interrupt the thread from its current operation > >(returning -1 with EINTR). This all assumes that the thread isn't > >masking the signal, and that the handler isn't installed with SA_RESTART. > > OK. Thanks. What I'm really trying to do is figure out why > MySQL will hang if you try to shut it down when there is a > connection open to it. You then have to kill the mysqld > process with -9 in order to get rid of it. :( > > There's a program in the source distribution that tests the > thread signal handling: mysys/test_thr_alarm. It hangs in > a similar way. I'm trying to figure out why. > > So, if anybody knows threads well and also has MySQL on their > box, and feels like checking it out, I'd be happy. I'm sure > I'll figure it out eventually (and it'll be worth it to learn > more about threads), but if anybody can do it in a few seconds > I'd appreciate it. I'll try to take a look at it. I have an older version of mysql installed (from ports) which I use to verify that basic connections still work. I'm having problems staying current on my laptop because FreeBSDs buildworld has become so bloat^H^H^H^H^Hneedy of disk space. It may be a bit before I can get a larger disk drive or install over NFS, but I will try to look at this as soon as possible. Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message