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

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

goroutine 177 [running]:
panic({0x2973e0?, 0xc0004e8050?})
	GOROOT/src/runtime/panic.go:1017 +0x3ac fp=0xc0007c0eb8 sp=0xc0007c0e08 pc=0x129ebec
gvisor.dev/gvisor/pkg/sentry/inet.(*AbstractSocketNamespace).Remove(0xc0002662b8, {0xc0007ca0e1, 0x6b}, {0x7d7740?, 0xc0003a2000})
	pkg/sentry/inet/abstract_socket_namespace.go:141 +0x2a5 fp=0xc0007c0fe8 sp=0xc0007c0eb8 pc=0x1a9b085
gvisor.dev/gvisor/pkg/sentry/socket/unix.(*Socket).Release.(*Socket).DecRef.func1()
	pkg/sentry/socket/unix/unix.go:120 +0x109 fp=0xc0007c1048 sp=0xc0007c0fe8 pc=0x1d0cf69
gvisor.dev/gvisor/pkg/sentry/socket/unix.(*socketRefs).DecRef(0xc0003a2080, 0xc0007c10c0)
	bazel-out/k8-fastbuild-ST-3dcbe13c9b87/bin/pkg/sentry/socket/unix/socket_refs.go:132 +0x56 fp=0xc0007c10b0 sp=0xc0007c1048 pc=0x1d0c316
gvisor.dev/gvisor/pkg/sentry/socket/unix.(*Socket).DecRef(...)
	pkg/sentry/socket/unix/unix.go:116
gvisor.dev/gvisor/pkg/sentry/socket/unix.(*Socket).Release(0xc0003a2000, {0x7e5b78, 0xc0005f9500})
	pkg/sentry/socket/unix/unix.go:132 +0x85 fp=0xc0007c10f0 sp=0xc0007c10b0 pc=0x1d0ce25
gvisor.dev/gvisor/pkg/sentry/kernel.(*FDTable).drop.(*FileDescription).DecRef.func1()
	pkg/sentry/vfs/file_description.go:197 +0x357 fp=0xc0007c1208 sp=0xc0007c10f0 pc=0x1adff97
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescriptionRefs).DecRef(0xc0003a2000, 0xc0007c12f8)
	bazel-out/k8-fastbuild-ST-3dcbe13c9b87/bin/pkg/sentry/vfs/file_description_refs.go:132 +0x56 fp=0xc0007c1270 sp=0xc0007c1208 pc=0x1810cf6
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).DecRef(...)
	pkg/sentry/vfs/file_description.go:161
gvisor.dev/gvisor/pkg/sentry/kernel.(*FDTable).drop(0xc0005eed00?, {0x7e5b78, 0xc0005f9500}, 0xc0003a2000)
	pkg/sentry/kernel/fd_table.go:137 +0x20d fp=0xc0007c1328 sp=0xc0007c1270 pc=0x1adfb6d
gvisor.dev/gvisor/pkg/sentry/kernel.(*FDTable).NewFDAt(0x12b12e7?, {0x7e5b78, 0xc0005f9500}, 0xa4afa0?, 0x0?, {0x0?})
	pkg/sentry/kernel/fd_table.go:321 +0x85 fp=0xc0007c1390 sp=0xc0007c1328 pc=0x1ae21e5
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).NewFDAt(...)
	pkg/sentry/kernel/task.go:778
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.dup3(0xc0005f9500, 0x12d958c?, 0x3, 0x0)
	pkg/sentry/syscalls/linux/sys_file.go:572 +0x174 fp=0xc0007c1480 sp=0xc0007c1390 pc=0x1d46914
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Dup3(0x12dae29?, 0xc0007c1598?, {{0x4}, {0x3}, {0x0}, {0x0}, {0x7fb9d14549a7}, {0x7f86a23ae6c0}})
	pkg/sentry/syscalls/linux/sys_file.go:558 +0x75 fp=0xc0007c14d8 sp=0xc0007c1480 pc=0x1d46735
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc0005f9500, 0x124, {{0x4}, {0x3}, {0x0}, {0x0}, {0x7fb9d14549a7}, {0x7f86a23ae6c0}})
	pkg/sentry/kernel/task_syscall.go:142 +0x8b5 fp=0xc0007c18f8 sp=0xc0007c14d8 pc=0x1b55ab5
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc0005f9500, 0x24f4c80?, {{0x4}, {0x3}, {0x0}, {0x0}, {0x7fb9d14549a7}, {0x7f86a23ae6c0}})
	pkg/sentry/kernel/task_syscall.go:322 +0x6c fp=0xc0007c1998 sp=0xc0007c18f8 pc=0x1b578ec
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc0007c1b58?, 0x2065039?, {{0x4}, {0x3}, {0x0}, {0x0}, {0x7fb9d14549a7}, {0x7f86a23ae6c0}})
	pkg/sentry/kernel/task_syscall.go:282 +0x87 fp=0xc0007c1a10 sp=0xc0007c1998 pc=0x1b572a7
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc0005f9500)
	pkg/sentry/kernel/task_syscall.go:257 +0x4f0 fp=0xc0007c1b68 sp=0xc0007c1a10 pc=0x1b56e30
gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0xc0005f9500?, 0xc0005f9500)
	pkg/sentry/kernel/task_run.go:269 +0x1e08 fp=0xc0007c1e70 sp=0xc0007c1b68 pc=0x1b416a8
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc0005f9500, 0x1a)
	pkg/sentry/kernel/task_run.go:98 +0x43b fp=0xc0007c1fb0 sp=0xc0007c1e70 pc=0x1b3efbb
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start.func1()
	pkg/sentry/kernel/task_start.go:391 +0x45 fp=0xc0007c1fe0 sp=0xc0007c1fb0 pc=0x1b53845
runtime.goexit()
	src/runtime/asm_amd64.s:1650 +0x1 fp=0xc0007c1fe8 sp=0xc0007c1fe0 pc=0x12d7c01
created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start in goroutine 171
	pkg/sentry/kernel/task_start.go:391 +0x1ae

Crashes (23):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/10/17 05:06 gvisor 289dc7ce1d71 342b9c55 .config console log report syz C ci-gvisor-ptrace-3-race panic: expected socket to exist at '#N
2023/10/16 22:56 gvisor 289dc7ce1d71 342b9c55 .config console log report syz C ci-gvisor-ptrace-1-race panic: expected socket to exist at '#N
2023/10/16 22:55 gvisor 289dc7ce1d71 342b9c55 .config console log report syz C ci-gvisor-systrap-1-race panic: expected socket to exist at '#N
2023/10/16 22:55 gvisor 289dc7ce1d71 342b9c55 console log report syz C ci-gvisor-ptrace-2 panic: expected socket to exist at '#N
2023/10/16 22:53 gvisor 289dc7ce1d71 342b9c55 console log report syz C ci-gvisor-ptrace-1 panic: expected socket to exist at '#N
2023/10/16 22:45 gvisor 289dc7ce1d71 342b9c55 .config console log report syz C ci-gvisor-ptrace-2-race panic: expected socket to exist at '#N
2023/10/16 22:43 gvisor 289dc7ce1d71 342b9c55 .config console log report syz C ci-gvisor-kvm-cover panic: expected socket to exist at '#N
2023/10/16 22:29 gvisor 289dc7ce1d71 342b9c55 .config console log report syz C ci-gvisor-systrap-1-race-cover panic: expected socket to exist at '#N
2023/10/16 22:29 gvisor 289dc7ce1d71 342b9c55 .config console log report syz C ci-gvisor-ptrace-1-race-cover panic: expected socket to exist at '#N
2023/10/16 22:29 gvisor 289dc7ce1d71 342b9c55 .config console log report syz C ci-gvisor-ptrace-2-race-cover panic: expected socket to exist at '#N
2023/10/16 22:26 gvisor 289dc7ce1d71 342b9c55 .config console log report syz C ci-gvisor-ptrace-3-race-cover panic: expected socket to exist at '#N
2023/10/16 22:21 gvisor 289dc7ce1d71 342b9c55 .config console log report syz C ci-gvisor-ptrace-3-cover panic: expected socket to exist at '#N
2023/10/16 22:18 gvisor 289dc7ce1d71 342b9c55 console log report syz C ci-gvisor-ptrace-3 panic: expected socket to exist at '#N
2023/10/16 22:17 gvisor 289dc7ce1d71 342b9c55 .config console log report syz C ci-gvisor-systrap-1-cover panic: expected socket to exist at '#N
2023/10/16 22:17 gvisor 289dc7ce1d71 342b9c55 .config console log report syz C ci-gvisor-ptrace-2-cover panic: expected socket to exist at '#N
2023/10/16 22:17 gvisor 289dc7ce1d71 342b9c55 .config console log report syz C ci-gvisor-ptrace-1-cover panic: expected socket to exist at '#N
2023/10/16 22:16 gvisor 289dc7ce1d71 342b9c55 console log report syz C ci-gvisor-kvm panic: expected socket to exist at '#N
2023/10/16 21:54 gvisor 289dc7ce1d71 342b9c55 console log report syz C ci-gvisor-systrap-1 panic: expected socket to exist at '#N
2023/10/16 23:43 gvisor 289dc7ce1d71 342b9c55 .config console log report syz C ci-gvisor-arm64-systrap-1-cover panic: expected socket to exist at '#N
2023/10/16 23:25 gvisor 289dc7ce1d71 342b9c55 .config console log report syz C ci-gvisor-arm64-ptrace-1-cover panic: expected socket to exist at '#N
2023/10/16 22:17 gvisor 289dc7ce1d71 342b9c55 console log report syz C ci-gvisor-arm64-ptrace-1 panic: expected socket to exist at '#N
2023/10/16 22:13 gvisor 289dc7ce1d71 342b9c55 console log report syz C ci-gvisor-arm64-systrap-1 panic: expected socket to exist at '#N
2023/10/16 21:40 gvisor 289dc7ce1d71 342b9c55 console log report info ci-gvisor-systrap-1 panic: expected socket to exist at '#N
* Struck through repros no longer work on HEAD.