From: Alan Cox (iiitac@swan.pyr)
Date: 09/16/93


From: iiitac@swan.pyr (Alan Cox)
Subject: Re: strange unix socket behaviour (term gurus read too pls)
Date: Thu, 16 Sep 1993 11:53:36 GMT

In article <c9108932.748158154@peach.newcastle.edu.au> c9108932@peach.newcastle.edu.au (Simon J Ferrett) writes:
>Hello - I just set up the alpha 13 kernel to see if it would
>fix up my unix socket weirdness, and it does - but only for a while?
ALPHA13 now uses NET2E4 which is a pity cos thats even worse than the old
NET code.
>just after a reboot I can 'netstat -x' and see the status of all the
>af_unix connections, however, eventually (after running some term clients
>usually) doing a 'netstat -x' produces a segmentation fault and a register
>dump. The seg fault happens in unix_get_info (from memory).
Yep I've seen this too. It seems to be once too many sockets build up. I guess
it passed the 4K internal limit on a /proc file. But it _should_ trap it.
>The reason Im concerned is that Im trying to modify the ftpd-diku
>sources to work over a term connection. It works fine, except that
>exenually (sooner or later) the 'connect' system call in terms
>'open_unix' function catches a SIGCHLD, gets interrupted and the
>program segfaults. Under pl13 it takes lonmger for this to happen,
>but it still does.
When term spawns a program and that program exits term gets a signal saying
it has exited. This interrupts the connect and then term breaks. Putting
a signal(SIGCHLD,SIG_IGN) before the connect sort of seems to work with 0.99.12
I can't get the 0.99.13ALPHA up for over 3 minutes so I can't test with that
(It is an alpha so ...)
>also - if I put a loop around the connect, so that if it fails, it tries again,
>it just loops indefinately, trying.
Once a connect is interrupted the socket seems to end up broken. I've been
chasing this with little success.

ALan