[Python-Dev] Status of thread cancellation

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Mar 20 00:52:19 CET 2007

Nick Maclaren wrote:
> You don't always SEE the stuck process - sometimes
> the 'kill -9' causes the pid to become invisible to ps etc., and
> just occasionally it can continue to use CPU until the system is
> rebooted.

If that happens, there's a bug in the kernel. A process
killed with -9 shouldn't be using *any* resources at all,
other than a tiny piece of kernel memory for its process
structure until it gets reaped.

> Sockets get jammed because they are used to connect to subprocesses
> or kernel threads, which in turn access unreliable I/O devices.

But it's not the *socket* which is jammed -- if you kill
the process on the other end of it, anything connected
to the socket will get EOF or SIGPIPE. (If you can't kill
the process on the other end, even with -9, then again you
have a kernel bug.)


More information about the Python-Dev mailing list