syzbot


panic: Incrementing non-positive count ADDR on vfs.Filesystem (2)

Status: fixed on 2021/05/20 23:44
Fix commit: af229f46a149 Fix cgroupfs mount racing with unmount.
First crash: 1287d, last: 1287d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
gvisor panic: Incrementing non-positive count ADDR on vfs.Filesystem C 2 1309d 1309d 14/26 fixed on 2021/05/15 09:36
gvisor panic: Incrementing non-positive count ADDR on vfs.Filesystem (3) 1 376d 376d 26/26 fixed on 2023/11/17 08:30

Sample crash report:
panic: Incrementing non-positive count 0xc005e68a00 on vfs.Filesystem

goroutine 1126752 [running]:
panic(0x1042400, 0xc00624c440)
	GOROOT/src/runtime/panic.go:1065 +0x565 fp=0xc003e23468 sp=0xc003e233a0 pc=0x437c65
gvisor.dev/gvisor/pkg/sentry/vfs.(*FilesystemRefs).IncRef(0xc005e68a00)
	bazel-out/k8-fastbuild-ST-4c64f0b3d5c7/bin/pkg/sentry/vfs/filesystem_refs.go:80 +0x15f fp=0xc003e234e0 sp=0xc003e23468 pc=0x73bc7f
gvisor.dev/gvisor/pkg/sentry/kernel.(*CgroupRegistry).FindHierarchy(0xc0003b7620, 0x1bae8a0, 0x5, 0x5, 0x0)
	pkg/sentry/kernel/cgroup.go:184 +0x15c fp=0xc003e235a8 sp=0xc003e234e0 pc=0x97231c
gvisor.dev/gvisor/pkg/sentry/fsimpl/cgroupfs.FilesystemType.GetFilesystem(0x13c65a0, 0xc006316a80, 0xc000303088, 0xc0006197a0, 0xc00655a000, 0x8, 0x0, 0x0, 0x0, 0x0, ...)
	pkg/sentry/fsimpl/cgroupfs/cgroupfs.go:227 +0x618 fp=0xc003e23710 sp=0xc003e235a8 pc=0xc0a638
gvisor.dev/gvisor/pkg/sentry/fsimpl/cgroupfs.(*FilesystemType).GetFilesystem(0x1be8df0, 0x13c65a0, 0xc006316a80, 0xc000303088, 0xc0006197a0, 0xc00655a000, 0x8, 0x0, 0x0, 0x0, ...)
	<autogenerated>:1 +0xc5 fp=0xc003e23790 sp=0xc003e23710 pc=0xc14905
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).MountDisconnected(0xc000303088, 0x13c65a0, 0xc006316a80, 0xc0006197a0, 0xc00655a000, 0x8, 0xc006513f00, 0x6, 0xc003e23a10, 0x0, ...)
	pkg/sentry/vfs/mount.go:200 +0x13e fp=0xc003e23860 sp=0xc003e23790 pc=0x74023e
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).MountAt(0xc000303088, 0x13c65a0, 0xc006316a80, 0xc0006197a0, 0xc00655a000, 0x8, 0xc003e23a40, 0xc006513f00, 0x6, 0xc003e23a10, ...)
	pkg/sentry/vfs/mount.go:273 +0xd4 fp=0xc003e23900 sp=0xc003e23860 pc=0x740934
gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Mount(0xc006316a80, 0x20000000, 0x20000040, 0x20000080, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	pkg/sentry/syscalls/linux/vfs2/mount.go:113 +0x52f fp=0xc003e23b08 sp=0xc003e23900 pc=0xdcf0cf
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc006316a80, 0xa5, 0x20000000, 0x20000040, 0x20000080, 0x0, 0x0, 0x0, 0x1, 0x1230fe0, ...)
	pkg/sentry/kernel/task_syscall.go:102 +0x13c fp=0xc003e23c68 sp=0xc003e23b08 pc=0x9b3c5c
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc006316a80, 0xa5, 0x20000000, 0x20000040, 0x20000080, 0x0, 0x0, 0x0, 0x0, 0x0)
	pkg/sentry/kernel/task_syscall.go:237 +0x66 fp=0xc003e23cf0 sp=0xc003e23c68 pc=0x9b4e26
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc006316a80, 0xa5, 0x20000000, 0x20000040, 0x20000080, 0x0, 0x0, 0x0, 0xe2980e, 0xc002544460)
	pkg/sentry/kernel/task_syscall.go:197 +0x98 fp=0xc003e23d50 sp=0xc003e23cf0 pc=0x9b49d8
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc006316a80, 0x2, 0xc006316a80)
	pkg/sentry/kernel/task_syscall.go:172 +0x15c fp=0xc003e23e20 sp=0xc003e23d50 pc=0x9b437c
gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc006316a80, 0x139c300, 0x0)
	pkg/sentry/kernel/task_run.go:282 +0xca5 fp=0xc003e23f60 sp=0xc003e23e20 pc=0x9a86e5
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc006316a80, 0xc4f)
	pkg/sentry/kernel/task_run.go:97 +0x1af fp=0xc003e23fd0 sp=0xc003e23f60 pc=0x9a734f
runtime.goexit()
	src/runtime/asm_amd64.s:1371 +0x1 fp=0xc003e23fd8 sp=0xc003e23fd0 pc=0x472821
created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start
	pkg/sentry/kernel/task_start.go:328 +0xfe

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/05/18 23:43 gvisor 32b66bb2be1b a343ba6b .config console log report info ci-gvisor-ptrace-1 panic: Incrementing non-positive count ADDR on vfs.Filesystem
* Struck through repros no longer work on HEAD.