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: 408d, last: 407d

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

goroutine 436 [running]:
panic({0x297640?, 0xc0006a82d0?})
	GOROOT/src/runtime/panic.go:1017 +0x3ac fp=0xc00063cdd8 sp=0xc00063cd28 pc=0x120672c
gvisor.dev/gvisor/pkg/sentry/inet.(*AbstractSocketNamespace).Remove(0xc0009c8038, {0xc00040dce1, 0x6b}, {0x711280?, 0xc00059a540})
	pkg/sentry/inet/abstract_socket_namespace.go:141 +0x2f4 fp=0xc00063cf08 sp=0xc00063cdd8 pc=0x1a99814
gvisor.dev/gvisor/pkg/sentry/socket/unix.(*Socket).DecRef.func1()
	pkg/sentry/socket/unix/unix.go:120 +0x15a fp=0xc00063cf78 sp=0xc00063cf08 pc=0x1d3c2da
gvisor.dev/gvisor/pkg/sentry/socket/unix.(*socketRefs).DecRef(0xc00059a5c0, 0xc00063cfe8)
	bazel-out/k8-fastbuild-ST-3dcbe13c9b87/bin/pkg/sentry/socket/unix/socket_refs.go:132 +0xaf fp=0xc00063cfd8 sp=0xc00063cf78 pc=0x1d3b74f
gvisor.dev/gvisor/pkg/sentry/socket/unix.(*Socket).DecRef(0xc00059a540, {0x71f4b8, 0xc0008fca80})
	pkg/sentry/socket/unix/unix.go:116 +0x94 fp=0xc00063d018 sp=0xc00063cfd8 pc=0x1d3c134
gvisor.dev/gvisor/pkg/sentry/socket/unix.(*Socket).Release(0xc00059a540?, {0x71f4b8, 0xc0008fca80})
	pkg/sentry/socket/unix/unix.go:132 +0x4c fp=0xc00063d048 sp=0xc00063d018 pc=0x1d3c3ac
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).DecRef.func1()
	pkg/sentry/vfs/file_description.go:197 +0x48f fp=0xc00063d188 sp=0xc00063d048 pc=0x17b578f
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescriptionRefs).DecRef(0xc00059a540, 0xc00063d1f8)
	bazel-out/k8-fastbuild-ST-3dcbe13c9b87/bin/pkg/sentry/vfs/file_description_refs.go:132 +0xaf fp=0xc00063d1e8 sp=0xc00063d188 pc=0x17bfbcf
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).DecRef(0xc00059a540, {0x71f4b8, 0xc0008fca80})
	pkg/sentry/vfs/file_description.go:161 +0x7a fp=0xc00063d228 sp=0xc00063d1e8 pc=0x17b52ba
gvisor.dev/gvisor/pkg/sentry/kernel.(*FDTable).drop(0xc00025b1c0?, {0x71f4b8, 0xc0008fca80}, 0x3?)
	pkg/sentry/kernel/fd_table.go:137 +0x110 fp=0xc00063d2a8 sp=0xc00063d228 pc=0x1ae2b50
gvisor.dev/gvisor/pkg/sentry/kernel.(*FDTable).NewFDAt(0xc000d9c3c0?, {0x71f4b8, 0xc0008fca80}, 0xd9c3c0?, 0x1242969?, {0x70?})
	pkg/sentry/kernel/fd_table.go:321 +0xc5 fp=0xc00063d318 sp=0xc00063d2a8 pc=0x1ae44a5
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).NewFDAt(0xc0008fca80, 0x0?, 0x0?, {0xc0?})
	pkg/sentry/kernel/task.go:778 +0x8c fp=0xc00063d380 sp=0xc00063d318 pc=0x1b1fe2c
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.dup3(0xc0008fca80, 0x12412cc?, 0x3, 0x0)
	pkg/sentry/syscalls/linux/sys_file.go:572 +0x173 fp=0xc00063d468 sp=0xc00063d380 pc=0x1d79bf3
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Dup2(0xc00063d540?, 0x1239d6e?, {{0x4}, {0x3}, {0xffffffffffffffb0}, {0x7f7a89d0e6c0}, {0x7f7a89d0e6c0}, {0x7f7a89d0e6c0}})
	pkg/sentry/syscalls/linux/sys_file.go:545 +0x155 fp=0xc00063d4d0 sp=0xc00063d468 pc=0x1d798b5
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc0008fca80, 0x21, {{0x4}, {0x3}, {0xffffffffffffffb0}, {0x7f7a89d0e6c0}, {0x7f7a89d0e6c0}, {0x7f7a89d0e6c0}})
	pkg/sentry/kernel/task_syscall.go:142 +0xaff fp=0xc00063d908 sp=0xc00063d4d0 pc=0x1b6285f
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc0008fca80, 0x1?, {{0x4}, {0x3}, {0xffffffffffffffb0}, {0x7f7a89d0e6c0}, {0x7f7a89d0e6c0}, {0x7f7a89d0e6c0}})
	pkg/sentry/kernel/task_syscall.go:322 +0x7d fp=0xc00063d9c0 sp=0xc00063d908 pc=0x1b6491d
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc000bba1e0?, 0x1242969?, {{0x4}, {0x3}, {0xffffffffffffffb0}, {0x7f7a89d0e6c0}, {0x7f7a89d0e6c0}, {0x7f7a89d0e6c0}})
	pkg/sentry/kernel/task_syscall.go:282 +0xbd fp=0xc00063da38 sp=0xc00063d9c0 pc=0x1b6421d
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc0008fca80)
	pkg/sentry/kernel/task_syscall.go:257 +0x55b fp=0xc00063db70 sp=0xc00063da38 pc=0x1b63d7b
gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0xc0008fca80?, 0xc0008fca80)
	pkg/sentry/kernel/task_run.go:269 +0x2387 fp=0xc00063de60 sp=0xc00063db70 pc=0x1b4cc67
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc0008fca80, 0x16)
	pkg/sentry/kernel/task_run.go:98 +0x36a fp=0xc00063dfb0 sp=0xc00063de60 pc=0x1b49fca
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start.func1()
	pkg/sentry/kernel/task_start.go:391 +0x45 fp=0xc00063dfe0 sp=0xc00063dfb0 pc=0x1b600c5
runtime.goexit()
	src/runtime/asm_amd64.s:1650 +0x1 fp=0xc00063dfe8 sp=0xc00063dfe0 pc=0x123f741
created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start in goroutine 423
	pkg/sentry/kernel/task_start.go:391 +0x1ce

Crashes (20):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/10/15 08:13 gvisor febb0656f347 f757a323 .config console log report syz C ci-gvisor-ptrace-1-race-cover panic: expected socket to exist at ' N
2023/10/15 06:17 gvisor febb0656f347 f757a323 console log report syz C ci-gvisor-kvm panic: expected socket to exist at ' N
2023/10/15 02:19 gvisor 2501d8282ddf f757a323 .config console log report syz C ci-gvisor-kvm-cover panic: expected socket to exist at ' N
2023/10/15 01:49 gvisor 2501d8282ddf f757a323 .config console log report syz C ci-gvisor-ptrace-3-race-cover panic: expected socket to exist at ' N
2023/10/15 01:49 gvisor 2501d8282ddf f757a323 .config console log report syz C ci-gvisor-ptrace-2-race-cover panic: expected socket to exist at ' N
2023/10/15 01:47 gvisor 2501d8282ddf f757a323 .config console log report syz C ci-gvisor-systrap-1-race-cover panic: expected socket to exist at ' N
2023/10/15 01:42 gvisor 2501d8282ddf f757a323 .config console log report syz C ci-gvisor-ptrace-1-cover panic: expected socket to exist at ' N
2023/10/15 01:41 gvisor 2501d8282ddf f757a323 .config console log report syz C ci-gvisor-systrap-1-cover panic: expected socket to exist at ' N
2023/10/15 01:38 gvisor 2501d8282ddf f757a323 .config console log report syz C ci-gvisor-ptrace-3-race panic: expected socket to exist at ' N
2023/10/15 01:37 gvisor 2501d8282ddf f757a323 .config console log report syz C ci-gvisor-ptrace-3-cover panic: expected socket to exist at ' N
2023/10/15 01:36 gvisor 2501d8282ddf f757a323 .config console log report syz C ci-gvisor-ptrace-2-race panic: expected socket to exist at ' N
2023/10/15 01:36 gvisor 2501d8282ddf f757a323 .config console log report syz C ci-gvisor-ptrace-1-race panic: expected socket to exist at ' N
2023/10/15 01:35 gvisor 2501d8282ddf f757a323 console log report syz C ci-gvisor-ptrace-2 panic: expected socket to exist at ' N
2023/10/15 01:34 gvisor 2501d8282ddf f757a323 console log report syz C ci-gvisor-systrap-1 panic: expected socket to exist at ' N
2023/10/15 01:32 gvisor 2501d8282ddf f757a323 console log report syz C ci-gvisor-ptrace-3 panic: expected socket to exist at ' N
2023/10/15 01:31 gvisor 2501d8282ddf f757a323 console log report syz C ci-gvisor-ptrace-1 panic: expected socket to exist at ' N
2023/10/15 01:31 gvisor 2501d8282ddf f757a323 .config console log report syz C ci-gvisor-ptrace-2-cover panic: expected socket to exist at ' N
2023/10/15 01:20 gvisor 2501d8282ddf f757a323 .config console log report syz C ci-gvisor-systrap-1-race panic: expected socket to exist at ' N
2023/10/15 19:24 gvisor febb0656f347 f757a323 .config console log report info ci-gvisor-ptrace-1-race panic: expected socket to exist at ' N
2023/10/15 01:07 gvisor 2501d8282ddf f757a323 .config console log report info ci-gvisor-systrap-1-race panic: expected socket to exist at ' N
* Struck through repros no longer work on HEAD.