syzbot


panic: nested locking: tmpfs.filesystemRWMutex:

Status: fixed on 2023/10/05 23:05
Reported-by: syzbot+d93d90350a33fbd2c8b9@syzkaller.appspotmail.com
Fix commit: c74f5866cb75 Fix circular lock that can happen during unlink.
First crash: 434d, last: 434d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
gvisor panic: nested locking: tmpfs.filesystemRWMutex: (2) C 33 8d05h 11d 26/26 fixed on 2024/11/18 09:58
gvisor panic: nested locking: tmpfs.filesystemRWMutex: (3) C 88 5d03h 1d02h 26/26 fixed on 2024/11/25 18:44

Sample crash report:
panic: nested locking: tmpfs.filesystemRWMutex:
goroutine 309 [running]:
gvisor.dev/gvisor/pkg/sentry/fsimpl/tmpfs.(*filesystemRWMutex).Lock(0xc0103b03c0)
	bazel-out/k8-fastbuild-ST-3dcbe13c9b87/bin/pkg/sentry/fsimpl/tmpfs/filesystem_mutex.go:31 +0x58
gvisor.dev/gvisor/pkg/sentry/fsimpl/tmpfs.(*filesystem).Release(0xc0103b0340, {0x6f2f60, 0xc000a71500})
	pkg/sentry/fsimpl/tmpfs/tmpfs.go:353 +0xb3
gvisor.dev/gvisor/pkg/sentry/vfs.(*Filesystem).DecRef.func1()
	pkg/sentry/vfs/filesystem.go:81 +0x11a
gvisor.dev/gvisor/pkg/sentry/vfs.(*FilesystemRefs).DecRef(0xc0103b0340, 0xc000b46aa8)
	bazel-out/k8-fastbuild-ST-3dcbe13c9b87/bin/pkg/sentry/vfs/filesystem_refs.go:132 +0xb2
gvisor.dev/gvisor/pkg/sentry/vfs.(*Filesystem).DecRef(0xc0103b0340, {0x6f2f60, 0xc000a71500})
	pkg/sentry/vfs/filesystem.go:77 +0x87
gvisor.dev/gvisor/pkg/sentry/vfs.(*Mount).destroy(0xc002009400, {0x6f2f60, 0xc000a71500})
	pkg/sentry/vfs/mount.go:639 +0x33a
gvisor.dev/gvisor/pkg/sentry/vfs.(*Mount).DecRef(0xc002009400, {0x6f2f60, 0xc000a71500})
	pkg/sentry/vfs/mount.go:621 +0xcc
gvisor.dev/gvisor/pkg/sentry/vfs.VirtualDentry.DecRef({0xc002009400?, 0xc004f24000?}, {0x6f2f60, 0xc000a71500})
	pkg/sentry/vfs/vfs.go:1078 +0x7e
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).unlockMounts(0xc00054ac60, {0x6f2f60, 0xc000a71500})
	pkg/sentry/vfs/vfs.go:1022 +0x254
gvisor.dev/gvisor/pkg/sentry/vfs.(*Mount).destroy(0xc013584280, {0x6f2f60, 0xc000a71500})
	pkg/sentry/vfs/mount.go:634 +0x273
gvisor.dev/gvisor/pkg/sentry/vfs.(*Mount).DecRef(0xc013584280, {0x6f2f60, 0xc000a71500})
	pkg/sentry/vfs/mount.go:621 +0xcc
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).unlockMounts(0xc00054ac60, {0x6f2f60, 0xc000a71500})
	pkg/sentry/vfs/vfs.go:1022 +0x254
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).forgetDeadMountpoint(0xc00054ac60, {0x6f2f60, 0xc000a71500}, 0xc011398690, 0x0)
	pkg/sentry/vfs/dentry.go:345 +0x325
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).CommitDeleteDentry(0xc001274000?, {0x6f2f60, 0xc000a71500}, 0xc011398690)
	pkg/sentry/vfs/dentry.go:236 +0xa5
gvisor.dev/gvisor/pkg/sentry/fsimpl/tmpfs.(*filesystem).UnlinkAt(0xc0006c40d0, {0x6f2f60, 0xc000a71500}, 0xc00cdb2480)
	pkg/sentry/fsimpl/tmpfs/filesystem.go:827 +0x70b
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).UnlinkAt(0xc000a71500?, {0x6f2f60, 0xc000a71500}, 0xc004a7fc00?, 0xc000b47440)
	pkg/sentry/vfs/vfs.go:724 +0x2f5
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.unlinkat(0xc000a71500, 0x1186a5b?, 0x2637f5c?)
	pkg/sentry/syscalls/linux/sys_file.go:1120 +0x2a5
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Unlinkat(0xc000a71500?, 0x7fc7440659b0?, {{0xa}, {0xc000a08470}, {0x0}, {0x0}, {0x0}, {0x0}})
	pkg/sentry/syscalls/linux/sys_file.go:1136 +0x127
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc000a71500, 0x107, {{0xa}, {0xc000a08470}, {0x0}, {0x0}, {0x0}, {0x0}})
	pkg/sentry/kernel/task_syscall.go:142 +0xabf
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc000a71500, 0x1?, {{0xa}, {0xc000a08470}, {0x0}, {0x0}, {0x0}, {0x0}})
	pkg/sentry/kernel/task_syscall.go:322 +0x8e
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc000c5a2d0?, 0xc000b47b37?, {{0xa}, {0xc000a08470}, {0x0}, {0x0}, {0x0}, {0x0}})
	pkg/sentry/kernel/task_syscall.go:282 +0xc5
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc000a71500)
	pkg/sentry/kernel/task_syscall.go:257 +0x53b
gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0xc000a71500?, 0xc000a71500)
	pkg/sentry/kernel/task_run.go:269 +0x22b4
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc000a71500, 0x11)
	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 (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/09/19 07:20 gvisor 8a7617aed21c 0b6a67ac .config console log report info ci-gvisor-systrap-1-race-cover panic: nested locking: tmpfs.filesystemRWMutex:
* Struck through repros no longer work on HEAD.