From owner-freebsd-questions Fri Mar 29 09:31:09 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id JAA04186 for questions-outgoing; Fri, 29 Mar 1996 09:31:09 -0800 (PST) Received: from alpha.dsu.edu (ghelmer@alpha.dsu.edu [138.247.32.12]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id JAA04181 for ; Fri, 29 Mar 1996 09:31:06 -0800 (PST) Received: from localhost (ghelmer@localhost) by alpha.dsu.edu (8.7.5/8.7.3) with SMTP id LAA01087; Fri, 29 Mar 1996 11:30:56 -0600 (CST) Date: Fri, 29 Mar 1996 11:30:56 -0600 (CST) From: Guy Helmer To: owensc cc: questions list FreeBSD Subject: Re: orphaned proccess hogging CPU (e.g. pine) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Fri, 29 Mar 1996, owensc wrote: > Hi, > When users who telnet in to my FreeBSD server log of ungracefully (e.g. > by killing their local telnet program) they occasionally leave orphaned > process behind, despite the fact that I have -CLOCAL and HUPCL set when > they log in. Is there any thing else I should do to keep this from > occurring? > > Sometimes these orphaned process don't just hang around but spin their > wheels vigorously, chewing most available CPU time. I had a problem with > this in the past with the talk program, but lately I've been seeing it > with the pine email front end. > > Is this CPU-chewing a result of a programming boo-boo in Pine itself? Or > is there something system-wide that I should tweak to fix this? I don't > mind digging through the source but could use a pointer or two. Yes, there are a couple of problems in Pine 3.91 where it will hang in a loop and eat CPU. One well-known problem was in pine/ttyin.c, where it would loop and look for incoming data from the terminal. Another of the problems was particularly nasty: pine would set the signal handler for SIGSEGV to SIG_IGN (ignore) as it was preparing to exit, and then a bug (I hadn't taken the time to track down) made pine SIGSEGV over and over... I changed the relevant code in pine/signals.c to never ignore SIGSEGV or SIGTERM. I wasn't using the patches provided in the FreeBSD port of pine 3.91, so maybe those would have solved my SIGSEGV problem. I haven't seen either of these problems in pine 3.92 (just released), but I added my patch back into pine/signals.c just in case :-) I'm not sure if the FreeBSD port/mail/pine patches will apply to 3.92, though. > Charles Owens Email: owensc@enc.edu Guy Helmer, Dakota State University Computing Services - ghelmer@alpha.dsu.edu