NetBSD Problem Report #56177
From www@netbsd.org Sat May 15 11:57:51 2021
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 309021A9289
for <gnats-bugs@gnats.NetBSD.org>; Sat, 15 May 2021 11:57:51 +0000 (UTC)
Message-Id: <20210515115749.627331A928A@mollari.NetBSD.org>
Date: Sat, 15 May 2021 11:57:49 +0000 (UTC)
From: rokuyama.rk@gmail.com
Reply-To: rokuyama.rk@gmail.com
To: gnats-bugs@NetBSD.org
Subject: locking against myself error for nfs_delayedtruncate()
X-Send-Pr-Version: www-1.0
>Number: 56177
>Category: kern
>Synopsis: locking against myself error for nfs_delayedtruncate()
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat May 15 12:00:00 +0000 2021
>Originator: Rin Okuyama
>Release: 9.99.82
>Organization:
Department of Physics, Meiji University
>Environment:
Should be a MI bug, but:
NetBSD exp451 9.99.82 NetBSD 9.99.82 (EXP451) #222: Sat May 15 09:01:20 JST 2021 rin@latipes:/usr/src/sys/arch/evbppc/compile/EXP451 evbppc
>Description:
With heavy usage of NFS (e.g., compiling large packages with NFS root/swap),
the system easily hangs due to ``locking against myself'' error for
nfs_delayedtruncate(). Typical backtrace (for powerpc) is as follows:
----
panic: lock error: Mutex: mutex_vector_enter,544: locking against myself: lock 0x3090f68 cpu 0 lwp 0x2679580
cpu0: Begin traceback...
0x00853840: at vpanic+0x12c
0x00853870: at panic+0x50
0x008538b0: at lockdebug_abort+0xe4
0x008538d0: at mutex_spin_enter+0x22c
0x00853910: at genfs_do_putpages+0x188
0x00853a40: at VOP_PUTPAGES+0x44
0x00853a70: at nfs_delayedtruncate+0x68
0x00853a80: at nfs_unlock+0x24
0x00853a90: at VOP_UNLOCK+0x40
0x00853ab0: at vrelel+0x428
0x00853af0: at nfs_lookup+0x99c
0x00853bf0: at VOP_LOOKUP+0x44
0x00853c10: at lookup_once+0x238
0x00853c70: at namei_tryemulroot+0xa14
0x00853d60: at namei+0x34
0x00853d90: at do_sys_statat+0x1b4
0x00853e00: at sys___stat50+0x24
0x00853eb0: at syscall+0x328
0x00853f20: user SC trap #439 by 0xfdc23be4: srr1=0xd030
r1=0xfffea590 cr=0x48000444 xer=0 ctr=0xfdc23bdc esr=0x800000 pid=0x17
cpu0: End traceback...
----
>How-To-Repeat:
Cause thrashing with NFS root/swap by, e.g., compiling heavy packages on
poor machines. Then, the panic occurs within few hours.
>Fix:
The ``disgusting'' patch by christos for kern/56170
On 2021/05/15 6:24, Christos Zoulas wrote:
> https://www.netbsd.org/~christos/nfs.diff for a disgusting hack I am using to avoid this.
works around the problem for me.
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.