NetBSD Problem Report #57744

From www@netbsd.org  Sat Dec  2 16:36:22 2023
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 18C551A9239
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  2 Dec 2023 16:36:22 +0000 (UTC)
Message-Id: <20231202163621.22F4A1A923A@mollari.NetBSD.org>
Date: Sat,  2 Dec 2023 16:36:21 +0000 (UTC)
From: scole@sdf.org
Reply-To: scole@sdf.org
To: gnats-bugs@NetBSD.org
Subject: panic when formatting 2 usb flash drivers
X-Send-Pr-Version: www-1.0

>Number:         57744
>Category:       kern
>Synopsis:       panic when formatting 2 usb flash drivers
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 02 16:40:00 +0000 2023
>Originator:     scole
>Release:        10.0_RC1
>Organization:
>Environment:
NetBSD dstar.dstar.net 10.0_RC1 NetBSD 10.0_RC1 (GENERIC) #0: Sun Nov 12 11:23:07 PST 2023  scole@dstar.dstar.net:/home/scole/nbsd/cvs/10_0/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
I was newfs'ing 2 large USB flash drives at the same time.  This system locked up briefly and then paniced:

/netbsd: [ 863605.5107638] umass0 at uhub1 port 10 configuration 1 interface 0
/netbsd: [ 863605.5107638] umass0: USB (0x048d) Disk 2.0 (0x1234), rev 2.00/2.00, addr 60
/netbsd: [ 863605.5107638] umass0: using SCSI over Bulk-Only
/netbsd: [ 863605.5207639] scsibus0 at umass0: 2 targets, 1 lun per target
/netbsd: [ 863605.5207639] sd0 at scsibus0 target 0 lun 0: <VendorCo, ProductCode, 2.00> disk removable
/netbsd: [ 863605.5207639] sd0: fabricating a geometry
/netbsd: [ 863605.5207639] sd0: 976 GB, 1000000 cyl, 64 head, 32 sec, 512 bytes/sect x 2048000000 sectors
/netbsd: [ 863605.5207639] sd0: fabricating a geometry
syslogd[1265]: restart
/netbsd: [ 863878.0224298] ufs_inactive: unlinked ino 60905472 on "/exports/fudisk" has non zero size ffffffffffffffff or blocks ffffffff with allerror 0
/netbsd: [ 863878.0224298] panic: ufs_inactive: dirty filesystem?
/netbsd: [ 863878.0224298] cpu0: Begin traceback...
/netbsd: [ 863878.0224298] vpanic() at netbsd:vpanic+0x183
/netbsd: [ 863878.0324298] panic() at netbsd:panic+0x3c
/netbsd: [ 863878.0324298] ufs_inactive() at netbsd:ufs_inactive+0x167
/netbsd: [ 863878.0324298] VOP_INACTIVE() at netbsd:VOP_INACTIVE+0x3c
/netbsd: [ 863878.0324298] vrelel() at netbsd:vrelel+0x154
/netbsd: [ 863878.0324298] do_sys_statat() at netbsd:do_sys_statat+0xd6
/netbsd: [ 863878.0324298] sys___lstat50() at netbsd:sys___lstat50+0x25
/netbsd: [ 863878.0324298] syscall() at netbsd:syscall+0x1fc
/netbsd: [ 863878.0324298] --- syscall (number 441) ---
/netbsd: [ 863878.0324298] netbsd:syscall+0x1fc:
/netbsd: [ 863878.0324298] cpu0: End traceback...
/netbsd: 

I don't know if it is feasible but it would have been nice just to get an error in this case instead a full blown panic.  I believe one of the usb drives was bad which caused the failure

>How-To-Repeat:
I think this may be very difficult to reproduce, but newfs two usb drives at same time when one is bad.
>Fix:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.