syzbot


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

Status: fixed on 2023/06/13 14:23
Reported-by: syzbot+31c9a17cf680d45205bf@syzkaller.appspotmail.com
Fix commit: 084a5022563f Change InvalidateDentry to return a list of vds with an extra reference.
First crash: 633d, last: 532d
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: (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: (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 282605 [running]:
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*filesystemRWMutex).RLock(0xc000588910)
	bazel-out/k8-fastbuild-ST-3dcbe13c9b87/bin/pkg/sentry/fsimpl/kernfs/filesystem_mutex.go:59 +0x58
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Dentry).InotifyWithParent(0xc002682990, {0x75d200, 0xc009e96000}, 0x8, 0x0?, 0xb4?)
	pkg/sentry/fsimpl/kernfs/kernfs.go:517 +0xec
gvisor.dev/gvisor/pkg/sentry/vfs.(*Dentry).InotifyWithParent(0xc002682990, {0x75d200, 0xc009e96000}, 0x38b1edc?, 0x0?, 0x1?)
	pkg/sentry/vfs/dentry.go:187 +0x93
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).DecRef.func1()
	pkg/sentry/vfs/file_description.go:167 +0x111
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescriptionRefs).DecRef(0xc00098acc0, 0xc0006b88e0)
	bazel-out/k8-fastbuild-ST-3dcbe13c9b87/bin/pkg/sentry/vfs/file_description_refs.go:131 +0xb2
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).DecRef(0xc00098acc0, {0x75d200, 0xc009e96000})
	pkg/sentry/vfs/file_description.go:161 +0x87
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Filesystem).SafeDecRefFD(0xc000588c80, {0x75d200, 0xc009e96000}, 0xc00098acc0)
	pkg/sentry/fsimpl/kernfs/kernfs.go:153 +0x105
gvisor.dev/gvisor/pkg/sentry/fsimpl/proc.(*fdSymlink).Getlink(0xc0028a9980, {0x75d200, 0xc009e96000}, 0x1?)
	pkg/sentry/fsimpl/proc/task_fds.go:242 +0x1f3
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Filesystem).stepExistingLocked(0xc006fdb680?, {0x75d200, 0xc009e96000}, 0xc006fdb680, 0xc000e71050)
	pkg/sentry/fsimpl/kernfs/filesystem.go:85 +0x6af
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Filesystem).walkExistingLocked(0xc000588cd0?, {0x75d200, 0xc009e96000}, 0xc006fdb680)
	pkg/sentry/fsimpl/kernfs/filesystem.go:160 +0x11b
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Filesystem).OpenAt(0xc000588c80, {0x75d200, 0xc009e96000}, 0xc006fdb680, {0x8000, 0x0, 0x0})
	pkg/sentry/fsimpl/kernfs/filesystem.go:483 +0x18d
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).OpenAt(0xc00760e600?, {0x75d200, 0xc009e96000}, 0xc000715b00?, 0xc0006b9428, 0xc0006b92f8)
	pkg/sentry/vfs/vfs.go:460 +0x6bc
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.openat(0xc009e96000, 0x27bbe44?, 0x1?, 0x0, 0x0)
	pkg/sentry/syscalls/linux/sys_file.go:112 +0x365
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Openat(0x0?, 0xc0006b95d0?, {{0xffffff9c}, {0x7f4dbb9e7290}, {0x0}, {0x0}, {0x0}, {0x7f4dbb9e7120}})
	pkg/sentry/syscalls/linux/sys_file.go:91 +0xcb
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc009e96000, 0x101, {{0xffffff9c}, {0x7f4dbb9e7290}, {0x0}, {0x0}, {0x0}, {0x7f4dbb9e7120}})
	pkg/sentry/kernel/task_syscall.go:142 +0xabf
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc009e96000, 0x1?, {{0xffffff9c}, {0x7f4dbb9e7290}, {0x0}, {0x0}, {0x0}, {0x7f4dbb9e7120}})
	pkg/sentry/kernel/task_syscall.go:322 +0x8e
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc005dfe000?, 0xc0006b9b37?, {{0xffffff9c}, {0x7f4dbb9e7290}, {0x0}, {0x0}, {0x0}, {0x7f4dbb9e7120}})
	pkg/sentry/kernel/task_syscall.go:282 +0xc5
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc009e96000)
	pkg/sentry/kernel/task_syscall.go:257 +0x53b
gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0xc009e96000?, 0xc009e96000)
	pkg/sentry/kernel/task_run.go:269 +0x22b4
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc009e96000, 0x3a26)
	pkg/sentry/kernel/task_run.go:98 +0x35b
created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start
	pkg/sentry/kernel/task_start.go:377 +0x1da

Crashes (31):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/05/21 18:11 gvisor 7e32a238387b 4bce1a3e .config console log report syz C ci-gvisor-ptrace-2-race-cover panic: nested locking: kernfs.filesystemRWMutex:
2023/05/11 05:22 gvisor a7e1fe92f588 0fbd49f4 .config console log report syz C ci-gvisor-ptrace-1-race-cover panic: nested locking: kernfs.filesystemRWMutex:
2023/06/13 04:37 gvisor bb105d7a4e6b 749afb64 .config console log report info ci-gvisor-ptrace-1-race-cover panic: nested locking: kernfs.filesystemRWMutex:
2023/06/12 23:14 gvisor bb105d7a4e6b aaed0183 .config console log report info ci-gvisor-ptrace-1-race-cover panic: nested locking: kernfs.filesystemRWMutex:
2023/06/11 14:12 gvisor 8ec8dbe7e8fb 49519f06 .config console log report info ci-gvisor-systrap-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/06/11 13:45 gvisor 8ec8dbe7e8fb 49519f06 .config console log report info ci-gvisor-ptrace-3-race panic: nested locking: kernfs.filesystemRWMutex:
2023/06/11 12:57 gvisor 8ec8dbe7e8fb 49519f06 .config console log report info ci-gvisor-ptrace-3-race-cover panic: nested locking: kernfs.filesystemRWMutex:
2023/06/07 06:53 gvisor bc76b1524771 a4ae4f42 .config console log report info ci-gvisor-ptrace-3-race-cover panic: nested locking: kernfs.filesystemRWMutex:
2023/06/04 12:24 gvisor 7fa1ad884022 a4ae4f42 .config console log report info ci-gvisor-ptrace-3-race-cover panic: nested locking: kernfs.filesystemRWMutex:
2023/05/29 06:59 gvisor 919cfd12bd97 cf184559 .config console log report info ci-gvisor-ptrace-3-race-cover panic: nested locking: kernfs.filesystemRWMutex:
2023/05/29 04:09 gvisor 919cfd12bd97 cf184559 .config console log report info ci-gvisor-ptrace-3-race-cover panic: nested locking: kernfs.filesystemRWMutex:
2023/05/29 02:43 gvisor 919cfd12bd97 cf184559 .config console log report info ci-gvisor-ptrace-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/05/29 02:41 gvisor 919cfd12bd97 cf184559 .config console log report info ci-gvisor-ptrace-2-race panic: nested locking: kernfs.filesystemRWMutex:
2023/05/29 02:12 gvisor 919cfd12bd97 cf184559 .config console log report info ci-gvisor-ptrace-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/05/29 02:09 gvisor 919cfd12bd97 cf184559 .config console log report info ci-gvisor-ptrace-3-race panic: nested locking: kernfs.filesystemRWMutex:
2023/05/29 01:55 gvisor 919cfd12bd97 cf184559 .config console log report info ci-gvisor-ptrace-3-race panic: nested locking: kernfs.filesystemRWMutex:
2023/05/29 01:53 gvisor 919cfd12bd97 cf184559 .config console log report info ci-gvisor-ptrace-2-race panic: nested locking: kernfs.filesystemRWMutex:
2023/05/29 01:52 gvisor 919cfd12bd97 cf184559 .config console log report info ci-gvisor-systrap-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/05/29 01:48 gvisor 919cfd12bd97 cf184559 .config console log report info ci-gvisor-ptrace-3-race panic: nested locking: kernfs.filesystemRWMutex:
2023/05/28 08:19 gvisor 919cfd12bd97 cf184559 .config console log report info ci-gvisor-ptrace-3-race panic: nested locking: kernfs.filesystemRWMutex:
2023/05/24 20:15 gvisor 333bd93e1adf 4bce1a3e .config console log report info ci-gvisor-ptrace-3-race panic: nested locking: kernfs.filesystemRWMutex:
2023/05/21 23:28 gvisor 7e32a238387b 4bce1a3e .config console log report info ci-gvisor-ptrace-3-race-cover panic: nested locking: kernfs.filesystemRWMutex:
2023/05/15 08:05 gvisor c3abb8c00a58 2b9ba477 .config console log report info ci-gvisor-systrap-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/05/14 00:45 gvisor c3abb8c00a58 2b9ba477 .config console log report info ci-gvisor-ptrace-3-race panic: nested locking: kernfs.filesystemRWMutex:
2023/05/13 23:02 gvisor 4f665a8da58b 2b9ba477 .config console log report info ci-gvisor-ptrace-3-race panic: nested locking: kernfs.filesystemRWMutex:
2023/05/13 22:56 gvisor 4f665a8da58b 2b9ba477 .config console log report info ci-gvisor-ptrace-3-race panic: nested locking: kernfs.filesystemRWMutex:
2023/05/13 22:54 gvisor 4f665a8da58b 2b9ba477 .config console log report info ci-gvisor-systrap-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/05/11 06:34 gvisor a7e1fe92f588 0fbd49f4 .config console log report info ci-gvisor-ptrace-2-race panic: nested locking: kernfs.filesystemRWMutex:
2023/04/15 04:46 gvisor 927e99ebaacb ec410564 .config console log report info ci-gvisor-ptrace-2-race panic: nested locking: kernfs.filesystemRWMutex:
2023/05/05 16:02 gvisor 153f0217e6b2 abac29b5 .config console log report info ci-gvisor-arm64-ptrace-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/03/03 23:45 gvisor 35937b7f619c f8902b57 .config console log report info ci-gvisor-arm64-ptrace-1-race panic: nested locking: kernfs.filesystemRWMutex:
* Struck through repros no longer work on HEAD.