From owner-freebsd-bugs@FreeBSD.ORG Wed Feb 14 05:50:04 2007 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D312416A41F for ; Wed, 14 Feb 2007 05:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id ACA9213C4A3 for ; Wed, 14 Feb 2007 05:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l1E5o4hl088311 for ; Wed, 14 Feb 2007 05:50:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l1E5o4lX088310; Wed, 14 Feb 2007 05:50:04 GMT (envelope-from gnats) Resent-Date: Wed, 14 Feb 2007 05:50:04 GMT Resent-Message-Id: <200702140550.l1E5o4lX088310@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, leres@ee.lbl.gov (Craig Leres) Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9894316A402 for ; Wed, 14 Feb 2007 05:47:31 +0000 (UTC) (envelope-from leres@ee.lbl.gov) Received: from fun.ee.lbl.gov (fun.ee.lbl.gov [131.243.1.81]) by mx1.freebsd.org (Postfix) with ESMTP id 6F2A913C46B for ; Wed, 14 Feb 2007 05:47:31 +0000 (UTC) (envelope-from leres@ee.lbl.gov) Received: from fun.ee.lbl.gov (localhost [127.0.0.1]) by fun.ee.lbl.gov (8.14.0/8.14.0) with ESMTP id l1E5Yrfs085093 for ; Tue, 13 Feb 2007 21:34:53 -0800 (PST) Received: from fun.ee.lbl.gov (leres@localhost) by fun.ee.lbl.gov (8.14.0/8.14.0/Submit) with ESMTP id l1E5Yr5D085089 for ; Tue, 13 Feb 2007 21:34:53 -0800 (PST) Message-Id: <200702140534.l1E5Yr5D085089@fun.ee.lbl.gov> Date: Tue, 13 Feb 2007 21:34:53 -0800 From: leres@ee.lbl.gov (Craig Leres) To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/109152: [rp] RocketPort panic from device_unbusy() X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Feb 2007 05:50:04 -0000 >Number: 109152 >Category: kern >Synopsis: [rp] RocketPort panic from device_unbusy() >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Feb 14 05:50:04 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Craig Leres >Release: FreeBSD 6.2-RELEASE i386 >Organization: Lawrence Berkeley National Laboratory >Environment: % uname -a FreeBSD ee.lbl.gov 6.2-RELEASE FreeBSD 6.2-RELEASE #1: Mon Jan 15 11:31:32 PST 2007 leres@fox.ee.lbl.gov:/usr/src/6.2-RELEASE/sys/i386/compile/LBLSMP i386 rp0: port 0x3000-0x30ff irq 19 at device 7.0 on pci2 RocketPort0 (Version 3.02) 32 ports. >Description: Removing a devfs symlink can cause a panic if a program had that symlink open and then exits. I use the comms/conserver port to manage a bunch of serial lines connected to a 32 port RocketPort config. To keep track of what each line is connected to, I create symlinks via "link" lines in devfs.conf. I disovered that if I remove link lines from devfs.conf, update devfs and then kill off a conserver that has one or more of the obsolete links open, the system will panic. >How-To-Repeat: Append a line to devfs.conf: link cuaR00 test Update devfs and verify the new symlink: # /etc/rc.d/devfs restart # ls -l /dev/test /dev/cuaR00 crw-rw---- 1 uucp dialer 0, 40 Feb 12 19:45 /dev/cuaR00 lrwxr-xr-x 1 root wheel 6 Feb 12 19:45 /dev/test -> cuaR00 Add a line to conserver.cf: test:/dev/test:9600p:/var/console/test.log:0 Startup conserver. Remove out the link line previously added to devfs.conf. Update devfs again. Note that the /dev/test symlink still exists. Kill conserver. The system panics with: device_unbusy: called for non-busy device rp0 kgdb shows: (kgdb) bt #0 0xc0692c96 in doadump () #1 0xc06931f2 in boot () #2 0xc0693519 in panic () #3 0xc06a9304 in device_unbusy () #4 0xc05ca8e9 in rpclose () #5 0xc06c6617 in ttyclose () #6 0xc066878b in giant_close () #7 0xc0644876 in devfs_close () #8 0xc08ae164 in VOP_CLOSE_APV () #9 0xc06fa8c6 in vn_close () #10 0xc06fb836 in vn_closefile () #11 0xc06448b7 in devfs_close_f () #12 0xc0672a04 in fdrop_locked () #13 0xc0672951 in fdrop () #14 0xc0670eef in closef () #15 0xc066e04d in close () #16 0xc08998f3 in syscall () #17 0xc08853df in Xint0x80_syscall () #18 0x00000033 in ?? () Previous frame inner to this frame (corrupt stack?) >Fix: >Release-Note: >Audit-Trail: >Unformatted: