From owner-freebsd-bugs Wed Jun 27 14:20: 9 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 866FA37B405 for ; Wed, 27 Jun 2001 14:20:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f5RLK1X77904; Wed, 27 Jun 2001 14:20:01 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id E250E37B401 for ; Wed, 27 Jun 2001 14:15:14 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f5RLFER77377; Wed, 27 Jun 2001 14:15:14 -0700 (PDT) (envelope-from nobody) Message-Id: <200106272115.f5RLFER77377@freefall.freebsd.org> Date: Wed, 27 Jun 2001 14:15:14 -0700 (PDT) From: Umesh Krishnaswamy To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/28465: Enabling softupdates on a clean but active filesystem can panic the kernel 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: 28465 >Category: kern >Synopsis: Enabling softupdates on a clean but active filesystem can panic the kernel >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jun 27 14:20:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Umesh Krishnaswamy >Release: 4.2-STABLE >Organization: Juniper Networks >Environment: >Description: If you do a bunch of reads and writes to a filesystem, then mount it rdonly and enable softupdates, tunefs will allow you to do so, but the kernel will panic shortly afterwords with the following stack trace. # tunefs -n enable /altroot tunefs: soft updates setp anic: softdep_deallocate_dependencies: dangling deps softdep_deallocate_dependencies(c0368000,dcde5c98,c01b417a,d01cd00c,d01cd00c) at softdep_deallocate_dependencies+0x16 softdep_deallocate_dependencies(d01cd00c) at softdep_deallocate_dependencies+0x16 brelse(d01cd00c,d01cd00c) at brelse+0x6a vinvalbuf(dcd2ee40,0,c41c9800,dcd92400,0) at vinvalbuf+0x24f ffs_reload(c3b4be00,c41c9800,dcd92400,0,c3b4be00) at ffs_reload+0x51 ffs_mount(c3b4be00,4810890f,bfbff83c,dcde5e80,dcd92400) at ffs_mount+0x163 mount(dcd92400,dcde5f80,bfbff83c,bfbffdf9,8049517) at mount+0x4ef syscall2(2f,2f,2f,8049517,bfbffdf9) at syscall2+0x1fd Xint0x80_syscall() at Xint0x80_syscall+0x25 Debugger("panic") Stopped at Debugger+0x40: pushl $-0x1 The filesystem activity has a bunch of unwritten buffers. When soft updates is enabled in this state, the iodone routine i >How-To-Repeat: fs is the name of a filesystem. If you do these four steps, you will panic the system. mount /fs tar cvfz foo.tgz /usr/lib mount -u -o rdonly /fs tunefs -n enable /fs You will trip into this problem after a bunch of tries. I can successfully reproduce this approx 20% of the time. >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message