syzbot


fatal error: sync: unlock of unlocked mutex

Status: fixed on 2022/02/04 08:08
Fix commit: 10d1a49c5ba2 Fuse: `DeviceFD.Read`: Lock `DeviceFD` ahead of other locks.
First crash: 1027d, last: 1026d

Sample crash report:
fatal error: sync: unlock of unlocked mutex

goroutine 1141 [running]:
runtime.throw(0x133997c, 0x1e)
	GOROOT/src/runtime/panic.go:1117 +0x72 fp=0xc000196680 sp=0xc000196650 pc=0x438072
sync.throw(0x133997c, 0x1e)
	GOROOT/src/runtime/panic.go:1103 +0x35 fp=0xc0001966a0 sp=0xc000196680 pc=0x46cdb5
sync.(*Mutex).unlockSlow(0xc0009b4488, 0xffffffff)
	GOROOT/src/sync/mutex.go:196 +0xd8 fp=0xc0001966c8 sp=0xc0001966a0 pc=0x47c978
sync.(*Mutex).Unlock(...)
	GOROOT/src/sync/mutex.go:190
gvisor.dev/gvisor/pkg/sentry/fsimpl/fuse.(*DeviceFD).Read(0xc0001e0900, 0x14c1898, 0xc000acea80, 0x14bbc00, 0xc000971000, 0x0, 0x1, 0x20003040, 0x2000, 0x100, ...)
	pkg/sentry/fsimpl/fuse/dev.go:154 +0x252 fp=0xc0001967a0 sp=0xc0001966c8 pc=0xf2b9b2
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).Read(0xc0001e0900, 0x14c1898, 0xc000acea80, 0x14bbc00, 0xc000971000, 0x0, 0x1, 0x20003040, 0x2000, 0x100, ...)
	pkg/sentry/vfs/file_description.go:626 +0xdb fp=0xc000196850 sp=0xc0001967a0 pc=0x7568bb
gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.read(0xc000acea80, 0xc0001e0900, 0x14bbc00, 0xc000971000, 0x0, 0x1, 0x20003040, 0x2000, 0x100, 0x0, ...)
	pkg/sentry/syscalls/linux/vfs2/read_write.go:94 +0x9b fp=0xc0001969e0 sp=0xc000196850 pc=0xe6df1b
gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Read(0xc000acea80, 0x3, 0x20003040, 0x2000, 0x7fe50f5d19d0, 0x0, 0x7fe50f5d1700, 0x0, 0x0, 0x0, ...)
	pkg/sentry/syscalls/linux/vfs2/read_write.go:63 +0x245 fp=0xc000196b10 sp=0xc0001969e0 pc=0xe6d805
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc000acea80, 0x0, 0x3, 0x20003040, 0x2000, 0x7fe50f5d19d0, 0x0, 0x7fe50f5d1700, 0x0, 0x1318be0, ...)
	pkg/sentry/kernel/task_syscall.go:103 +0x13c fp=0xc000196c70 sp=0xc000196b10 pc=0x9f169c
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc000acea80, 0x0, 0x3, 0x20003040, 0x2000, 0x7fe50f5d19d0, 0x0, 0x7fe50f5d1700, 0x0, 0x7fe50f5d1700)
	pkg/sentry/kernel/task_syscall.go:238 +0x66 fp=0xc000196cf8 sp=0xc000196c70 pc=0x9f2846
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc000acea80, 0x0, 0x3, 0x20003040, 0x2000, 0x7fe50f5d19d0, 0x0, 0x7fe50f5d1700, 0x14d2aa8, 0xc000996d80)
	pkg/sentry/kernel/task_syscall.go:198 +0x98 fp=0xc000196d58 sp=0xc000196cf8 pc=0x9f2438
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc000acea80, 0x2, 0xc000acea80)
	pkg/sentry/kernel/task_syscall.go:173 +0x15c fp=0xc000196e28 sp=0xc000196d58 pc=0x9f1ddc
gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc000acea80, 0x1493a80, 0x0)
	pkg/sentry/kernel/task_run.go:254 +0xc27 fp=0xc000196f68 sp=0xc000196e28 pc=0x9e6b67
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc000acea80, 0x93)
	pkg/sentry/kernel/task_run.go:95 +0x182 fp=0xc000196fd0 sp=0xc000196f68 pc=0x9e5aa2
runtime.goexit()
	src/runtime/asm_amd64.s:1371 +0x1 fp=0xc000196fd8 sp=0xc000196fd0 pc=0x472861
created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start
	pkg/sentry/kernel/task_start.go:342 +0xfe

Crashes (26):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/02/03 07:10 gvisor a5ce865145c7 4ebb2798 .config console log report syz C ci-gvisor-ptrace-2 fatal error: sync: unlock of unlocked mutex
2022/02/03 06:41 gvisor a5ce865145c7 4ebb2798 .config console log report syz C ci-gvisor-ptrace-1 fatal error: sync: unlock of unlocked mutex
2022/02/03 06:37 gvisor a5ce865145c7 4ebb2798 .config console log report syz C ci-gvisor-ptrace-1-cover fatal error: sync: unlock of unlocked mutex
2022/02/03 06:35 gvisor a5ce865145c7 4ebb2798 .config console log report syz C ci-gvisor-ptrace-2-cover fatal error: sync: unlock of unlocked mutex
2022/02/03 06:35 gvisor a5ce865145c7 4ebb2798 .config console log report syz C ci-gvisor-ptrace-3-cover fatal error: sync: unlock of unlocked mutex
2022/02/03 06:33 gvisor a5ce865145c7 4ebb2798 .config console log report syz C ci-gvisor-kvm-cover fatal error: sync: unlock of unlocked mutex
2022/02/03 06:31 gvisor a5ce865145c7 4ebb2798 .config console log report syz C ci-gvisor-ptrace-3 fatal error: sync: unlock of unlocked mutex
2022/02/03 06:19 gvisor a5ce865145c7 4ebb2798 .config console log report syz C ci-gvisor-kvm fatal error: sync: unlock of unlocked mutex
2022/02/04 03:42 gvisor 95d883a92e31 30646bfe .config console log report info ci-gvisor-ptrace-2 fatal error: sync: unlock of unlocked mutex
2022/02/04 03:41 gvisor 95d883a92e31 30646bfe .config console log report info ci-gvisor-ptrace-1 fatal error: sync: unlock of unlocked mutex
2022/02/04 03:34 gvisor 95d883a92e31 30646bfe .config console log report info ci-gvisor-kvm fatal error: sync: unlock of unlocked mutex
2022/02/04 01:13 gvisor 95d883a92e31 30646bfe .config console log report info ci-gvisor-ptrace-3 fatal error: sync: unlock of unlocked mutex
2022/02/04 00:54 gvisor 95d883a92e31 30646bfe .config console log report info ci-gvisor-ptrace-2 fatal error: sync: unlock of unlocked mutex
2022/02/03 22:53 gvisor 95d883a92e31 30646bfe .config console log report info ci-gvisor-kvm-cover fatal error: sync: unlock of unlocked mutex
2022/02/03 21:44 gvisor 95d883a92e31 30646bfe .config console log report info ci-gvisor-ptrace-1 fatal error: sync: unlock of unlocked mutex
2022/02/03 21:37 gvisor 95d883a92e31 30646bfe .config console log report info ci-gvisor-ptrace-2 fatal error: sync: unlock of unlocked mutex
2022/02/03 21:24 gvisor 95d883a92e31 30646bfe .config console log report info ci-gvisor-ptrace-3 fatal error: sync: unlock of unlocked mutex
2022/02/03 21:09 gvisor 95d883a92e31 30646bfe .config console log report info ci-gvisor-ptrace-1 fatal error: sync: unlock of unlocked mutex
2022/02/03 20:55 gvisor 95d883a92e31 30646bfe .config console log report info ci-gvisor-kvm-cover fatal error: sync: unlock of unlocked mutex
2022/02/03 19:14 gvisor 95d883a92e31 30646bfe .config console log report info ci-gvisor-kvm-cover fatal error: sync: unlock of unlocked mutex
2022/02/03 17:35 gvisor a5ce865145c7 4ebb2798 .config console log report info ci-gvisor-kvm fatal error: sync: unlock of unlocked mutex
2022/02/03 16:49 gvisor a5ce865145c7 4ebb2798 .config console log report info ci-gvisor-kvm-cover fatal error: sync: unlock of unlocked mutex
2022/02/03 14:40 gvisor a5ce865145c7 4ebb2798 .config console log report info ci-gvisor-ptrace-3-cover fatal error: sync: unlock of unlocked mutex
2022/02/03 11:14 gvisor a5ce865145c7 4ebb2798 .config console log report info ci-gvisor-kvm fatal error: sync: unlock of unlocked mutex
2022/02/03 06:25 gvisor a5ce865145c7 4ebb2798 .config console log report info ci-gvisor-ptrace-1 fatal error: sync: unlock of unlocked mutex
2022/02/03 06:03 gvisor a5ce865145c7 4ebb2798 .config console log report info ci-gvisor-kvm fatal error: sync: unlock of unlocked mutex
* Struck through repros no longer work on HEAD.