NetBSD Problem Report #58117
From Manuel.Bouyer@lip6.fr Fri Apr 5 10:47:58 2024
Return-Path: <Manuel.Bouyer@lip6.fr>
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 ED59A1A9239
for <gnats-bugs@gnats.NetBSD.org>; Fri, 5 Apr 2024 10:47:57 +0000 (UTC)
Message-Id: <20240405104741.C036F10373@armandeche.soc.lip6.fr>
Date: Fri, 5 Apr 2024 12:47:41 +0200 (CEST)
From: Manuel.Bouyer@lip6.fr
Reply-To: Manuel.Bouyer@lip6.fr
To: gnats-bugs@NetBSD.org
Subject: panic: kernel diagnostic assertion "vp->v_size <= vp->v_writesize"
X-Send-Pr-Version: 3.95
>Number: 58117
>Notify-List: riastradh
>Category: kern
>Synopsis: panic: kernel diagnostic assertion "vp->v_size <= vp->v_writesize
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: kern-bug-people
>State: feedback
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Apr 05 10:50:00 +0000 2024
>Closed-Date:
>Last-Modified: Sun Apr 07 20:45:01 +0000 2024
>Originator: Manuel Bouyer
>Release: NetBSD 10.0
>Organization:
>Environment:
System: NetBSD xen1.soc.lip6.fr 10.0 NetBSD 10.0 (ADMIN_DOM0) #10: Thu Apr 4 22:06:53 CEST 2024 bouyer@armandeche.soc.lip6.fr:/local/armandeche1/tmp/build/amd64/obj/local/armandeche2/netbsd-10/src/sys/arch/amd64/compile/ADMIN_DOM0 amd64
Architecture: x86_64
Machine: amd64
>Description:
While rsyncing large files from one filesystem to another (both local)
I get
[ 265.1168757] panic: kernel diagnostic assertion "vp->v_size <= vp->v_writesize" failed: file "/local/armandeche2/netbsd-10/src/sys/miscfs/genfs/genfs_io.c", line 1450
[ 265.1168757] cpu0: Begin traceback...
[ 265.1269299] vpanic() at netbsd:vpanic+0x177
[ 265.1269299] kern_assert() at netbsd:kern_assert+0x4b
[ 265.1269299] genfs_do_io() at netbsd:genfs_do_io+0x376
[ 265.1269299] genfs_gop_write() at netbsd:genfs_gop_write+0x52
[ 265.1269299] genfs_do_putpages() at netbsd:genfs_do_putpages+0x858
[ 265.1269299] VOP_PUTPAGES() at netbsd:VOP_PUTPAGES+0x3d
[ 265.1269299] uvm_pageout() at netbsd:uvm_pageout+0x23d
[ 265.1269299] cpu0: End traceback...
I can easily reproduce this panic, but it doens't always occur at the
same place in the copy (not even on the same files).
The files are vnd-backed Xen virtual disks.
I use
rsync -avhHS --progress
so the target files are probably sparse. The target filesystem
is FFSv2 with 64k/8k blocks/fragments, with no other mount options
(no log, async or extended attributes). The source fileystem
is mounted read-only. fsck -f doens't find any problem for both
filesystems.
Without -S I could complete the copy so it seems related to
writing sparse files.
>How-To-Repeat:
See above.
>Fix:
please
>Release-Note:
>Audit-Trail:
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/58117 CVS commit: src/sys
Date: Fri, 5 Apr 2024 13:05:41 +0000
Module Name: src
Committed By: riastradh
Date: Fri Apr 5 13:05:41 UTC 2024
Modified Files:
src/sys/miscfs/genfs: genfs_io.c
src/sys/uvm: uvm_vnode.c
Log Message:
uvm: Expand v_size <= v_writesize assertions to help diagnostics.
PR kern/58117
To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/miscfs/genfs/genfs_io.c
cvs rdiff -u -r1.120 -r1.121 src/sys/uvm/uvm_vnode.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Taylor R Campbell <riastradh@NetBSD.org>
To: Manuel Bouyer <manuel.bouyer@lip6.fr>
Cc: gnats-bugs@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: kern/58117: panic: kernel diagnostic assertion "vp->v_size <= vp->v_writesize"
Date: Fri, 5 Apr 2024 13:08:46 +0000
I expanded the kasserts around this a little bit in HEAD. Can you
reproduce this and share how it panics now?
Can you also try to get a ktrace from rsync, perhaps by writing it to
nfs on another machine or to a local ffs mounted sync?
State-Changed-From-To: open->feedback
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Sun, 07 Apr 2024 15:56:33 +0000
State-Changed-Why:
feedback requested
From: Manuel Bouyer <manuel.bouyer@lip6.fr>
To: Taylor R Campbell <riastradh@NetBSD.org>
Cc: gnats-bugs@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: kern/58117: panic: kernel diagnostic assertion "vp->v_size <=
vp->v_writesize"
Date: Sun, 7 Apr 2024 22:42:43 +0200
On Fri, Apr 05, 2024 at 01:08:46PM +0000, Taylor R Campbell wrote:
> I expanded the kasserts around this a little bit in HEAD. Can you
> reproduce this and share how it panics now?
I backported your changes to my netbsd-10 tree and rebuilt the kernel.
Unfortunably I can't reproduce the issue any more after reboot.
I'll keep the box running with this kernel just in case ...
--
Manuel Bouyer, LIP6, Sorbonne Université. Manuel.Bouyer@lip6.fr
NetBSD: 26 ans d'experience feront toujours la difference
--
>Unformatted:
(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-2024
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.