From owner-freebsd-bugs Fri Sep 14 17:40: 7 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id C93FC37B40E for ; Fri, 14 Sep 2001 17:40:00 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f8F0e0D41747; Fri, 14 Sep 2001 17:40:00 -0700 (PDT) (envelope-from gnats) Received: from theshell.com (arsenic.theshell.com [63.236.138.5]) by hub.freebsd.org (Postfix) with SMTP id 7DEEC37B40C for ; Fri, 14 Sep 2001 17:32:49 -0700 (PDT) Received: (qmail 37697 invoked from network); 15 Sep 2001 00:32:49 -0000 Received: from radium.theshell.com (root@63.236.138.3) by arsenic.theshell.com with SMTP; 15 Sep 2001 00:32:49 -0000 Received: (from pavalos@localhost) by radium.theshell.com (8.11.6/8.11.6) id f8F0Wnk22482; Fri, 14 Sep 2001 17:32:49 -0700 (PDT) (envelope-from pavalos) Message-Id: <200109150032.f8F0Wnk22482@radium.theshell.com> Date: Fri, 14 Sep 2001 17:32:49 -0700 (PDT) From: Peter Avalos Reply-To: Peter Avalos To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/30581: top(1) races when it loses its terminal Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 30581 >Category: bin >Synopsis: top(1) races when it loses its terminal >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Sep 14 17:40:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Peter Avalos >Release: FreeBSD 4.4-RC i386 >Organization: none >Environment: System: FreeBSD radium.theshell.com 4.4-RC FreeBSD 4.4-RC #0: Tue Aug 21 16:51:12 PDT 2001 pavalos@radium.theshell.com:/usr/obj/usr/src/sys/RADIUM i386 >Description: top(1) uses up all the cpu it can when it loses its terminal. >How-To-Repeat: Disconnect from an ssh session while running top as root. I can't get this to happen when run as a normal user. Everything working normally (terminal connected): root 23936 1.5 0.2 2096 1312 p8 S+ 5:22PM 0:00.21 top Now disconnect from the ssh session: root 23936 94.8 0.2 2096 1312 p8- R 5:22PM 3:12.76 top >Fix: I'm not sure. It looks like there's some read(2)'s that don't get their return values checked throughout the code, but I'm not sure if that will fix it. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message