syzbot


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

Status: fixed on 2021/05/15 09:36
Fix commit: 78ae3db1a39c Fix cgroup hierarchy registration.
First crash: 1309d, last: 1309d
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 (3) 1 376d 376d 26/26 fixed on 2023/11/17 08:30
gvisor panic: Incrementing non-positive count ADDR on vfs.Filesystem (2) 1 1287d 1287d 14/26 fixed on 2021/05/20 23:44

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

goroutine 2332 [running]:
panic(0x10737a0, 0xc0005a01c0)
	GOROOT/src/runtime/panic.go:1064 +0x545 fp=0xc00098b498 sp=0xc00098b3d0 pc=0x437265
gvisor.dev/gvisor/pkg/sentry/vfs.(*FilesystemRefs).IncRef(0xc001098000)
	bazel-out/k8-fastbuild-ST-4c64f0b3d5c7/bin/pkg/sentry/vfs/filesystem_refs.go:72 +0x15f fp=0xc00098b510 sp=0xc00098b498 pc=0x747f1f
gvisor.dev/gvisor/pkg/sentry/kernel.(*CgroupRegistry).FindHierarchy(0xc0003f1a40, 0x1bdf380, 0x5, 0x5, 0x0)
	pkg/sentry/kernel/cgroup.go:175 +0x15c fp=0xc00098b5d8 sp=0xc00098b510 pc=0x9a5e5c
gvisor.dev/gvisor/pkg/sentry/fsimpl/cgroupfs.FilesystemType.GetFilesystem(0x13f9e20, 0xc001753500, 0xc00027f088, 0xc000294720, 0xc000f1ea00, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	pkg/sentry/fsimpl/cgroupfs/cgroupfs.go:222 +0x60e fp=0xc00098b750 sp=0xc00098b5d8 pc=0xc20cce
gvisor.dev/gvisor/pkg/sentry/fsimpl/cgroupfs.(*FilesystemType).GetFilesystem(0x1c1cbe8, 0x13f9e20, 0xc001753500, 0xc00027f088, 0xc000294720, 0xc000f1ea00, 0x0, 0x0, 0x0, 0x0, ...)
	<autogenerated>:1 +0xc5 fp=0xc00098b7d0 sp=0xc00098b750 pc=0xc2b005
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).MountDisconnected(0xc00027f088, 0x13f9e20, 0xc001753500, 0xc000294720, 0xc000f1ea00, 0x0, 0xc000f1e800, 0x6, 0xc00098ba50, 0x0, ...)
	pkg/sentry/vfs/mount.go:200 +0x13e fp=0xc00098b8a0 sp=0xc00098b7d0 pc=0x74c49e
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).MountAt(0xc00027f088, 0x13f9e20, 0xc001753500, 0xc000294720, 0xc000f1ea00, 0x0, 0xc00098ba80, 0xc000f1e800, 0x6, 0xc00098ba50, ...)
	pkg/sentry/vfs/mount.go:273 +0xd4 fp=0xc00098b940 sp=0xc00098b8a0 pc=0x74cb94
gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Mount(0xc001753500, 0x20000040, 0x20000080, 0x200000c0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, ...)
	pkg/sentry/syscalls/linux/vfs2/mount.go:113 +0x499 fp=0xc00098baf8 sp=0xc00098b940 pc=0xdde2d9
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc001753500, 0xa5, 0x20000040, 0x20000080, 0x200000c0, 0x0, 0x0, 0x1, 0x1, 0x12688c0, ...)
	pkg/sentry/kernel/task_syscall.go:104 +0x13c fp=0xc00098bc58 sp=0xc00098baf8 pc=0x9e745c
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc001753500, 0xa5, 0x20000040, 0x20000080, 0x200000c0, 0x0, 0x0, 0x1, 0x0, 0x1)
	pkg/sentry/kernel/task_syscall.go:239 +0x66 fp=0xc00098bce0 sp=0xc00098bc58 pc=0x9e8626
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc001753500, 0xa5, 0x20000040, 0x20000080, 0x200000c0, 0x0, 0x0, 0x1, 0xe38825, 0xc00048ae88)
	pkg/sentry/kernel/task_syscall.go:199 +0x98 fp=0xc00098bd40 sp=0xc00098bce0 pc=0x9e81d8
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc001753500, 0x2, 0xc001753500)
	pkg/sentry/kernel/task_syscall.go:174 +0x15c fp=0xc00098be10 sp=0xc00098bd40 pc=0x9e7b7c
gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc001753500, 0x13c7640, 0x0)
	pkg/sentry/kernel/task_run.go:282 +0xc45 fp=0xc00098bf60 sp=0xc00098be10 pc=0x9dbf25
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc001753500, 0xac)
	pkg/sentry/kernel/task_run.go:97 +0x1af fp=0xc00098bfd0 sp=0xc00098bf60 pc=0x9dabef
runtime.goexit()
	src/runtime/asm_amd64.s:1374 +0x1 fp=0xc00098bfd8 sp=0xc00098bfd0 pc=0x4709a1
created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start
	pkg/sentry/kernel/task_start.go:328 +0xfe

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/04/27 07:02 gvisor 5b7b7daa425f 8ee2dea6 .config console log report syz C ci-gvisor-ptrace-1 panic: Incrementing non-positive count ADDR on vfs.Filesystem
2021/04/27 05:37 gvisor 5b7b7daa425f 8ee2dea6 .config console log report info ci-gvisor-ptrace-2-race panic: Incrementing non-positive count ADDR on vfs.Filesystem
* Struck through repros no longer work on HEAD.