From nobody@FreeBSD.ORG Fri Nov 19 13:23:01 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id DA35614F3C; Fri, 19 Nov 1999 13:23:01 -0800 (PST)
Message-Id: <19991119212301.DA35614F3C@hub.freebsd.org>
Date: Fri, 19 Nov 1999 13:23:01 -0800 (PST)
From: hans.wander@mch.sbs.de
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: top and other programs run amok with FreeBSD3.3 (Release and Stable)
X-Send-Pr-Version: www-1.0

>Number:         14998
>Category:       misc
>Synopsis:       top and other programs run amok with FreeBSD3.3 (Release and Stable)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 19 13:30:00 PST 1999
>Closed-Date:    Fri Nov 19 22:26:42 PST 1999
>Last-Modified:  Fri Nov 19 22:30:29 PST 1999
>Originator:     Hans Wander
>Release:        3.3 Release (also exists with 3.3 STABLE)
>Organization:
Siemens Business Services
>Environment:
FreeBSD frodo.mch.sni.de 3.3-RELEASE FreeBSD 3.3-RELEASE #0:
Thu Sep 16 23:40:35 GMT 1999
jkh@highwing.cdrom.com:/usr/src/sys/compile/GENERIC  i386
>Description:
we have a major problem with our FreeBSD 3.3 boxes (they are
planned to be proxy servers)
 
Try the following commands and tell me your experiences (and
possibly a fix/workaround):
 
- telnet from a remote machine to your FreeBSD box
- login as ordinary user (not as root!)
- su (all following tasks are run under root account)
- run top
 
The process chain is now: telnetd - shell - su - top
the process owners are:    root     user    root root
 
Now kill the corresponding telnetd task from another root shell
and voila: telnetd has disappeared, but after some seconds
top sucks the CPU time 99% (on a single CPU machine)
 
Please don't ask "which fool would kill telnetd?"
exactly this happens, if you telnet from another FreeBSD box
in an xterm, then start "su" and "top" and finally kill the xterm 
without having killed the "top" task.
(there is this neat M$ish "X" button on the top right of the window :-(
top reports lots of IO errors in an endless loop (can be viewed with
truss)

I feel there's a major problem with FreeBSDs signal handling or
something
>How-To-Repeat:
telnet from a remote machine to your FreeBSD box
login as ordinary user (not as root!)
su (all following tasks are run under root account)
run top (or "more /etc/passwd")
Now kill the corresponding telnetd task from another root shell
and voila: telnetd has disappeared, but after some seconds
top (or more) sucks the CPU time 99% (on a single CPU machine)

>Fix:


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: sheldonh 
State-Changed-When: Fri Nov 19 22:26:42 PST 1999 
State-Changed-Why:  
Duplicate of PR 14932.  This issue is under investigation under that PR. 

You should probably know that high CPU utilization reported does not 
necessarily mean that if other processes needed CPPU time, they 
wouldn't get it.  If the machine is mostly idle, a spinning process 
will use the available CPU time, which is obviously "most" of it. :) 
>Unformatted:
