NetBSD Problem Report #51591

From bjjl@rpi.pocketservices.de  Tue Nov  1 08:40:14 2016
Return-Path: <bjjl@rpi.pocketservices.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id B2EAE7A211
	for <gnats-bugs@gnats.NetBSD.org>; Tue,  1 Nov 2016 08:40:14 +0000 (UTC)
Message-Id: <20161101072040.4B1886CDC9@rpi.pocketservices.de>
Date: Tue,  1 Nov 2016 08:20:40 +0100 (CET)
From: mail@benjaminlorenz.de
To: gnats-bugs@NetBSD.org
Subject: NetBSD 7.0.1/evbarm & USB FS errors
X-Send-Pr-Version: 3.95

>Number:         51591
>Category:       port-evbarm
>Synopsis:       NetBSD 7.0.1/evbarm & USB FS errors
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-evbarm-maintainer
>State:          feedback
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 01 08:45:00 +0000 2016
>Closed-Date:    
>Last-Modified:  Sat Oct 29 14:15:41 +0000 2022
>Originator:     Benjamin Lorenz
>Release:        NetBSD 7.0.1
>Organization:

>Environment:


System: NetBSD rpi.pocketservices.de 7.0.1 NetBSD 7.0.1 (RPI) #1: Sat Jun 4 10:37:02 CEST 2016 root@rpi.pocketservices.de:/usr/obj/sys/arch/evbarm/compile/RPI evbarm
Architecture: earm
Machine: evbarm
>Description:
Compiled wedge support in, using usb stick:

umass0 at uhub1 port 3 configuration 1 interface 0
umass0: Intenso Intenso Micro Line, rev 2.00/1.00, addr 5
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0: <Intenso, Micro Line, 1.00> disk removable
sd0: fabricating a geometry
sd0: 30535 MB, 30535 cyl, 64 head, 32 sec, 512 bytes/sect x 62535680 sectors
sd0: fabricating a geometry
sd0: GPT GUID: 0b604279-6ee1-4d8b-bb77-10a9c63d196a
dk0 at sd0: 438D231D-68DF-450C-B9D7-68F27B839EA
dk0: 61863856 blocks at 409640, type: ffs
boot device: ld0

When copying a large file to the stick, after around 1 GB the following exception is raised, and the RPI reboots:

start = 11788, len = 1, fs = /mnt/stick
offset=3086 3086
cg 117
panic: ffs_alloccg: map corrupted
cpu0: Begin traceback...
0x97d479f4: netbsd:db_panic+0xc
0x97d47a24: netbsd:vpanic+0x134
0x97d47a3c: netbsd:snprintf
0x97d47a8c: netbsd:ffs_mapsearch+0x240
0x97d47ad4: netbsd:ffs_alloccgblk.isra.3+0xb0
0x97d47b2c: netbsd:ffs_alloccg+0x4e4
0x97d47b6c: netbsd:ffs_hashalloc+0x34
0x97d47bc4: netbsd:ffs_alloc+0x1c0
0x97d47cf4: netbsd:ffs_balloc+0x1bf0
0x97d47d54: netbsd:ufs_gop_alloc+0x104
0x97d47e24: netbsd:ffs_write+0x5a8
0x97d47e4c: netbsd:VOP_WRITE+0x38
0x97d47e7c: netbsd:vn_write+0xd4
0x97d47ed4: netbsd:dofilewrite+0x98
0x97d47f04: netbsd:sys_write+0x6c
0x97d47f74: netbsd:syscall+0x8c
0x97d47fac: netbsd:swi_handler+0x94
cpu0: End traceback...

dump to dev 92,1 not possible

rpi% cp -p ~/F2016102* .
Write failed: Broken pipe
[machine was rebooting]
rpi% ls -l /mnt/stick/backup/workspace 
total 1168560
-rw-r--r--  1 bjjl  wheel  1196294144 Oct 30 09:58 F20161022T230000Z.zip
rpi% ls -lh /mnt/stick/backup/workspace
total 1.1G
-rw-r--r--  1 bjjl  wheel  1.1G Oct 30 09:58 F20161022T230000Z.zip

Maybe related to a bug which was fixed earlier on amd64? Id 50324, which 
showed this stack trace (using virtio drives on a cloud server):

ldstart() at netbsd:ldstart+0x6b 
ldstrategy() at netbsd:ldstrategy+0x101 
bdev_strategy() at netbsd:bdev_strategy+0x5b 
spec_strategy() at netbsd:spec_strategy+0x2c 
VOP_STRATEGY() at netbsd:VOP_STRATEGY+0x33 
genfs_do_io() at netbsd:genfs_do_io+0x195 
genfs_gop_write() at netbsd:genfs_gop_write+0x52 
genfs_do_putpages() at netbsd:genfs_do_putpages+0x7ca 
VOP_PUTPAGES() at netbsd:VOP_PUTPAGES+0x3a 
ffs_write() at netbsd:ffs_write+0x354 
VOP_WRITE() at netbsd:VOP_WRITE+0x37 
vn_write() at netbsd:vn_write+0xec 
dofilewrite() at netbsd:dofilewrite+0x97 
sys_write() at netbsd:sys_write+0x5f 
syscall() at netbsd:syscall+0x9a 

>How-To-Repeat:

>Fix:


>Release-Note:

>Audit-Trail:
From: Benjamin Lorenz <inbox@benjaminlorenz.email>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-evbarm/51591: NetBSD 7.0.1/evbarm & USB FS errors
Date: Sat, 5 Nov 2016 09:33:34 +0100

 --=-QZfjP3LuN7XuNBAfNICq
 Content-Type: text/plain; charset="utf-8"
 Content-Transfer-Encoding: quoted-printable

 Another panic while deleting a file on the stick:



 dev =3D 0xa800, bno =3D 4160552959 bsize =3D 16384, size =3D 16384, fs =3D =
 /mnt/stick=20
 panic: ffs_blkfree: bad size=20
 cpu0: Begin traceback...=20
 0x9b22b97c: netbsd:db_panic+0xc=20
 0x9b22b9ac: netbsd:vpanic+0x134=20
 0x9b22b9c4: netbsd:snprintf=20
 0x9b22ba34: netbsd:ffs_check_bad_allocation+0x108=20
 0x9b22ba8c: netbsd:ffs_blkfree+0x84=20
 0x9b22bb44: netbsd:ffs_indirtrunc+0x308=20
 0x9b22bbfc: netbsd:ffs_indirtrunc+0x3e4=20
 0x9b22bd44: netbsd:ffs_truncate+0xe74=20
 0x9b22bda4: netbsd:ufs_truncate+0x12c=20
 0x9b22bdd4: netbsd:ufs_inactive+0x18c=20
 0x9b22bdf4: netbsd:VOP_INACTIVE+0x30=20
 0x9b22be2c: netbsd:vrelel+0x468=20
 0x9b22be5c: netbsd:ufs_remove+0xb4=20
 0x9b22be7c: netbsd:VOP_REMOVE+0x34=20
 0x9b22beec: netbsd:do_sys_unlinkat+0xec=20
 0x9b22bf04: netbsd:sys_unlink+0x24=20
 0x9b22bf74: netbsd:syscall+0x8c=20
 0x9b22bfac: netbsd:swi_handler+0x94=20
 cpu0: End traceback...


 Kernel was BTW compiled with these additional parameters:



 rpi% cat /home/bjjl/src/sys/arch/evbarm/conf/RPI.local=20
 # Wedge support=20
 options =C2=A0 =C2=A0 =C2=A0 =C2=A0 DKWEDGE_AUTODISCOVER=C2=A0 =C2=A0 # Aut=
 omatically add dk(4) instances=20
 options =C2=A0 =C2=A0 =C2=A0 =C2=A0 DKWEDGE_METHOD_GPT=C2=A0 =C2=A0 =C2=A0 =
 # Supports GPT partitions as wedges=20
 rpi%=C2=A0

 =

 --=-QZfjP3LuN7XuNBAfNICq
 Content-Type: text/html; charset="utf-8"

 <html><head></head><body>Another panic while deleting a file on the stick:<div><br></div><div><p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">dev = 0xa800, bno = 4160552959 bsize = 16384, size = 16384, fs = /mnt/stick</p>
 <p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">panic: ffs_blkfree: bad size</p>
 <p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">cpu0: Begin traceback...</p>
 <p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">0x9b22b97c: netbsd:db_panic+0xc</p>
 <p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">0x9b22b9ac: netbsd:vpanic+0x134</p>
 <p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">0x9b22b9c4: netbsd:snprintf</p>
 <p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">0x9b22ba34: netbsd:ffs_check_bad_allocation+0x108</p>
 <p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">0x9b22ba8c: netbsd:ffs_blkfree+0x84</p>
 <p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">0x9b22bb44: netbsd:ffs_indirtrunc+0x308</p>
 <p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">0x9b22bbfc: netbsd:ffs_indirtrunc+0x3e4</p>
 <p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">0x9b22bd44: netbsd:ffs_truncate+0xe74</p>
 <p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">0x9b22bda4: netbsd:ufs_truncate+0x12c</p>
 <p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">0x9b22bdd4: netbsd:ufs_inactive+0x18c</p>
 <p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">0x9b22bdf4: netbsd:VOP_INACTIVE+0x30</p>
 <p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">0x9b22be2c: netbsd:vrelel+0x468</p>
 <p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">0x9b22be5c: netbsd:ufs_remove+0xb4</p>
 <p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">0x9b22be7c: netbsd:VOP_REMOVE+0x34</p>
 <p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">0x9b22beec: netbsd:do_sys_unlinkat+0xec</p>
 <p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">0x9b22bf04: netbsd:sys_unlink+0x24</p>
 <p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">0x9b22bf74: netbsd:syscall+0x8c</p>
 <p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">0x9b22bfac: netbsd:swi_handler+0x94</p>
 <p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">cpu0: End traceback...</p></div><div><br></div><div>Kernel was BTW compiled with these additional parameters:</div><div><br></div><div><p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">rpi% cat /home/bjjl/src/sys/arch/evbarm/conf/RPI.local</p>
 <p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);"># Wedge support</p>
 <p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">options &nbsp; &nbsp; &nbsp; &nbsp; DKWEDGE_AUTODISCOVER&nbsp; &nbsp; # Automatically add dk(4) instances</p>
 <p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">options &nbsp; &nbsp; &nbsp; &nbsp; DKWEDGE_METHOD_GPT&nbsp; &nbsp; &nbsp; # Supports GPT partitions as wedges</p>
 <p style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo; background-color: rgb(235, 246, 255);">rpi%&nbsp;</p></div><div><br></div></body></html>
 --=-QZfjP3LuN7XuNBAfNICq--

State-Changed-From-To: open->feedback
State-Changed-By: jmcneill@NetBSD.org
State-Changed-When: Sat, 29 Oct 2022 14:15:41 +0000
State-Changed-Why:
Is this still an issue with NetBSD 9.x or -current?


>Unformatted:

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-2022 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.