From owner-freebsd-bugs@FreeBSD.ORG Sat Dec 18 19:50:35 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 F2A7716A4EF for ; Sat, 18 Dec 2004 19:50:34 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 510A443D54 for ; Sat, 18 Dec 2004 19:50:31 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBIJoV16087597 for ; Sat, 18 Dec 2004 19:50:31 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBIJoVeK087588; Sat, 18 Dec 2004 19:50:31 GMT (envelope-from gnats) Resent-Date: Sat, 18 Dec 2004 19:50:31 GMT Resent-Message-Id: <200412181950.iBIJoVeK087588@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, Christoph Mallon Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0768016A4CE for ; Sat, 18 Dec 2004 19:48:06 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id C44DD43D39 for ; Sat, 18 Dec 2004 19:48:05 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id iBIJm5iU062505 for ; Sat, 18 Dec 2004 19:48:05 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id iBIJm5qo062504; Sat, 18 Dec 2004 19:48:05 GMT (envelope-from nobody) Message-Id: <200412181948.iBIJm5qo062504@www.freebsd.org> Date: Sat, 18 Dec 2004 19:48:05 GMT From: Christoph Mallon To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: kern/75233: breaking fdformat /dev/fd0 resets device permissions and perhaps causes unkillable process 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: Sat, 18 Dec 2004 19:50:35 -0000 >Number: 75233 >Category: kern >Synopsis: breaking fdformat /dev/fd0 resets device permissions and perhaps causes unkillable process >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Dec 18 19:50:30 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Christoph Mallon >Release: FreeBSD 6.0-CURRENT >Organization: >Environment: FreeBSD tron.homeunix.org 6.0-CURRENT FreeBSD 6.0-CURRENT #1: Wed Dec 15 10:19:30 CET 2004 root@tron.homeunix.org:/usr/obj/usr/src/sys/KERNEL i386 >Description: I formated a bunch of 3.5" floppies the other day to check which have bad sectors. Every time I heard the typical bad sector sound from the floppy i stopped fdformat with ^C, after several disks this happend: %fdformat -y /dev/fd0 Processing VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV^C [put in next disk] %fdformat -y /dev/fd0 fdformat: open(/dev/fd0): Permission denied %ls -l /dev/fd0 crw-r----- 1 root operator 232, 0 16 Dez 21:41 /dev/fd0 %tail -1 /etc/devfs.conf perm fd0 0660 As you can see i set the permissions for fd0 to 660 in devfs.conf and suddenly they got reset to 640. /dev/console didn't show anything related to this. I set the permission back to 660 by hand and continued. A bit later this happend again and I set the permissions to 660 again. After that the following happend: %fdformat -y /dev/fd0 [floppy motor spins up] [hang for several minutes without any output] ^C [no reaction] top on another terminal showed me this: 75741 tron 76 0 1284K 536K GEOM t 0:00 0.00% 0.00% fdformat The process didn't react on kill -KILL. The floppy motor was still on. I tried to shut down my box (shutdown -h now) with the following result: [usual output] init: some processes would not die; ps axl advised [usual output] All buffers synced [no more output] Then the machine just hang without the usual uptime and "press any key to reboot" message while the floppy motor was still on. >How-To-Repeat: 1. chmod 660 /dev/fd0 2. fdformat /dev/fd0 3. break via ^C (not sure if a disk with bad sectors is necessary, probably not) 4. ls -l /dev/fd0 doesn't happen always, repeat 2-4 until it happens The problem with the unkillable process appeared only once and I didn't try to reproduce it, but i guess it happens after several iterations of setting the permissions back to proper values and continuing with fdformat. >Fix: >Release-Note: >Audit-Trail: >Unformatted: