Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Mar 2000 23:53:16 -0500 (EST)
From:      Daniel Eischen <eischen@vigrid.com>
To:        Thimble Smith <tim@mysql.com>
Cc:        freebsd-stable@FreeBSD.ORG
Subject:   Re: pthread_kill() not killing thread
Message-ID:  <Pine.SUN.3.91.1000325234520.5155A-100000@pcnet1.pcnet.com>
In-Reply-To: <20000324191602.A38647@threads.polyesthetic.msg>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.91.1000325234520.5155A-100000>