syzbot


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

Status: fixed on 2023/02/17 22:08
Fix commit: 28472cc03fe1 don't take an unnecessary reference in proc.fdSymlink.Valid()
First crash: 674d, last: 649d
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
gvisor panic: nested locking: kernfs.filesystemRWMutex: (7) 4 459d 461d 26/26 fixed on 2023/08/30 02:45
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 64898 [running]:
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*filesystemRWMutex).RLock(0xc000270190)
	bazel-out/k8-fastbuild-ST-3dcbe13c9b87/bin/pkg/sentry/fsimpl/kernfs/filesystem_mutex.go:59 +0x45
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Dentry).InotifyWithParent(0xc003886fc0, {0x82ff18, 0xc004199500}, 0x8, 0x0?, 0x0?)
	pkg/sentry/fsimpl/kernfs/kernfs.go:517 +0xa8
gvisor.dev/gvisor/pkg/sentry/vfs.(*Dentry).InotifyWithParent(...)
	pkg/sentry/vfs/dentry.go:187
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).DecRef.func1()
	pkg/sentry/vfs/file_description.go:167 +0xdf
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescriptionRefs).DecRef(0xc0006ba6c0, 0xc0009cc910)
	bazel-out/k8-fastbuild-ST-3dcbe13c9b87/bin/pkg/sentry/vfs/file_description_refs.go:131 +0x5f
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).DecRef(0xc0006ba6c0, {0x82ff18, 0xc004199500})
	pkg/sentry/vfs/file_description.go:161 +0x6f
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Filesystem).SafeDecRefFD(0xc0002703c0, {0x82ff18, 0xc004199500}, 0xc0006ba6c0)
	pkg/sentry/fsimpl/kernfs/kernfs.go:153 +0xba
gvisor.dev/gvisor/pkg/sentry/fsimpl/proc.(*fdSymlink).Getlink(0xc004794100, {0x82ff18, 0xc004199500}, 0xc00233ecf0?)
	pkg/sentry/fsimpl/proc/task_fds.go:241 +0x1ba
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Filesystem).stepExistingLocked(0x1247539?, {0x82ff18, 0xc004199500}, 0xc00141f200, 0xc00233ec60)
	pkg/sentry/fsimpl/kernfs/filesystem.go:85 +0x5a3
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Filesystem).walkExistingLocked(0xc000270410?, {0x82ff18, 0xc004199500}, 0xc00141f200)
	pkg/sentry/fsimpl/kernfs/filesystem.go:160 +0xd8
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Filesystem).OpenAt(0xc0002703c0, {0x82ff18, 0xc004199500}, 0xc00141f200, {0x8000, 0x0, 0x0})
	pkg/sentry/fsimpl/kernfs/filesystem.go:481 +0x1c5
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).OpenAt(0xc0029f5800?, {0x82ff18, 0xc004199500}, 0xc000393600?, 0xc0009cd3f0, 0xc00126d2e8)
	pkg/sentry/vfs/vfs.go:436 +0x4f3
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.openat(0xc004199500, 0x1?, 0x126fce5?, 0x0, 0x0)
	pkg/sentry/syscalls/linux/sys_file.go:112 +0x2b1
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Openat(0xc004199500?, {{0xffffff9c}, {0x7f2385bff0d0}, {0x0}, {0x0}, {0x0}, {0x7f2385bfef50}})
	pkg/sentry/syscalls/linux/sys_file.go:91 +0x45
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc004199500, 0x101, {{0xffffff9c}, {0x7f2385bff0d0}, {0x0}, {0x0}, {0x0}, {0x7f2385bfef50}})
	pkg/sentry/kernel/task_syscall.go:142 +0x9b9
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc004199500, 0x0?, {{0xffffff9c}, {0x7f2385bff0d0}, {0x0}, {0x0}, {0x0}, {0x7f2385bfef50}})
	pkg/sentry/kernel/task_syscall.go:322 +0x7d
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc00649fe10?, 0xc0063f74a0?, {{0xffffff9c}, {0x7f2385bff0d0}, {0x0}, {0x0}, {0x0}, {0x7f2385bfef50}})
	pkg/sentry/kernel/task_syscall.go:282 +0x8f
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc004199500)
	pkg/sentry/kernel/task_syscall.go:257 +0x4c5
gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0xc004199500?, 0xc004199500)
	pkg/sentry/kernel/task_run.go:259 +0x1b76
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc004199500, 0xbec)
	pkg/sentry/kernel/task_run.go:94 +0x37b
created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start
	pkg/sentry/kernel/task_start.go:377 +0x1ad

Crashes (19):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/29 07:50 gvisor f0d5892907c8 b68fb8d6 .config console log report syz ci-gvisor-ptrace-3-race panic: nested locking: kernfs.filesystemRWMutex:
2023/01/29 06:54 gvisor 4e75dc46503d b68fb8d6 .config console log report syz ci-gvisor-ptrace-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/01/29 01:39 gvisor 4e75dc46503d b68fb8d6 .config console log report info ci-gvisor-ptrace-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/02/15 16:38 gvisor f02f959c1688 6be0f1f5 .config console log report info ci-gvisor-arm64-ptrace-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/02/15 08:57 gvisor f3099f1288d0 e62ba3c1 .config console log report info ci-gvisor-arm64-ptrace-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/02/11 11:53 gvisor 0927892f49b9 93e26d60 .config console log report info ci-gvisor-arm64-ptrace-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/02/10 07:39 gvisor 13448f9e8761 07980f9d .config console log report info ci-gvisor-arm64-ptrace-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/02/04 12:25 gvisor 5c2bc3b3f8fe be607b78 .config console log report info ci-gvisor-arm64-ptrace-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/02/04 05:09 gvisor c6c2326fb8aa 1b2f701a .config console log report info ci-gvisor-arm64-ptrace-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/02/03 06:58 gvisor 4dee08f3d28e 33fc5c09 .config console log report info ci-gvisor-arm64-ptrace-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/02/03 00:02 gvisor b932fb1fb666 33fc5c09 .config console log report info ci-gvisor-arm64-ptrace-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/02/02 11:39 gvisor b932fb1fb666 16d19e30 .config console log report info ci-gvisor-arm64-ptrace-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/02/01 23:44 gvisor e0b9cf05fe13 16d19e30 .config console log report info ci-gvisor-arm64-ptrace-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/01/27 07:37 gvisor f0d5892907c8 1fa8fd35 .config console log report info ci-gvisor-arm64-ptrace-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/01/26 04:37 gvisor 492f4c95c9cc 3d904c7a .config console log report info ci-gvisor-arm64-ptrace-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/01/25 09:28 gvisor aeabb7852781 3d904c7a .config console log report info ci-gvisor-arm64-ptrace-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/01/24 22:02 gvisor 154695a6ff8a 3d904c7a .config console log report info ci-gvisor-arm64-ptrace-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/01/22 17:16 gvisor 212fecc105a4 cc0f9968 .config console log report info ci-gvisor-arm64-ptrace-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/01/21 16:30 gvisor 212fecc105a4 cc0f9968 .config console log report info ci-gvisor-arm64-ptrace-1-race panic: nested locking: kernfs.filesystemRWMutex:
* Struck through repros no longer work on HEAD.