NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/56177: locking against myself error for nfs_delayedtruncate()



>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.



Home | Main Index | Thread Index | Old Index