Path: utzoo!utgpu!water!watmath!clyde!burl!codas!cpsc6a!rtech!llama!jas From: jas@llama.rtech.UUCP (Jim Shankland) Newsgroups: comp.unix.wizards Subject: Re: System crash when using sockets Message-ID: <1543@rtech.UUCP> Date: 7 Jan 88 17:04:54 GMT References: <88@cui.UUCP> Sender: news@rtech.UUCP Reply-To: jas@llama.UUCP (Jim Shankland) Organization: Relational Technology, Inc. Alameda, CA Lines: 24 In article <88@cui.UUCP> spahni@cui.UUCP (SPAHNI Stephane) writes: >I have a question about sockets on Unix: I tried to use a socket between >two processes, and regularly crash the system (i.e. the system is looping >somewhere in the kernel and is doing nothing else !). The only way to >recover is to halt the system (^P HALT on Vax, L1-A on Sun) and reboot >it ! Looks like a kernel bug I've encountered before. Somewhere in the UNIX domain socket code are lines to this effect: /* Close any half-open connections of an exiting process. */ while (the list of half-open connections != NULL) soclose( head-of-list ); This loop has the property that it will either execute not at all, or forever, since the list pointer is not advanced. Solution (well, workaround): user Internet domain sockets instead of UNIX domain sockets. They're only half as fast, even intra-machine, but they DO work. Jim Shankland ..!ihnp4!cpsc6a!\ sun!rtech!jas .!ucbvax!mtxinu!/