syzbot


gvisor test error: panic: WARNING: circular locking detected: mm.activeRWMutex -> kernel.taskSetRWMutex:

Status: fixed on 2022/10/12 02:40
Fix commit: 2e844f74fcdd Do not use ktime.Timer for CPU clock ticks.
First crash: 783d, last: 783d

Sample crash report:
panic: WARNING: circular locking detected: mm.activeRWMutex -> kernel.taskSetRWMutex:
goroutine 550 [running]:
gvisor.dev/gvisor/pkg/log.Stacks(0xa0?)
	pkg/log/log.go:318 +0xd3
gvisor.dev/gvisor/pkg/sync/locking.checkLock(0xc00035cf80, 0xc00023f780, {0x0, 0x0, 0x0})
	pkg/sync/locking/lockdep.go:56 +0x225
gvisor.dev/gvisor/pkg/sync/locking.AddGLock(0xc00035cf80, 0x0)
	pkg/sync/locking/lockdep.go:107 +0x33e
gvisor.dev/gvisor/pkg/sentry/kernel.(*taskSetRWMutex).RLock(0xc0004dce70)
	bazel-out/k8-fastbuild-ST-3dcbe13c9b87/bin/pkg/sentry/kernel/taskset_mutex.go:46 +0x53
gvisor.dev/gvisor/pkg/sentry/kernel.(*PIDNamespace).ThreadGroupsAppend(0xc00015a540, {0xc0005eea80, 0x0, 0x8})
	pkg/sentry/kernel/threads.go:296 +0x9d
gvisor.dev/gvisor/pkg/sentry/kernel.(*kernelCPUClockTicker).NotifyTimer(0xc000694060, 0xc000fb6000?, {0x6?, {0xc0009f6578?}, 0x989680})
	pkg/sentry/kernel/task_sched.go:365 +0x149
gvisor.dev/gvisor/pkg/sentry/kernel/time.(*Timer).SwapAnd(0xc00054e080, {0x36?, {0x471185?}, 0x5b1939?}, 0x0)
	pkg/sentry/kernel/time/time.go:634 +0x32f
gvisor.dev/gvisor/pkg/sentry/kernel/time.(*Timer).Swap(0xc0005e4350?, {0x2?, {0xc0009b4680?}, 0xc0009f66f0?})
	pkg/sentry/kernel/time/time.go:603 +0x65
gvisor.dev/gvisor/pkg/sentry/kernel.(*Kernel).incRunningTasks(0xc0005e4280)
	pkg/sentry/kernel/kernel.go:1304 +0x285
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).accountTaskGoroutineLeave(0xc000a24a80, 0x4)
	pkg/sentry/kernel/task_sched.go:142 +0xa5
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).UninterruptibleSleepFinish(0x22?, 0x0)
	pkg/sentry/kernel/task_block.go:224 +0x47
gvisor.dev/gvisor/pkg/sentry/fsimpl/gofer.(*handle).readToBlocksAt(0xc000c498c0, {0x1cc6e30, 0xc000a24a80}, {0x7fa157cef058?, 0x1?, 0x471185?, 0x8c586b?}, 0x281e900?)
	pkg/sentry/fsimpl/gofer/handle.go:129 +0x2b5
gvisor.dev/gvisor/pkg/sentry/fsimpl/gofer.(*dentryReadWriter).ReadToBlocks(0xc000c49860, {0x7fa157cef058?, 0x40?, 0x0?, 0xc0004ef098?})
	pkg/sentry/fsimpl/gofer/regular_file.go:402 +0x37e
gvisor.dev/gvisor/pkg/sentry/mm.(*MemoryManager).withInternalMappings(0xc001090000, {0x1cc6e30, 0xc000a24a80}, {0x5f040c?, 0x471185?}, {0x92?, 0x6?, 0xb8?}, 0x0?, 0xc0009f6e80)
	pkg/sentry/mm/io.go:522 +0x813
gvisor.dev/gvisor/pkg/sentry/mm.(*MemoryManager).withVecInternalMappings(0xc001090000, {0x1cc6e30, 0xc000a24a80}, {0x0?, 0xc000c49860?, 0x30?, 0x1?}, {0x0, 0x1, 0x0}, ...)
	pkg/sentry/mm/io.go:591 +0x83f
gvisor.dev/gvisor/pkg/sentry/mm.(*MemoryManager).CopyOutFrom(0xc001090000, {0x1cc6e30, 0xc000a24a80}, {0x0?, 0x471185?, 0x149d433?, 0x269e520?}, {0x1cadb80?, 0xc000c49860?}, {0x0, ...})
	pkg/sentry/mm/io.go:273 +0x32b
gvisor.dev/gvisor/pkg/usermem.IOSequence.CopyOutFrom({{0x1cc2330, 0xc001090000}, {0x0, 0x1, 0xc0004ef058, 0x40}, {0x0, 0x1}}, {0x1cc6e30, 0xc000a24a80}, ...)
	pkg/usermem/usermem.go:508 +0xd8
gvisor.dev/gvisor/pkg/sentry/fsimpl/gofer.(*regularFileFD).PRead(0xc000c62120, {0x1cc6e30, 0xc000a24a80}, {{0x1cc2330, 0xc001090000}, {0x0, 0x1, 0xc0004ef058, 0x40}, {0x0, ...}}, ...)
	pkg/sentry/fsimpl/gofer/regular_file.go:181 +0x6c5
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).PRead(0xc000c62120, {0x1cc6e30, 0xc000a24a80}, {{0x1cc2330, 0xc001090000}, {0x0, 0x1, 0xc0004ef058, 0x40}, {0x0, ...}}, ...)
	pkg/sentry/vfs/file_description.go:625 +0x1aa
gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.pread(0x1?, 0x81ed?, {{0x1cc2330, 0xc001090000}, {0x0, 0x1, 0xc0004ef058, 0x40}, {0x0, 0x1}}, ...)
	pkg/sentry/syscalls/linux/vfs2/read_write.go:251 +0xc5
gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Pread64(0xc000a24a80, {{0x3}, {0xc0004ef058}, {0x40}, {0x0}, {0x0}, {0x0}})
	pkg/sentry/syscalls/linux/vfs2/read_write.go:168 +0x457
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc000a24a80, 0x11, {{0x3}, {0xc0004ef058}, {0x40}, {0x0}, {0x0}, {0x0}})
	pkg/sentry/kernel/task_syscall.go:142 +0xab8
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc000a24a80, 0x1?, {{0x3}, {0xc0004ef058}, {0x40}, {0x0}, {0x0}, {0x0}})
	pkg/sentry/kernel/task_syscall.go:322 +0x8e
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc0005ec960?, 0x46fdec?, {{0x3}, {0xc0004ef058}, {0x40}, {0x0}, {0x0}, {0x0}})
	pkg/sentry/kernel/task_syscall.go:282 +0xc5
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc000a24a80)
	pkg/sentry/kernel/task_syscall.go:257 +0x53b
gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0xc000a24a80?, 0xc000a24a80)
	pkg/sentry/kernel/task_run.go:253 +0x1e2b
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc000a24a80, 0x1f)
	pkg/sentry/kernel/task_run.go:94 +0x2c2
created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start
	pkg/sentry/kernel/task_start.go:380 +0x1d0

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/10/05 10:05 gvisor 0842a94cd00a 267e3bb1 .config console log report ci-gvisor-ptrace-2-race-cover gvisor test error: panic: WARNING: circular locking detected: mm.activeRWMutex -> kernel.taskSetRWMutex:
* Struck through repros no longer work on HEAD.