syzbot


panic: nested locking: kernfs.filesystemRWMutex: (7)

Status: fixed on 2023/08/30 02:45
Fix commit: c80ab228d85b Make vfs.PopDelayedDecRefs() clear vfs.toDecRef.
First crash: 461d, last: 459d
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
gvisor panic: nested locking: kernfs.filesystemRWMutex: (3) syz 19 649d 674d 18/26 fixed on 2023/02/17 22:08
gvisor panic: nested locking: kernfs.filesystemRWMutex: (5) 5 530d 531d 26/26 fixed on 2023/06/15 20:22
gvisor panic: nested locking: kernfs.filesystemRWMutex: (6) C 8 462d 477d 26/26 fixed on 2023/08/23 02:32
gvisor panic: nested locking: kernfs.filesystemRWMutex: (9) 1 196d 196d 0/26 auto-obsoleted due to no activity on 2024/08/20 13:26
gvisor panic: nested locking: kernfs.filesystemRWMutex: (2) C 8 756d 807d 0/26 closed as invalid on 2023/01/19 20:51
gvisor panic: nested locking: kernfs.filesystemRWMutex: (4) C 31 532d 626d 26/26 fixed on 2023/06/13 14:23
gvisor panic: nested locking: kernfs.filesystemRWMutex: (8) 1 351d 344d 0/26 auto-obsoleted due to no activity on 2024/03/10 05:57
gvisor panic: nested locking: kernfs.filesystemRWMutex: C 5 850d 851d 0/26 closed as invalid on 2022/08/09 17:49

Sample crash report:
panic: nested locking: kernfs.filesystemRWMutex:
goroutine 2820433 [running]:
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*filesystemRWMutex).Lock(0xc004bdc050)
	bazel-out/k8-fastbuild-ST-3dcbe13c9b87/bin/pkg/sentry/fsimpl/kernfs/filesystem_mutex.go:31 +0x58
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Filesystem).Release(0xc004bdc000, {0x6f0de0, 0xc001e56000})
	pkg/sentry/fsimpl/kernfs/filesystem.go:262 +0x9b
gvisor.dev/gvisor/pkg/sentry/fsimpl/proc.(*filesystem).Release(0xc004bdc000, {0x6f0de0, 0xc001e56000})
	pkg/sentry/fsimpl/proc/filesystem.go:104 +0xc5
gvisor.dev/gvisor/pkg/sentry/vfs.(*Filesystem).DecRef.func1()
	pkg/sentry/vfs/filesystem.go:81 +0x11a
gvisor.dev/gvisor/pkg/sentry/vfs.(*FilesystemRefs).DecRef(0xc004bdc000, 0xc00133c638)
	bazel-out/k8-fastbuild-ST-3dcbe13c9b87/bin/pkg/sentry/vfs/filesystem_refs.go:132 +0xb2
gvisor.dev/gvisor/pkg/sentry/vfs.(*Filesystem).DecRef(0xc004bdc000, {0x6f0de0, 0xc001e56000})
	pkg/sentry/vfs/filesystem.go:77 +0x87
gvisor.dev/gvisor/pkg/sentry/vfs.(*Mount).destroy(0xc005304200, {0x6f0de0, 0xc001e56000})
	pkg/sentry/vfs/mount.go:643 +0x33a
gvisor.dev/gvisor/pkg/sentry/vfs.(*Mount).DecRef(0xc005304200, {0x6f0de0, 0xc001e56000})
	pkg/sentry/vfs/mount.go:625 +0xcc
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).unlockMounts(0xc000600c60, {0x6f0de0, 0xc001e56000})
	pkg/sentry/vfs/vfs.go:1020 +0x254
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).forgetDeadMountpoint(0xc000600c60, {0x6f0de0, 0xc001e56000}, 0xc00252d320, 0x1)
	pkg/sentry/vfs/dentry.go:345 +0x325
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).InvalidateDentry(0xc0047080a8?, {0x6f0de0, 0xc001e56000}, 0xc00252d320)
	pkg/sentry/vfs/dentry.go:250 +0xb3
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Filesystem).revalidateChildLocked(0x2fc840?, {0x6f0de0, 0xc001e56000}, 0x4?, 0xc0006ee3f0, {0xc00503767c, 0x4}, 0xc00252d320)
	pkg/sentry/fsimpl/kernfs/filesystem.go:121 +0x1ec
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Filesystem).stepExistingLocked(0xc004f26d80?, {0x6f0de0, 0xc001e56000}, 0xc004f26d80, 0xc0006ee3f0)
	pkg/sentry/fsimpl/kernfs/filesystem.go:75 +0x525
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Filesystem).walkExistingLocked(0xc000467ef0?, {0x6f0de0, 0xc001e56000}, 0xc004f26d80)
	pkg/sentry/fsimpl/kernfs/filesystem.go:163 +0x11b
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Filesystem).OpenAt(0xc000467ea0, {0x6f0de0, 0xc001e56000}, 0xc004f26d80, {0x8001, 0x0, 0x0})
	pkg/sentry/fsimpl/kernfs/filesystem.go:486 +0x18d
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).OpenAt(0xc00b359bc0?, {0x6f0de0, 0xc001e56000}, 0xc000748000?, 0xc00133d428, 0xc00133d2f8)
	pkg/sentry/vfs/vfs.go:470 +0x6bc
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.openat(0xc001e56000, 0x259c284?, 0x1?, 0x80001, 0x0)
	pkg/sentry/syscalls/linux/sys_file.go:112 +0x365
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Openat(0x0?, 0xc00133d5d0?, {{0xffffff9c}, {0x557ceaf59502}, {0x80001}, {0x0}, {0x0}, {0x0}})
	pkg/sentry/syscalls/linux/sys_file.go:91 +0xcb
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc001e56000, 0x101, {{0xffffff9c}, {0x557ceaf59502}, {0x80001}, {0x0}, {0x0}, {0x0}})
	pkg/sentry/kernel/task_syscall.go:142 +0xabf
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc001e56000, 0x1?, {{0xffffff9c}, {0x557ceaf59502}, {0x80001}, {0x0}, {0x0}, {0x0}})
	pkg/sentry/kernel/task_syscall.go:322 +0x8e
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc00b58a870?, 0xc00133db37?, {{0xffffff9c}, {0x557ceaf59502}, {0x80001}, {0x0}, {0x0}, {0x0}})
	pkg/sentry/kernel/task_syscall.go:282 +0xc5
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc001e56000)
	pkg/sentry/kernel/task_syscall.go:257 +0x53b
gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0xc001e56000?, 0xc001e56000)
	pkg/sentry/kernel/task_run.go:269 +0x22b4
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc001e56000, 0x8de)
	pkg/sentry/kernel/task_run.go:98 +0x35b
created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start
	pkg/sentry/kernel/task_start.go:390 +0x1da

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/08/25 05:09 gvisor 62fae3001634 49be837e .config console log report info ci-gvisor-ptrace-1-race-cover panic: nested locking: kernfs.filesystemRWMutex:
2023/08/25 00:52 gvisor 356c4f86016c 6f19564f .config console log report info ci-gvisor-ptrace-1-race-cover panic: nested locking: kernfs.filesystemRWMutex:
2023/08/23 16:57 gvisor e8c1fff214d0 4d7ae7ab .config console log report info ci-gvisor-ptrace-1-race-cover panic: nested locking: kernfs.filesystemRWMutex:
2023/08/23 04:24 gvisor e8c1fff214d0 b81ca3f6 .config console log report info ci-gvisor-ptrace-1-race-cover panic: nested locking: kernfs.filesystemRWMutex:
* Struck through repros no longer work on HEAD.