syzbot


panic: WARNING: circular locking detected: vfs.virtualFilesystemMutex -> kernfs.filesystemRWMutex:

Status: fixed on 2023/01/21 05:29
Fix commit: 492d7a98116b Decref target VirtualDentry outside the vfs mount lock during mount ops.
First crash: 691d, last: 691d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
gvisor panic: WARNING: circular locking detected: vfs.virtualFilesystemMutex -> kernfs.filesystemRWMutex: (2) 1 558d 558d 26/26 fixed on 2023/06/09 01:56

Sample crash report:
panic: WARNING: circular locking detected: vfs.virtualFilesystemMutex -> kernfs.filesystemRWMutex:
goroutine 1307899 [running]:
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*filesystemRWMutex).Lock(0xc00046d270)
	bazel-out/k8-fastbuild-ST-3dcbe13c9b87/bin/pkg/sentry/fsimpl/kernfs/filesystem_mutex.go:31 +0x58
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Dentry).DecRef(0xc005d163f0, {0x6add38, 0xc00523ea80})
	pkg/sentry/fsimpl/kernfs/kernfs.go:286 +0xcf
gvisor.dev/gvisor/pkg/sentry/vfs.(*Dentry).DecRef(0xc005d163f0, {0x6add38, 0xc00523ea80})
	pkg/sentry/vfs/dentry.go:155 +0x71
gvisor.dev/gvisor/pkg/sentry/vfs.VirtualDentry.DecRef({0xc004e62e00?, 0xc005d163f0?}, {0x6add38, 0xc00523ea80})
	pkg/sentry/vfs/vfs.go:926 +0x6a
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).connectMountAt(0xc0000424d0, {0x6add38, 0xc00523ea80}, 0xc005d163f0?, {0xc004e62e00?, 0xc005d163f0?})
	pkg/sentry/vfs/mount.go:303 +0x2fc
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).ConnectMountAt(0xc0000424d0, {0x6add38?, 0xc00523ea80}, 0xc006088400?, 0xc006088300?, 0x0?)
	pkg/sentry/vfs/mount.go:281 +0x432
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).MountAt(0xc000361600?, {0x6add38, 0xc00523ea80}, 0xc006088200?, {0xc006088300, 0x0}, 0x0?, {0xc006088400, 0x4}, 0xc002d634b0)
	pkg/sentry/vfs/mount.go:429 +0x1bd
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Mount(0xc00523ea80, {{0x20000840}, {0x20000340}, {0x20000280}, {0x0}, {0x0}, {0x0}})
	pkg/sentry/syscalls/linux/sys_mount.go:134 +0xd90
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc00523ea80, 0xa5, {{0x20000840}, {0x20000340}, {0x20000280}, {0x0}, {0x0}, {0x0}})
	pkg/sentry/kernel/task_syscall.go:142 +0xab8
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc00523ea80, 0x1?, {{0x20000840}, {0x20000340}, {0x20000280}, {0x0}, {0x0}, {0x0}})
	pkg/sentry/kernel/task_syscall.go:322 +0x8e
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc00415e4b0?, 0x105124c?, {{0x20000840}, {0x20000340}, {0x20000280}, {0x0}, {0x0}, {0x0}})
	pkg/sentry/kernel/task_syscall.go:282 +0xc5
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc00523ea80)
	pkg/sentry/kernel/task_syscall.go:257 +0x53b
gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0xc00523ea80?, 0xc00523ea80)
	pkg/sentry/kernel/task_run.go:253 +0x1e94
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc00523ea80, 0x84a7)
	pkg/sentry/kernel/task_run.go:94 +0x2cc
created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start
	pkg/sentry/kernel/task_start.go:377 +0x1da

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/04 20:34 gvisor 151797db642c 1dac8c7a .config console log report info ci-gvisor-ptrace-3-race-cover panic: WARNING: circular locking detected: vfs.virtualFilesystemMutex -> kernfs.filesystemRWMutex:
* Struck through repros no longer work on HEAD.