NetBSD Problem Report #53815

From bouyer@antioche.eu.org  Thu Dec 27 08:25:22 2018
Return-Path: <bouyer@antioche.eu.org>
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 "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 058B67A10D
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 27 Dec 2018 08:25:21 +0000 (UTC)
Message-Id: <20181227082516.7BE3F27E0@rochebonne.antioche.eu.org>
Date: Thu, 27 Dec 2018 09:25:16 +0100 (CET)
From: bouyer@antioche.eu.org
Reply-To: bouyer@antioche.eu.org
To: gnats-bugs@NetBSD.org
Subject: vnd+wapbl+snapshots panic
X-Send-Pr-Version: 3.95

>Number:         53815
>Category:       kern
>Synopsis:       vnd+wapbl+snapshots panic
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 27 08:30:00 +0000 2018
>Last-Modified:  Mon Dec 31 12:25:00 +0000 2018
>Originator:     Manuel Bouyer
>Release:        HEAD as of yesterday
>Organization:
>Environment:
NetBSD/amd64 XEN3_DOM0, built from yesterday's sources
>Description:
	While running a build.sh release in a domU, the dom0 paniced:
login: [ 34672.3034884] panic: kernel diagnostic assertion "rw_lock_held(&wl->wl
_rwlock)" failed: file "/dsk/l1/misc/bouyer/HEAD/clean/src/sys/kern/vfs_wapbl.c$
, line 2027                                                                     
[ 34672.3034884] cpu0: Begin traceback...                                       
[ 34672.3134769] vpanic() at netbsd:vpanic+0x152                                
[ 34672.3134769] kern_assert() at netbsd:kern_assert+0x48                       
[ 34672.3134769] wapbl_add_buf() at netbsd:wapbl_add_buf+0x147                  
[ 34672.3134769] bdwrite() at netbsd:bdwrite+0xbd                               
[ 34672.3134769] ffs_alloccg() at netbsd:ffs_alloccg+0x4cc
[ 34672.3134769] ffs_hashalloc() at netbsd:ffs_hashalloc+0x2b
[ 34672.3134769] ffs_alloc() at netbsd:ffs_alloc+0x164
[ 34672.3134769] ffs_balloc() at netbsd:ffs_balloc+0x172b
[ 34672.3134769] wrsnapblk() at netbsd:wrsnapblk+0x4f
[ 34672.3134769] ffs_copyonwrite() at netbsd:ffs_copyonwrite+0x1f0
[ 34672.3134769] fscow_run() at netbsd:fscow_run+0xda
[ 34672.3134769] spec_strategy() at netbsd:spec_strategy+0x8a
[ 34672.3234728] VOP_STRATEGY() at netbsd:VOP_STRATEGY+0x5c
[ 34672.3234728] vndthread() at netbsd:vndthread+0x3a5
[ 34672.3234728] cpu0: End traceback...
[ 34672.3234728] fatal breakpoint trap in supervisor mode

I guess it hapenned while the nightly daily run in the dom0, which runs a
fsck_ffs -X.

>How-To-Repeat:
	write to a vnd device while running fsck_ffs -X on the underlying
	filesystem ? 
>Fix:
	unkown

>Audit-Trail:
From: "J. Hannken-Illjes" <hannken@eis.cs.tu-bs.de>
To: "gnats-bugs@netbsd.org" <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: kern/53815: vnd+wapbl+snapshots panic
Date: Mon, 31 Dec 2018 13:21:54 +0100

 --Apple-Mail=_F0E01141-AB66-47EE-8085-0371A49420B2
 Content-Transfer-Encoding: 7bit
 Content-Type: text/plain;
 	charset=us-ascii

 Usually VOP_STRATEGY() gets called from inside the file
 system.  Here the wapbl lock has already been taken.

 When vnd(4) is using VOP_STRATEGY() on a wapbl enabled
 file system this lock is not taken.

 I don't see a solution that works well in both cases.

 Workaround is to disable wapbl on file systems used
 as vnd backing store or configure the vnd device
 with "-i" to force regular file i/o.

 --
 J. Hannken-Illjes - hannken@eis.cs.tu-bs.de - TU Braunschweig

 --Apple-Mail=_F0E01141-AB66-47EE-8085-0371A49420B2
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
 	filename=signature.asc
 Content-Type: application/pgp-signature;
 	name=signature.asc
 Content-Description: Message signed with OpenPGP

 -----BEGIN PGP SIGNATURE-----

 iQEzBAEBCAAdFiEE2BL3ha7Xao4WUZVYKoaVJdNr+uEFAlwqCeIACgkQKoaVJdNr
 +uHLwAf+LLrdN/5lw+ADh/83deto7MEhEfN+IlGnDeJQXYTiTlonH4+QtHLcRy6z
 gdv9x6+q4BXnk0LLeknlsYe4u2mTE7b60og4m97/5bB5ozl+ku3clVJDmT1ngawS
 XEObr3o1k+EOBkMceBRIF5iugmGlBjdQVfzhOdkOu2r1bSFDAvIZlG7nDW8TrGdF
 P1ny+J4N5WX7sr3xCZZDiROsgr2+dKetyypWQrkXLERTPQ4IfL3OmK2VG0D5aQ1G
 ENw3tqvmx7dyUzk8wsKqZTnwN5b9hG1xrZ37IdNtJabuGj9Pp1Xhq+HkiOcHSwh7
 TlGKAonyP17CTuS2t9kd9T1yqG76mA==
 =HhHg
 -----END PGP SIGNATURE-----

 --Apple-Mail=_F0E01141-AB66-47EE-8085-0371A49420B2--

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.