From: Dave Butenhof <butenhof@zko.dec.com>
Subject: Re: HOW-TO KILL THREADS
Date: 1997/10/28 [thread overview]
Message-ID: <3455C9DB.CDC9DE0@zko.dec.com> (raw)
In-Reply-To: 632s9v$r99$0@206.165.146.124
Richard Spangenberg wrote:
>
> We are trying to install a database (MYSQL) in a Dec/ALpha OSF1 3.2 machine.
> Everything is up and running but we are concerned that there appears to be
> do way to stop a thread if it starts to eat up CPU time.
>
> The problem is that pthread_kill doesn't exits. Is it possible to send a
> signal to a specific thread to abort a read or a select?
>
> Thank you for any assistance you may be able to give.
You really can't kill a "runaway" thread and hope to regain control.
Remember that all the threads in the process run the same code, and
access the same data. If one thread is doing something wrong, and you
don't know why, you CANNOT assume that the other threads are "safe".
Kill the process.
DCE threads, the loose implementation of POSIX draft 4 threads that's
part of DEC OSF/1 3.2, didn't have any way to send a signal to a
particular thread. The concept was not supported either by the draft
standard nor by the implementation. You can't even use cancellation,
because DCE threads didn't have sufficient integration with the kernel
to make kernel blocking functions into cancellation points.
So the answer is, "no, you can't". And furthermore, even if you were on
a Digital UNIX 4.0 system, which has POSIX threads, with pthread_kill
and cancellable I/O functions, you shouldn't WANT to. Once something is
wrong with the PROCESS, destroying a misbehaving thread is usually just
removing a symptom of the real problem.
/---------------------------[ Dave Butenhof ]--------------------------\
| Digital Equipment Corporation butenhof@zko.dec.com |
| 110 Spit Brook Rd ZKO2-3/Q18 http://members.aol.com/drbutenhof |
| Nashua NH 03062-2698 http://www.awl.com/cseng/titles/0-201-63392-2/ |
\-----------------[ Better Living Through Concurrency ]----------------/
next prev parent reply other threads:[~1997-10-28 5:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-10-27 5:00 HOW-TO KILL THREADS Richard Spangenberg
1997-10-28 5:00 ` Dave Butenhof [this message]
1997-10-28 5:00 ` Brian Silver
1997-10-29 5:00 ` Richard Spangenberg
1997-11-03 5:00 ` Dave Butenhof
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox