From owner-freebsd-bugs@FreeBSD.ORG Wed Mar 24 12:10:32 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A1D816A4EE for ; Wed, 24 Mar 2004 12:10:31 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 153DB43D49 for ; Wed, 24 Mar 2004 12:10:20 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i2OKAJbv007715 for ; Wed, 24 Mar 2004 12:10:19 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i2OKAJkr007714; Wed, 24 Mar 2004 12:10:19 -0800 (PST) (envelope-from gnats) Resent-Date: Wed, 24 Mar 2004 12:10:19 -0800 (PST) Resent-Message-Id: <200403242010.i2OKAJkr007714@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Mike Hibler Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7FDD316A4CF for ; Wed, 24 Mar 2004 12:06:30 -0800 (PST) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 778BC43D1D for ; Wed, 24 Mar 2004 12:06:30 -0800 (PST) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.10/8.12.10) with ESMTP id i2OK6U72090459 for ; Wed, 24 Mar 2004 12:06:30 -0800 (PST) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.10/8.12.10/Submit) id i2OK6Uqu090458; Wed, 24 Mar 2004 12:06:30 -0800 (PST) (envelope-from nobody) Message-Id: <200403242006.i2OK6Uqu090458@www.freebsd.org> Date: Wed, 24 Mar 2004 12:06:30 -0800 (PST) From: Mike Hibler To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: bin/64664: Reboot command needs to protect itself from signals X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Mar 2004 20:10:32 -0000 >Number: 64664 >Category: bin >Synopsis: Reboot command needs to protect itself from signals >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Mar 24 12:10:19 PST 2004 >Closed-Date: >Last-Modified: >Originator: Mike Hibler >Release: 4.7-RELEASE >Organization: University of Utah >Environment: FreeBSD e.rroutetest.testbed.emulab.net 4.7-RELEASE FreeBSD 4.7-RELEASE #0: Thu Feb 5 19:56:28 MST 2004 root@node.fastbuild.testbed.emulab.net:/usr/src/sys/compile/TESTBED-LINKDELAY i386 >Description: Invoking system("/sbin/reboot") from within a perl script causes the reboot command to be killed along with all the other processes, after it has STOPed init but before it has done the reboot syscall. The result is that the system is terminally wedged. The issue is that /sbin/reboot is not protecting itself adequately from signals. It ignores SIGHUP, assuming that that is the worse thing its dying parent (or someone else) is going to try to do to it. But it appears that perl, or at least this script, propogates the SIGTERM signal it receives on to reboot. >How-To-Repeat: Doesn't happen all the time, its a timing thing. >Fix: In the window between when reboot SIGTSTPs init and when it does the reboot syscall, reboot had better not die. Thus it should block all possible signals during that window. >Release-Note: >Audit-Trail: >Unformatted: