From owner-freebsd-bugs@FreeBSD.ORG Fri Dec 12 02:00:24 2003 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 A6F0016A4CE for ; Fri, 12 Dec 2003 02:00:24 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 395AD43D1F for ; Fri, 12 Dec 2003 02:00:22 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) hBCA0MFR066839 for ; Fri, 12 Dec 2003 02:00:22 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id hBCA0McN066838; Fri, 12 Dec 2003 02:00:22 -0800 (PST) (envelope-from gnats) Resent-Date: Fri, 12 Dec 2003 02:00:22 -0800 (PST) Resent-Message-Id: <200312121000.hBCA0McN066838@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, Simun Mikecin Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3922016A4CE for ; Fri, 12 Dec 2003 01:50:29 -0800 (PST) Received: from mail.logos.hr (gates.logos.hr [213.149.47.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF2F343D39 for ; Fri, 12 Dec 2003 01:50:22 -0800 (PST) (envelope-from sime@logos.hr) Received: from localhost (localhost.logos.hr [127.0.0.1]) by mail.logos.hr (Postfix) with ESMTP id E67191CC79 for ; Fri, 12 Dec 2003 10:50:18 +0100 (CET) Received: from mail.logos.hr ([127.0.0.1]) by localhost (mail.logos.hr [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 88308-02-4 for ; Fri, 12 Dec 2003 10:50:15 +0100 (CET) Received: by mail.logos.hr (Postfix, from userid 34062) id 7FAE71CC85; Fri, 12 Dec 2003 10:50:15 +0100 (CET) Message-Id: <20031212095015.7FAE71CC85@mail.logos.hr> Date: Fri, 12 Dec 2003 10:50:15 +0100 (CET) From: Simun Mikecin To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/60175: 5.2-RC: disk errors cause panic in softupdates code X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Simun Mikecin List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2003 10:00:24 -0000 >Number: 60175 >Category: kern >Synopsis: 5.2-RC: disk errors cause panic in softupdates code >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Dec 12 02:00:21 PST 2003 >Closed-Date: >Last-Modified: >Originator: Simun Mikecin >Release: FreeBSD 5.2-RC i386 >Organization: >Environment: System: FreeBSD data.home.hr 5.2-RC FreeBSD 5.2-RC #0: Thu Dec 11 13:41:50 CET 2003 root@data.home.hr:/usr/obj/usr/src/sys/DATA i386 >Description: It looks softupdates code doesn't like disk errors of any kind. I get panic that says: "softdep_move_dependencies: need merge code" It can be found in /sys/ufs/ffs/ffs_softdep.c This is what I tried: 1) I have a floppy that has some bad sectors. Making UFS2 filesystem with softupdates enabled on that floppy, and trying to write some files to it causes a panic (before that I get few error reports in dmesg). If I try it with softupdates disabled I only get errors in dmesg and partially corrupted filesystem, but no panic. 2) I have a DVD media with UFS2 filestem on it (tunefs -p says softupdates are enabled). I put it in a DVD-ROM drive (that can only read), mount it read-only and everything works OK. But If I don't use '-ur' as a mount option it will be mounted read-write (which is default). System will even let me write files to the mounted file system (at least it looks that way, nothing can really be written to the media). After some time errors show in dmesg saying that WRITE operation is not permitted, but after some time I get a panic. If I try the same thing with DVD media that was written with softupdates disabled, no panic occurs. 3) I tried using DVD+RW media on ATAPI DVD burner by using bsdlabel/newfs/mount. Doing it by using "acd" device implemented in atapi-cd.c works ok. But using it by using SCSI emulation layer (device "cd") atapi-cam.c produces errors ("Logical unit not ready, long write in progress") when writing to the media (I think this is a well known bug by now). So I suppose it then behaves to the VFS/FFS layer like a media with bad sectors. Again it panics after some time of writing to it only when softupdates are enabled. Those three scenarios I tried are not very important but I suppose it would be the same with a hard disk that has some sectors gone bad, or that has trouble reading/writing of any kind, which would be a very bad thing. >How-To-Repeat: Try one of the scenarios from above. >Fix: Disable softupdates, until softupdates code gets better. >Release-Note: >Audit-Trail: >Unformatted: