Re: can't kill fd server

From: Andy Valencia <vandys_at_nospam.org>
Date: Thu May 21 1998 - 10:28:27 PDT

[David Jeske <jeske@home.chat.net> writes:]

>I've seen this problem in the past with "unkillable servers" I'm not sure
>if it was fd or not. However, I just recently noticed the same thing once
>with fd. Not only can you not kill fd, but you can quickly create a "chain
>of no-death" as trying to kill the "kill fd" process will also hang.

Yes, I've looked into it, and it poses an interesting issue. The problem
occurs with multi-threaded servers where threads talk to each other with
kernel IPC. What happens is that a client thread is blocked waiting for an
answer from the server, and the server thread dies without unblocking this
client. If the server were in a different process, the exit of the last
thread causes all ports to be torn down, which would unblock the thread.
However, in this case, the waiting thread is in the same process, so the
server port is not scrubbed, and a deadlock results.

I'm looking at a change so that server ports are related to the thread which
created them. Thus, it only requires the death of the server thread to
cause a port to be scrubbed, which breaks this deadlock. This should work
for most server which come to mind, but I want to look at some "pool of
thread" servers which exist. The KA9Q port comes to mind, for instance.

                                                                Andy
Received on Thu May 21 06:44:32 1998

This archive was generated by hypermail 2.1.8 : Thu Sep 22 2005 - 15:12:43 PDT