syzbot


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

Status: fixed on 2023/11/17 08:30
Fix commit: 77b137ffd8ec Fix umount not unmounting all the mounts it is supposed to.
First crash: 376d, last: 376d
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 (2) 1 1287d 1287d 14/26 fixed on 2021/05/20 23:44

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

goroutine 2740129 [running]:
panic({0x298360?, 0xc0098d8070?})
	GOROOT/src/runtime/panic.go:1017 +0x3ac fp=0xc0048a6c90 sp=0xc0048a6be0 pc=0x12bcd6c
gvisor.dev/gvisor/pkg/sentry/vfs.(*FilesystemRefs).IncRef(0xc0002464e0)
	bazel-out/k8-fastbuild-ST-3dcbe13c9b87/bin/pkg/sentry/vfs/filesystem_refs.go:81 +0x108 fp=0xc0048a6cf8 sp=0xc0048a6c90 pc=0x1842108
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).NewDisconnectedMount(0xc00025ac50?, 0xc0002464e0, 0xc0001f7800, 0xc003f19b30?)
	pkg/sentry/vfs/mount.go:238 +0x3c fp=0xc0048a6d48 sp=0xc0048a6cf8 pc=0x1848edc
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).cloneMount(0xc00045e1d8, 0xc00025abb0, 0xc000baef20?, 0x0, 0x0)
	pkg/sentry/vfs/mount.go:399 +0x145 fp=0xc0048a6e40 sp=0xc0048a6d48 pc=0x184a8c5
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).cloneMountTree(0xc00045e1d8?, {0x7efef8, 0xc007dbaa80}, 0xc00025a630, 0xc003f5c870?, 0x0?, 0xc0048a7108)
	pkg/sentry/vfs/mount.go:461 +0x3a5 fp=0xc0048a6fd8 sp=0xc0048a6e40 pc=0x184b145
gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).CloneMountNamespace(0xc00045e1d8, {0x7efef8, 0xc007dbaa80}, 0xc002574a80, 0xc0002fb440, 0xc00a5c1750, 0xc00a5c1760, {0x7d26a0, 0xc00045e000})
	pkg/sentry/vfs/namespace.go:180 +0x41b fp=0xc0048a7198 sp=0xc0048a6fd8 pc=0x185735b
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Unshare(0xc007dbaa80, 0x20000)
	pkg/sentry/kernel/task_clone.go:666 +0x15cd fp=0xc0048a74a0 sp=0xc0048a7198 pc=0x1bd9f2d
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Unshare(0x12f8f69?, 0xc0048a7598?, {{0x20000}, {0x7}, {0x7f78f158e740}, {0x0}, {0x0}, {0x55da163ec320}})
	pkg/sentry/syscalls/linux/sys_thread.go:494 +0x4d fp=0xc0048a74d8 sp=0xc0048a74a0 pc=0x1e4a3cd
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc007dbaa80, 0x110, {{0x20000}, {0x7}, {0x7f78f158e740}, {0x0}, {0x0}, {0x55da163ec320}})
	pkg/sentry/kernel/task_syscall.go:142 +0x8b5 fp=0xc0048a78f8 sp=0xc0048a74d8 pc=0x1c09b15
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc007dbaa80, 0x253b240?, {{0x20000}, {0x7}, {0x7f78f158e740}, {0x0}, {0x0}, {0x55da163ec320}})
	pkg/sentry/kernel/task_syscall.go:322 +0x6c fp=0xc0048a7998 sp=0xc0048a78f8 pc=0x1c0b94c
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc0048a7b58?, 0x2125e59?, {{0x20000}, {0x7}, {0x7f78f158e740}, {0x0}, {0x0}, {0x55da163ec320}})
	pkg/sentry/kernel/task_syscall.go:282 +0x87 fp=0xc0048a7a10 sp=0xc0048a7998 pc=0x1c0b307
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc007dbaa80)
	pkg/sentry/kernel/task_syscall.go:257 +0x4f0 fp=0xc0048a7b68 sp=0xc0048a7a10 pc=0x1c0ae90
gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0xc007dbaa80?, 0xc007dbaa80)
	pkg/sentry/kernel/task_run.go:269 +0x1e08 fp=0xc0048a7e70 sp=0xc0048a7b68 pc=0x1bf5708
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc007dbaa80, 0x22e7)
	pkg/sentry/kernel/task_run.go:98 +0x43b fp=0xc0048a7fb0 sp=0xc0048a7e70 pc=0x1bf301b
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start.func1()
	pkg/sentry/kernel/task_start.go:391 +0x45 fp=0xc0048a7fe0 sp=0xc0048a7fb0 pc=0x1c078a5
runtime.goexit()
	src/runtime/asm_amd64.s:1650 +0x1 fp=0xc0048a7fe8 sp=0xc0048a7fe0 pc=0x12f5d81
created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start in goroutine 2740155
	pkg/sentry/kernel/task_start.go:391 +0x1ae

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/11/15 15:54 gvisor 3ab01aedb874 cb976f63 .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.