syzbot


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

Status: fixed on 2023/05/15 23:52
Fix commit: e0b1585586c6 Remove stale `vdDentry` variable from VirtualFilesystem.connectMountAt().
First crash: 756d, last: 681d
Duplicate bugs (1)
duplicates (1):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
panic: WARNING: circular locking detected: tmpfs.filesystemRWMutex -> vfs.virtualFilesystemMutex: C 1 756d 756d 26/26 closed as dup on 2022/11/01 16:54
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
gvisor panic: WARNING: circular locking detected: vfs.virtualFilesystemMutex -> tmpfs.filesystemRWMutex: (2) C 17 558d 559d 26/26 fixed on 2023/05/19 14:28

Sample crash report:
panic: WARNING: circular locking detected: vfs.virtualFilesystemMutex -> tmpfs.filesystemRWMutex:
goroutine 390 [running]:
gvisor.dev/gvisor/pkg/log.Stacks(0xe0?)
	pkg/log/log.go:318 +0x8d
gvisor.dev/gvisor/pkg/sync/locking.checkLock(0xc0001c3e80, 0xc0001c2800, {0x0, 0x0, 0x0})
	pkg/sync/locking/lockdep.go:56 +0x1f4
gvisor.dev/gvisor/pkg/sync/locking.AddGLock(0xc0001c3e80, 0x0)
	pkg/sync/locking/lockdep.go:107 +0x3ba
gvisor.dev/gvisor/pkg/sentry/fsimpl/tmpfs.(*filesystemRWMutex).Lock(0xc000c28430)
	bazel-out/k8-fastbuild-ST-3dcbe13c9b87/bin/pkg/sentry/fsimpl/tmpfs/filesystem_mutex.go:18 +0x3f
gvisor.dev/gvisor/pkg/sentry/fsimpl/tmpfs.(*filesystem).Release(0xc000c283c0, {0x1cb8710, 0xc000992000})
	pkg/sentry/fsimpl/tmpfs/tmpfs.go:270 +0x85
gvisor.dev/gvisor/pkg/sentry/vfs.(*Filesystem).DecRef.func1()
	pkg/sentry/vfs/filesystem.go:81 +0x102
gvisor.dev/gvisor/pkg/sentry/vfs.(*FilesystemRefs).DecRef(0xc000c283c0, 0xc000a00e70)
	bazel-out/k8-fastbuild-ST-3dcbe13c9b87/bin/pkg/sentry/vfs/filesystem_refs.go:131 +0x5f
gvisor.dev/gvisor/pkg/sentry/vfs.(*Filesystem).DecRef(0xc000c283c0, {0x1cb8710, 0xc000992000})
	pkg/sentry/vfs/filesystem.go:77 +0x6f
gvisor.dev/gvisor/pkg/sentry/vfs.(*Mount).destroy(0xc000c20380, {0x1cb8710, 0xc000992000})
	pkg/sentry/vfs/mount.go:896 +0x1be
gvisor.dev/gvisor/pkg/sentry/vfs.(*Mount).DecRef(0xc000c20380, {0x1cb8710, 0xc000992000})
	pkg/sentry/vfs/mount.go:880 +0x79
gvisor.dev/gvisor/pkg/sentry/vfs.VirtualDentry.DecRef({0xc000c20380?, 0xc000c2b400?}, {0x1cb8710, 0xc000992000})
	pkg/sentry/vfs/vfs.go:927 +0x89
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).connectMountAt(0xc0001fdce8, {0x1cb8710, 0xc000992000}, 0xc000c2b400?, {0xc000c20380?, 0xc000c2b400?})
	pkg/sentry/vfs/mount.go:430 +0x270
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).ConnectMountAt(0xc0001fdce8, {0x1cb8710, 0xc000992000}, 0x0?, 0xc000c27300?, 0x5?)
	pkg/sentry/vfs/mount.go:341 +0x17b
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).MountAt(0xc000397b00?, {0x1cb8710, 0xc000992000}, 0xc000c27200?, {0xc000c27300, 0x5}, 0x0?, {0xc000c27400, 0x5}, 0xc000a013d8)
	pkg/sentry/vfs/mount.go:585 +0x18e
gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Mount(0xc000992000, {{0x20000000}, {0x20000140}, {0x20000000}, {0x0}, {0x0}, {0x561f4caf6268}})
	pkg/sentry/syscalls/linux/vfs2/mount.go:134 +0x754
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc000992000, 0xa5, {{0x20000000}, {0x20000140}, {0x20000000}, {0x0}, {0x0}, {0x561f4caf6268}})
	pkg/sentry/kernel/task_syscall.go:142 +0x9b8
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc000992000, 0x0?, {{0x20000000}, {0x20000140}, {0x20000000}, {0x0}, {0x0}, {0x561f4caf6268}})
	pkg/sentry/kernel/task_syscall.go:322 +0x7d
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc0001a48f0?, 0xc0006dc2d0?, {{0x20000000}, {0x20000140}, {0x20000000}, {0x0}, {0x0}, {0x561f4caf6268}})
	pkg/sentry/kernel/task_syscall.go:282 +0x8f
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc000992000)
	pkg/sentry/kernel/task_syscall.go:257 +0x496
gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0xc000992000?, 0xc000992000)
	pkg/sentry/kernel/task_run.go:253 +0x18f9
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc000992000, 0x1e)
	pkg/sentry/kernel/task_run.go:94 +0x354
created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start
	pkg/sentry/kernel/task_start.go:380 +0x1a8

Crashes (18):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/11/01 04:44 gvisor 9ae2eea3ba9a 43f72c2d .config console log report syz C ci-gvisor-ptrace-3-race panic: WARNING: circular locking detected: vfs.virtualFilesystemMutex -> tmpfs.filesystemRWMutex:
2022/11/01 04:39 gvisor 9ae2eea3ba9a 43f72c2d .config console log report syz C ci-gvisor-ptrace-2-race panic: WARNING: circular locking detected: vfs.virtualFilesystemMutex -> tmpfs.filesystemRWMutex:
2023/01/15 07:03 gvisor d3894e448101 a63719e7 .config console log report info ci-gvisor-ptrace-1-race panic: WARNING: circular locking detected: vfs.virtualFilesystemMutex -> tmpfs.filesystemRWMutex:
2023/01/04 02:21 gvisor 9e2b411a5092 1dac8c7a .config console log report info ci-gvisor-ptrace-1-race panic: WARNING: circular locking detected: vfs.virtualFilesystemMutex -> tmpfs.filesystemRWMutex:
2023/01/01 00:38 gvisor 85f261dd1eb2 ab32d508 .config console log report info ci-gvisor-ptrace-1-race panic: WARNING: circular locking detected: vfs.virtualFilesystemMutex -> tmpfs.filesystemRWMutex:
2022/12/29 05:25 gvisor ab1e49567ed2 44712fbc .config console log report info ci-gvisor-ptrace-1-race panic: WARNING: circular locking detected: vfs.virtualFilesystemMutex -> tmpfs.filesystemRWMutex:
2022/12/28 17:57 gvisor ab1e49567ed2 44712fbc .config console log report info ci-gvisor-ptrace-1-race panic: WARNING: circular locking detected: vfs.virtualFilesystemMutex -> tmpfs.filesystemRWMutex:
2022/12/27 19:07 gvisor fdeab8650a92 44712fbc .config console log report info ci-gvisor-ptrace-1-race panic: WARNING: circular locking detected: vfs.virtualFilesystemMutex -> tmpfs.filesystemRWMutex:
2022/12/26 09:59 gvisor fdeab8650a92 9da18ae8 .config console log report info ci-gvisor-ptrace-1-race panic: WARNING: circular locking detected: vfs.virtualFilesystemMutex -> tmpfs.filesystemRWMutex:
2022/12/24 00:22 gvisor fdeab8650a92 9da18ae8 .config console log report info ci-gvisor-ptrace-1-race panic: WARNING: circular locking detected: vfs.virtualFilesystemMutex -> tmpfs.filesystemRWMutex:
2022/12/21 09:54 gvisor 611e6e1247a0 d3e76707 .config console log report info ci-gvisor-ptrace-1-race panic: WARNING: circular locking detected: vfs.virtualFilesystemMutex -> tmpfs.filesystemRWMutex:
2022/12/20 01:43 gvisor 2342c658c7c2 c52b2efb .config console log report info ci-gvisor-ptrace-1-race panic: WARNING: circular locking detected: vfs.virtualFilesystemMutex -> tmpfs.filesystemRWMutex:
2022/12/17 08:36 gvisor a2ff07e53523 05494336 .config console log report info ci-gvisor-ptrace-1-race panic: WARNING: circular locking detected: vfs.virtualFilesystemMutex -> tmpfs.filesystemRWMutex:
2022/12/08 02:49 gvisor f4fb010ef487 d88f3abb .config console log report info ci-gvisor-ptrace-1-race panic: WARNING: circular locking detected: vfs.virtualFilesystemMutex -> tmpfs.filesystemRWMutex:
2022/11/26 21:21 gvisor 5b7274a1fc08 f4470a7b .config console log report info ci-gvisor-ptrace-3-race panic: WARNING: circular locking detected: vfs.virtualFilesystemMutex -> tmpfs.filesystemRWMutex:
2022/11/05 16:07 gvisor 1fc476d7fecc 6d752409 .config console log report info ci-gvisor-ptrace-3-race panic: WARNING: circular locking detected: vfs.virtualFilesystemMutex -> tmpfs.filesystemRWMutex:
2022/11/03 20:20 gvisor b1525a3b907b 7a2ebf95 .config console log report info ci-gvisor-ptrace-1-race panic: WARNING: circular locking detected: vfs.virtualFilesystemMutex -> tmpfs.filesystemRWMutex:
2022/11/01 04:01 gvisor 9ae2eea3ba9a 43f72c2d .config console log report info ci-gvisor-ptrace-1-race panic: WARNING: circular locking detected: vfs.virtualFilesystemMutex -> tmpfs.filesystemRWMutex:
* Struck through repros no longer work on HEAD.