syzbot


panic: expected socket to exist at '!N

Status: fixed on 2023/10/19 08:45
Fix commit: 707ac55a05d7 inet: don't reuse names from the abstract socket namespace map
First crash: 407d, last: 407d

Sample crash report:
panic: expected socket to exist at '�!N��������������������������������������������������������������������������������������������������������' in abstract socket namespace

goroutine 293 [running]:
panic({0x297640?, 0xc00064a790?})
	GOROOT/src/runtime/panic.go:1017 +0x3ac fp=0xc0006e6dd8 sp=0xc0006e6d28 pc=0x120672c
gvisor.dev/gvisor/pkg/sentry/inet.(*AbstractSocketNamespace).Remove(0xc00091c038, {0xc00030b341, 0x6b}, {0x711280?, 0xc0003f83c0})
	pkg/sentry/inet/abstract_socket_namespace.go:141 +0x2f4 fp=0xc0006e6f08 sp=0xc0006e6dd8 pc=0x1a99814
gvisor.dev/gvisor/pkg/sentry/socket/unix.(*Socket).DecRef.func1()
	pkg/sentry/socket/unix/unix.go:120 +0x15a fp=0xc0006e6f78 sp=0xc0006e6f08 pc=0x1d3c2da
gvisor.dev/gvisor/pkg/sentry/socket/unix.(*socketRefs).DecRef(0xc0003f8440, 0xc0006e6fe8)
	bazel-out/k8-fastbuild-ST-3dcbe13c9b87/bin/pkg/sentry/socket/unix/socket_refs.go:132 +0xaf fp=0xc0006e6fd8 sp=0xc0006e6f78 pc=0x1d3b74f
gvisor.dev/gvisor/pkg/sentry/socket/unix.(*Socket).DecRef(0xc0003f83c0, {0x71f4b8, 0xc000292a80})
	pkg/sentry/socket/unix/unix.go:116 +0x94 fp=0xc0006e7018 sp=0xc0006e6fd8 pc=0x1d3c134
gvisor.dev/gvisor/pkg/sentry/socket/unix.(*Socket).Release(0xc0003f83c0?, {0x71f4b8, 0xc000292a80})
	pkg/sentry/socket/unix/unix.go:132 +0x4c fp=0xc0006e7048 sp=0xc0006e7018 pc=0x1d3c3ac
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).DecRef.func1()
	pkg/sentry/vfs/file_description.go:197 +0x48f fp=0xc0006e7188 sp=0xc0006e7048 pc=0x17b578f
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescriptionRefs).DecRef(0xc0003f83c0, 0xc0006e71f8)
	bazel-out/k8-fastbuild-ST-3dcbe13c9b87/bin/pkg/sentry/vfs/file_description_refs.go:132 +0xaf fp=0xc0006e71e8 sp=0xc0006e7188 pc=0x17bfbcf
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).DecRef(0xc0003f83c0, {0x71f4b8, 0xc000292a80})
	pkg/sentry/vfs/file_description.go:161 +0x7a fp=0xc0006e7228 sp=0xc0006e71e8 pc=0x17b52ba
gvisor.dev/gvisor/pkg/sentry/kernel.(*FDTable).drop(0xc000914680?, {0x71f4b8, 0xc000292a80}, 0x3?)
	pkg/sentry/kernel/fd_table.go:137 +0x110 fp=0xc0006e72a8 sp=0xc0006e7228 pc=0x1ae2b50
gvisor.dev/gvisor/pkg/sentry/kernel.(*FDTable).NewFDAt(0xc0003f8480?, {0x71f4b8, 0xc000292a80}, 0x3f8480?, 0x1242969?, {0x70?})
	pkg/sentry/kernel/fd_table.go:321 +0xc5 fp=0xc0006e7318 sp=0xc0006e72a8 pc=0x1ae44a5
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).NewFDAt(0xc000292a80, 0x64a320?, 0x0?, {0x0?})
	pkg/sentry/kernel/task.go:778 +0x8c fp=0xc0006e7380 sp=0xc0006e7318 pc=0x1b1fe2c
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.dup3(0xc000292a80, 0x12412cc?, 0x3, 0x0)
	pkg/sentry/syscalls/linux/sys_file.go:572 +0x173 fp=0xc0006e7468 sp=0xc0006e7380 pc=0x1d79bf3
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Dup3(0xc0006e7540?, 0x1239d6e?, {{0x4}, {0x3}, {0x0}, {0x0}, {0x7f91a8544a87}, {0x5642b3608338}})
	pkg/sentry/syscalls/linux/sys_file.go:558 +0x105 fp=0xc0006e74d0 sp=0xc0006e7468 pc=0x1d79a25
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc000292a80, 0x124, {{0x4}, {0x3}, {0x0}, {0x0}, {0x7f91a8544a87}, {0x5642b3608338}})
	pkg/sentry/kernel/task_syscall.go:142 +0xaff fp=0xc0006e7908 sp=0xc0006e74d0 pc=0x1b6285f
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc000292a80, 0x1?, {{0x4}, {0x3}, {0x0}, {0x0}, {0x7f91a8544a87}, {0x5642b3608338}})
	pkg/sentry/kernel/task_syscall.go:322 +0x7d fp=0xc0006e79c0 sp=0xc0006e7908 pc=0x1b6491d
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc00002e870?, 0x1242969?, {{0x4}, {0x3}, {0x0}, {0x0}, {0x7f91a8544a87}, {0x5642b3608338}})
	pkg/sentry/kernel/task_syscall.go:282 +0xbd fp=0xc0006e7a38 sp=0xc0006e79c0 pc=0x1b6421d
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc000292a80)
	pkg/sentry/kernel/task_syscall.go:257 +0x55b fp=0xc0006e7b70 sp=0xc0006e7a38 pc=0x1b63d7b
gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0xc000292a80?, 0xc000292a80)
	pkg/sentry/kernel/task_run.go:269 +0x2387 fp=0xc0006e7e60 sp=0xc0006e7b70 pc=0x1b4cc67
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc000292a80, 0xa)
	pkg/sentry/kernel/task_run.go:98 +0x36a fp=0xc0006e7fb0 sp=0xc0006e7e60 pc=0x1b49fca
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start.func1()
	pkg/sentry/kernel/task_start.go:391 +0x45 fp=0xc0006e7fe0 sp=0xc0006e7fb0 pc=0x1b600c5
runtime.goexit()
	src/runtime/asm_amd64.s:1650 +0x1 fp=0xc0006e7fe8 sp=0xc0006e7fe0 pc=0x123f741
created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start in goroutine 13
	pkg/sentry/kernel/task_start.go:391 +0x1ce

Crashes (23):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/10/16 12:28 gvisor febb0656f347 f757a323 .config console log report syz C ci-gvisor-ptrace-1-race-cover panic: expected socket to exist at '!N
2023/10/16 12:22 gvisor febb0656f347 f757a323 .config console log report syz C ci-gvisor-ptrace-2-race-cover panic: expected socket to exist at '!N
2023/10/16 12:21 gvisor febb0656f347 f757a323 .config console log report syz C ci-gvisor-systrap-1-race-cover panic: expected socket to exist at '!N
2023/10/16 11:56 gvisor febb0656f347 f757a323 .config console log report syz C ci-gvisor-ptrace-3-race-cover panic: expected socket to exist at '!N
2023/10/16 11:55 gvisor febb0656f347 f757a323 .config console log report syz C ci-gvisor-systrap-1-cover panic: expected socket to exist at '!N
2023/10/16 11:52 gvisor febb0656f347 f757a323 console log report syz C ci-gvisor-ptrace-2 panic: expected socket to exist at '!N
2023/10/16 11:51 gvisor febb0656f347 f757a323 .config console log report syz C ci-gvisor-ptrace-1-race panic: expected socket to exist at '!N
2023/10/16 11:50 gvisor febb0656f347 f757a323 console log report syz C ci-gvisor-kvm panic: expected socket to exist at '!N
2023/10/16 11:50 gvisor febb0656f347 f757a323 console log report syz C ci-gvisor-systrap-1 panic: expected socket to exist at '!N
2023/10/16 11:50 gvisor febb0656f347 f757a323 .config console log report syz C ci-gvisor-kvm-cover panic: expected socket to exist at '!N
2023/10/16 11:49 gvisor febb0656f347 f757a323 .config console log report syz C ci-gvisor-ptrace-2-cover panic: expected socket to exist at '!N
2023/10/16 11:49 gvisor febb0656f347 f757a323 .config console log report syz C ci-gvisor-systrap-1-race panic: expected socket to exist at '!N
2023/10/16 11:49 gvisor febb0656f347 f757a323 .config console log report syz C ci-gvisor-ptrace-1-cover panic: expected socket to exist at '!N
2023/10/16 11:45 gvisor febb0656f347 f757a323 .config console log report syz C ci-gvisor-ptrace-3-race panic: expected socket to exist at '!N
2023/10/16 11:45 gvisor febb0656f347 f757a323 console log report syz C ci-gvisor-ptrace-3 panic: expected socket to exist at '!N
2023/10/16 11:44 gvisor febb0656f347 f757a323 .config console log report syz C ci-gvisor-ptrace-3-cover panic: expected socket to exist at '!N
2023/10/16 11:26 gvisor febb0656f347 f757a323 .config console log report syz C ci-gvisor-ptrace-2-race panic: expected socket to exist at '!N
2023/10/16 12:18 gvisor febb0656f347 f757a323 .config console log report syz C ci-gvisor-arm64-systrap-1-cover panic: expected socket to exist at '!N
2023/10/16 11:58 gvisor febb0656f347 f757a323 console log report syz C ci-gvisor-arm64-ptrace-1 panic: expected socket to exist at '!N
2023/10/16 11:57 gvisor febb0656f347 f757a323 console log report syz C ci-gvisor-arm64-systrap-1 panic: expected socket to exist at '!N
2023/10/16 11:52 gvisor febb0656f347 f757a323 .config console log report syz C ci-gvisor-arm64-ptrace-1-cover panic: expected socket to exist at '!N
2023/10/16 11:49 gvisor febb0656f347 f757a323 console log report syz ci-gvisor-ptrace-1 panic: expected socket to exist at '!N
2023/10/16 11:13 gvisor febb0656f347 f757a323 .config console log report info ci-gvisor-ptrace-2-race panic: expected socket to exist at '!N
* Struck through repros no longer work on HEAD.