NetBSD Problem Report #59229
From www@netbsd.org Fri Mar 28 12:56:28 2025
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)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 62C881A9239
for <gnats-bugs@gnats.NetBSD.org>; Fri, 28 Mar 2025 12:56:28 +0000 (UTC)
Message-Id: <20250328125627.325E81A923D@mollari.NetBSD.org>
Date: Fri, 28 Mar 2025 12:56:27 +0000 (UTC)
From: vezhlys@gmail.com
Reply-To: vezhlys@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Occasional crash on forced umount of nfs file system
X-Send-Pr-Version: www-1.0
>Number: 59229
>Category: kern
>Synopsis: Occasional crash on forced umount of nfs file system
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Mar 28 13:00:00 +0000 2025
>Last-Modified: Thu Apr 03 20:45:01 +0000 2025
>Originator: Andrius V
>Release: NetBSD 10
>Organization:
>Environment:
>Description:
I get an occasional crash when forcibly unmounting my NFS file system
(nfs -f <pathtonfs>), which seems to be a null pointer dereference. Unfortunately, I don't have a easily reproducible flow, but it happens after longer usage period, sometimes PC is just idle for hours, but likely I was using NFS mount during some period in between.
bt:
uvm_fault(0xffffffff819592a0, 0x0, 1) -> e
fatal page fault in supervisor mode
trap type 6 code 0 rip 0xffffffff80c21afd cs 0x8 rflags 0x10282 cr2 0x80 ilevel 0 rsp 0xffffb392726bbed0
curlwp 0xfffffdb77ad3eb00 pid 0.3676 lowest kstack 0xffffb392726b72c0
panic: trap
cpu5: Begin traceback...
vpanic() at netbsd:vpanic+0x183
panic() at netbsd:panic+0x3c
trap() at netbsd:trap+0xb27
--- trap (number 6) ---
nfs_getattrcache() at netbsd:nfs_getattrcache+0x14
nfs_kqpoll() at netbsd:nfs_kqpoll+0x66
cpu5: End traceback...
>How-To-Repeat:
>Fix:
mlelstv proposed fix in https://nxr.netbsd.org/xref/src/sys/nfs/nfs_clntsubs.c?r=1.7#323:
- if (np->n_attrstamp == 0 ||
+ if (np == NULL ||
+ np->n_attrstamp == 0 ||
The only problem that I don't have an easily reproducible flow (except "long" usage), thus I would likely need to apply it with some logging and test for some time.
>Audit-Trail:
From: Andrius V <vezhlys@gmail.com>
To: NetBSD GNATS <gnats-bugs@netbsd.org>
Cc:
Subject: Re: kern/59229: Occasional crash on forced umount of nfs file system
Date: Thu, 3 Apr 2025 23:40:32 +0300
Hi,
On Fri, Mar 28, 2025 at 3:00=E2=80=AFPM <vezhlys@gmail.com> wrote:
>
> The only problem that I don't have an easily reproducible flow (except "l=
ong" usage), thus I would likely need to apply it with some logging and tes=
t for some time.
>
I found an "easily" reproducible scenario:
1) copy a (big) file in NFS mount using xfce thunar file manager.
2) unmount NFS mount while copying is still in progress.
Crash always happens for me in this scenario.
Regards,
Andrius V
(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-2025
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.