syzbot


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

Status: fixed on 2023/08/23 02:32
Fix commit: 755c1f242cd4 nsfs: mark inodes as anonymous
First crash: 477d, last: 462d
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: (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 1007 [running]:
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*filesystemRWMutex).Lock(0xc00024c230)
	bazel-out/k8-fastbuild-ST-3dcbe13c9b87/bin/pkg/sentry/fsimpl/kernfs/filesystem_mutex.go:31 +0x58
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Filesystem).Release(0xc00024c1e0, {0x786300, 0xc000d05500})
	pkg/sentry/fsimpl/kernfs/filesystem.go:262 +0x9b
gvisor.dev/gvisor/pkg/sentry/fsimpl/mqfs.(*filesystem).Release(0xc00024c1e0, {0x786300, 0xc000d05500})
	pkg/sentry/fsimpl/mqfs/mqfs.go:83 +0xc5
gvisor.dev/gvisor/pkg/sentry/vfs.(*Filesystem).DecRef.func1()
	pkg/sentry/vfs/filesystem.go:81 +0x11a
gvisor.dev/gvisor/pkg/sentry/vfs.(*FilesystemRefs).DecRef(0xc00024c1e0, 0xc0007e7570)
	bazel-out/k8-fastbuild-ST-3dcbe13c9b87/bin/pkg/sentry/vfs/filesystem_refs.go:132 +0xb2
gvisor.dev/gvisor/pkg/sentry/vfs.(*Filesystem).DecRef(0xc00024c1e0, {0x786300, 0xc000d05500})
	pkg/sentry/vfs/filesystem.go:77 +0x87
gvisor.dev/gvisor/pkg/sentry/vfs.(*Mount).destroy(0xc000ce3580, {0x786300, 0xc000d05500})
	pkg/sentry/vfs/mount.go:690 +0x1e5
gvisor.dev/gvisor/pkg/sentry/vfs.(*Mount).DecRef(0xc000ce3580, {0x786300, 0xc000d05500})
	pkg/sentry/vfs/mount.go:674 +0xcc
gvisor.dev/gvisor/pkg/sentry/fsimpl/mqfs.(*RegistryImpl).Destroy(0xc000ce91e8, {0x786300, 0xc000d05500})
	pkg/sentry/fsimpl/mqfs/registry.go:137 +0x91
gvisor.dev/gvisor/pkg/sentry/kernel/mq.(*Registry).Destroy(0xc000fb9320, {0x786300, 0xc000d05500})
	pkg/sentry/kernel/mq/mq.go:246 +0xe2
gvisor.dev/gvisor/pkg/sentry/kernel.(*IPCNamespace).Destroy(0xc000a230e0, {0x786300, 0xc000d05500})
	pkg/sentry/kernel/ipc_namespace.go:73 +0xc7
gvisor.dev/gvisor/pkg/sentry/fsimpl/nsfs.(*Inode).DecRef.func1()
	pkg/sentry/fsimpl/nsfs/nsfs.go:96 +0x8b
gvisor.dev/gvisor/pkg/sentry/fsimpl/nsfs.(*inodeRefs).DecRef(0xc000fc58e0, 0xc0007e77b0)
	bazel-out/k8-fastbuild-ST-3dcbe13c9b87/bin/pkg/sentry/fsimpl/nsfs/inode_refs.go:132 +0xb2
gvisor.dev/gvisor/pkg/sentry/fsimpl/nsfs.(*Inode).DecRef(0xc000fc5880, {0x786300, 0xc000d05500})
	pkg/sentry/fsimpl/nsfs/nsfs.go:96 +0x8b
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Dentry).destroy(0xc00063c750, {0x786300, 0xc000d05500})
	pkg/sentry/fsimpl/kernfs/kernfs.go:447 +0xd8
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Dentry).cacheLocked(0xc00063c750, {0x786300, 0xc000d05500})
	pkg/sentry/fsimpl/kernfs/kernfs.go:360 +0x7ed
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Dentry).DecRef(0xc00063c750, {0x786300, 0xc000d05500})
	pkg/sentry/fsimpl/kernfs/kernfs.go:296 +0x1a6
gvisor.dev/gvisor/pkg/sentry/vfs.(*Dentry).DecRef(0xc00063c750, {0x786300, 0xc000d05500})
	pkg/sentry/vfs/dentry.go:156 +0x71
gvisor.dev/gvisor/pkg/sentry/vfs.VirtualDentry.DecRef({0xc000704280?, 0xc00063c750?}, {0x786300, 0xc000d05500})
	pkg/sentry/vfs/vfs.go:1014 +0x6a
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).DecRef.func1()
	pkg/sentry/vfs/file_description.go:201 +0x4f0
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescriptionRefs).DecRef(0xc000677188, 0xc0007e7b30)
	bazel-out/k8-fastbuild-ST-3dcbe13c9b87/bin/pkg/sentry/vfs/file_description_refs.go:132 +0xb2
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).DecRef(0xc000677188, {0x786300, 0xc000d05500})
	pkg/sentry/vfs/file_description.go:161 +0x87
gvisor.dev/gvisor/pkg/sentry/kernel.(*FDTable).drop(0xc0007ee010?, {0x786300, 0xc000d05500}, 0x14af073?)
	pkg/sentry/kernel/fd_table.go:137 +0x119
gvisor.dev/gvisor/pkg/sentry/kernel.(*FDTable).RemoveIf(0xc0007ee000, {0x786300, 0xc000d05500}, 0x581248)
	pkg/sentry/kernel/fd_table.go:502 +0x174
gvisor.dev/gvisor/pkg/sentry/kernel.(*FDTable).DecRef.func1()
	pkg/sentry/kernel/fd_table.go:152 +0x65
gvisor.dev/gvisor/pkg/sentry/kernel.(*FDTableRefs).DecRef(0xc0007ee000, 0xc0007e7d28)
	bazel-out/k8-fastbuild-ST-3dcbe13c9b87/bin/pkg/sentry/kernel/fd_table_refs.go:132 +0xb2
gvisor.dev/gvisor/pkg/sentry/kernel.(*FDTable).DecRef(0xc0007ee000, {0x786300, 0xc000d05500})
	pkg/sentry/kernel/fd_table.go:151 +0x87
gvisor.dev/gvisor/pkg/sentry/kernel.(*runExitMain).execute(0xc000d05500, 0xc000d05500)
	pkg/sentry/kernel/task_exit.go:281 +0x7e9
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc000d05500, 0x56)
	pkg/sentry/kernel/task_run.go:98 +0x35b
created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start
	pkg/sentry/kernel/task_start.go:389 +0x1da

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/08/06 20:40 gvisor 8f6af3062d21 4ffcc9ef .config console log report syz C ci-gvisor-ptrace-2-race-cover panic: nested locking: kernfs.filesystemRWMutex:
2023/08/06 19:58 gvisor 8f6af3062d21 4ffcc9ef .config console log report syz C ci-gvisor-systrap-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/08/06 19:50 gvisor 8f6af3062d21 4ffcc9ef .config console log report syz C ci-gvisor-ptrace-1-race panic: nested locking: kernfs.filesystemRWMutex:
2023/08/06 19:38 gvisor 8f6af3062d21 4ffcc9ef .config console log report syz C ci-gvisor-ptrace-2-race panic: nested locking: kernfs.filesystemRWMutex:
2023/08/06 19:12 gvisor 8f6af3062d21 4ffcc9ef .config console log report syz C ci-gvisor-ptrace-3-race panic: nested locking: kernfs.filesystemRWMutex:
2023/08/22 14:54 gvisor baf097a14df6 b81ca3f6 .config console log report info ci-gvisor-ptrace-1-race-cover panic: nested locking: kernfs.filesystemRWMutex:
2023/08/10 01:50 gvisor 582bf0d72d96 a1790533 .config console log report info ci-gvisor-ptrace-3-race-cover panic: nested locking: kernfs.filesystemRWMutex:
2023/08/06 18:55 gvisor 8f6af3062d21 4ffcc9ef .config console log report info ci-gvisor-ptrace-3-race panic: nested locking: kernfs.filesystemRWMutex:
* Struck through repros no longer work on HEAD.