panic: WARNING: circular locking detected: kernfs.ancestryRWMutex -> vfs.inotifyEventMutex:
goroutine 70964 [running]:
gvisor.dev/gvisor/pkg/sync/locking.(*ancestorsAtomicPtrMap).RangeRepeatable(0xc0002762f0, 0xc001cdce40)
bazel-out/k8-fastbuild/bin/pkg/sync/locking/atomicptrmap_ancestors_unsafe.go:440 +0x314
gvisor.dev/gvisor/pkg/sync/locking.checkLock(0xc0001ca990, 0xc0002762d0, {0xc0004bb020, 0x1, 0x1})
pkg/sync/locking/lockdep.go:112 +0x4eb
gvisor.dev/gvisor/pkg/sync/locking.checkLock.func1(0xc0002762d0, 0xc001cdcfd0?)
pkg/sync/locking/lockdep.go:115 +0x74
gvisor.dev/gvisor/pkg/sync/locking.(*ancestorsAtomicPtrMap).RangeRepeatable(0xc00053a020, 0xc001cdd080)
bazel-out/k8-fastbuild/bin/pkg/sync/locking/atomicptrmap_ancestors_unsafe.go:440 +0x314
gvisor.dev/gvisor/pkg/sync/locking.checkLock(0xc0001ca990, 0xc00053a000, {0x0, 0x0, 0x0})
pkg/sync/locking/lockdep.go:112 +0x4eb
gvisor.dev/gvisor/pkg/sync/locking.AddGLock(0xc0001ca990, 0xffffffffffffffff)
pkg/sync/locking/lockdep.go:144 +0x37b
gvisor.dev/gvisor/pkg/sentry/vfs.(*inotifyEventMutex).Lock(0xc001c32a38)
bazel-out/k8-fastbuild/bin/pkg/sentry/vfs/inotify_event_mutex.go:33 +0x4d
gvisor.dev/gvisor/pkg/sentry/vfs.(*Inotify).queueEvent(0xc001c329a0, 0xc002640a80)
pkg/sentry/vfs/inotify.go:276 +0x4e
gvisor.dev/gvisor/pkg/sentry/vfs.(*Watch).Notify(0xc000dbe620, {0xc0023b8e0b, 0x6}, 0x40000010, 0x0)
pkg/sentry/vfs/inotify.go:604 +0x10b
gvisor.dev/gvisor/pkg/sentry/vfs.(*Watches).Notify(0xc0026cc048, {0x2108b00, 0xc002454c88}, {0xc0023b8e0b, 0x6}, 0x40000010, 0x0, 0x0, 0x0)
pkg/sentry/vfs/inotify.go:476 +0x1fe
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Dentry).InotifyWithParent(0xc002808090, {0x2108b00, 0xc002454c88}, 0x10, 0x0, 0x0)
pkg/sentry/fsimpl/kernfs/kernfs.go:569 +0x1ce
gvisor.dev/gvisor/pkg/sentry/vfs.(*Dentry).InotifyWithParent(0xc002808090, {0x2108b00, 0xc002454c88}, 0x10, 0x0, 0x0)
pkg/sentry/vfs/dentry.go:188 +0x87
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).DecRef.func1()
pkg/sentry/vfs/file_description.go:167 +0x127
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescriptionRefs).DecRef(0xc002808490, 0xc001cdd630)
bazel-out/k8-fastbuild/bin/pkg/sentry/vfs/file_description_refs.go:133 +0xb4
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).DecRef(0xc002808490, {0x2108b00, 0xc002454c88})
pkg/sentry/vfs/file_description.go:161 +0xa5
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.CloseRange(0xc002454c88, 0x457a27?, {{0x3}, {0x1e}, {0x0}, {0x7f1f3af7e000}, {0x1}, {0xf5194d9ef}})
pkg/sentry/syscalls/linux/sys_file.go:504 +0x3e7
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc002454c88, 0x1b4, {{0x3}, {0x1e}, {0x0}, {0x7f1f3af7e000}, {0x1}, {0xf5194d9ef}})
pkg/sentry/kernel/task_syscall.go:143 +0xb90
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc002454c88, 0x1b4, {{0x3}, {0x1e}, {0x0}, {0x7f1f3af7e000}, {0x1}, {0xf5194d9ef}})
pkg/sentry/kernel/task_syscall.go:323 +0x85
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc002454c88, 0x1b4, {{0x3}, {0x1e}, {0x0}, {0x7f1f3af7e000}, {0x1}, {0xf5194d9ef}})
pkg/sentry/kernel/task_syscall.go:283 +0xc7
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc002454c88)
pkg/sentry/kernel/task_syscall.go:258 +0x53e
gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0xc002454c88?, 0xc002454c88)
pkg/sentry/kernel/task_run.go:269 +0x220c
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc002454c88, 0x52e0)
pkg/sentry/kernel/task_run.go:97 +0x402
created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start in goroutine 70883
pkg/sentry/kernel/task_start.go:412 +0x17e
known lock chain: vfs.inotifyEventMutex -> mm.mappingRWMutex -> kernel.taskMutex -> kernfs.ancestryRWMutex
====== vfs.inotifyEventMutex -> mm.mappingRWMutex =====
goroutine 27731 [running]:
gvisor.dev/gvisor/pkg/sentry/mm.(*mappingRWMutex).RLock(0xc00174f05c)
bazel-out/k8-fastbuild/bin/pkg/sentry/mm/mapping_mutex.go:59 +0x4d
gvisor.dev/gvisor/pkg/sentry/mm.(*MemoryManager).withInternalMappings(0xc00174f008, {0x2108b00, 0xc000fe5908}, {0xc0001ca040?, 0xc000000000?}, {0xc?, 0x85?, 0x48?}, 0x0, 0xc000cf0f38)
pkg/sentry/mm/io.go:545 +0x145
gvisor.dev/gvisor/pkg/sentry/mm.(*MemoryManager).CopyOut(0xc00174f008, {0x2108b00, 0xc000fe5908}, 0x200000000000, {0xc0002632e0, 0x10, 0x10}, {0x1?, 0x0?})
pkg/sentry/mm/io.go:130 +0x2e7
gvisor.dev/gvisor/pkg/usermem.CopyOutVec({0x2108b00, 0xc000fe5908}, {0x20ff238, 0xc00174f008}, {0x0?, 0x9d3175?, 0x48850c?, 0x48a1f5?}, {0xc0002632e0, 0x10, ...}, ...)
pkg/usermem/usermem.go:264 +0x26b
gvisor.dev/gvisor/pkg/usermem.IOSequence.CopyOut({{0x20ff238, 0xc00174f008}, {0x0, 0x1, 0x200000000000, 0x2f}, {0x0, 0x1}}, {0x2108b00, 0xc000fe5908}, ...)
pkg/usermem/usermem.go:482 +0xe8
gvisor.dev/gvisor/pkg/sentry/vfs.(*Event).CopyTo(0xc001a69c00, {0x2108b00, 0xc000fe5908}, {0xc0002632e0, 0x10, 0x10}, {{0x20ff238, 0xc00174f008}, {0x0, 0x1, ...}, ...})
pkg/sentry/vfs/inotify.go:693 +0x5a5
gvisor.dev/gvisor/pkg/sentry/vfs.(*Inotify).Read(0xc002326000, {0x2108b00, 0xc000fe5908}, {{0x20ff238, 0xc00174f008}, {0x0, 0x1, 0x200000000000, 0x2f}, {0x0, ...}}, ...)
pkg/sentry/vfs/inotify.go:244 +0x632
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).Read(0xc002326000, {0x2108b00, 0xc000fe5908}, {{0x20ff238, 0xc00174f008}, {0x0, 0x1, 0x200000000000, 0x2f}, {0x0, ...}}, ...)
pkg/sentry/vfs/file_description.go:651 +0x154
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.read(0xc000fe5908, 0xc002326000, {{0x20ff238, 0xc00174f008}, {0x0, 0x1, 0x200000000000, 0x2f}, {0x0, 0x1}}, ...)
pkg/sentry/syscalls/linux/sys_read_write.go:93 +0xa5
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Read(0xc000fe5908, 0x457a27?, {{0x3}, {0x200000000000}, {0x2f}, {0x0}, {0x0}, {0x0}})
pkg/sentry/syscalls/linux/sys_read_write.go:62 +0x38f
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc000fe5908, 0x0, {{0x3}, {0x200000000000}, {0x2f}, {0x0}, {0x0}, {0x0}})
pkg/sentry/kernel/task_syscall.go:143 +0xb90
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc000fe5908, 0x0, {{0x3}, {0x200000000000}, {0x2f}, {0x0}, {0x0}, {0x0}})
pkg/sentry/kernel/task_syscall.go:323 +0x85
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc000fe5908, 0x0, {{0x3}, {0x200000000000}, {0x2f}, {0x0}, {0x0}, {0x0}})
pkg/sentry/kernel/task_syscall.go:283 +0xc7
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc000fe5908)
pkg/sentry/kernel/task_syscall.go:258 +0x53e
gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0xc000fe5908?, 0xc000fe5908)
pkg/sentry/kernel/task_run.go:269 +0x220c
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc000fe5908, 0x2036)
pkg/sentry/kernel/task_run.go:97 +0x402
created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start in goroutine 27707
pkg/sentry/kernel/task_start.go:412 +0x17e
====== mm.mappingRWMutex -> kernel.taskMutex =====
goroutine 27082 [running]:
gvisor.dev/gvisor/pkg/sentry/kernel.(*taskMutex).Lock(0xc0011c5620)
bazel-out/k8-fastbuild/bin/pkg/sentry/kernel/task_mutex.go:35 +0x4d
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).contextValue(0xc0011c4c88, {0x1c46b60, 0x20da028}, 0x0)
pkg/sentry/kernel/task_context.go:96 +0x1236
gvisor.dev/gvisor/pkg/sentry/kernel.(*taskAsyncContext).Value(0xc000df6040, {0x1c46b60, 0x20da028})
pkg/sentry/kernel/task_context.go:159 +0x65
gvisor.dev/gvisor/pkg/sentry/vfs.RootFromContext({0x7f2a9371dd58, 0xc000df6040})
pkg/sentry/vfs/context.go:88 +0x58
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).MappedName(0xc0008ac400, {0x2108b90, 0xc000df6040})
pkg/sentry/vfs/file_description.go:816 +0x78
gvisor.dev/gvisor/pkg/sentry/mm.(*MemoryManager).appendVMAMapsEntryLocked(0x0?, {0x2108b90, 0xc000df6040}, {0xc000c24908?, 0xc00149f3c0?}, 0xc001ad71c0)
pkg/sentry/mm/procfs.go:129 +0x32c
gvisor.dev/gvisor/pkg/sentry/mm.(*MemoryManager).vmaSmapsEntryIntoLocked(0xc000d51008, {0x2108b90, 0xc000df6040}, {0xc000c24908?, 0x48850c?}, 0xc001fb2100)
pkg/sentry/mm/procfs.go:160 +0xb5
gvisor.dev/gvisor/pkg/sentry/mm.(*MemoryManager).ReadSmapsDataInto(0xc000d51008, {0x2108b90, 0xc000df6040}, 0xc001fb2100)
pkg/sentry/mm/procfs.go:141 +0x12e
gvisor.dev/gvisor/pkg/sentry/fsimpl/proc.(*smapsData).Generate(0xc001270a88, {0x2108b90, 0xc000df6040}, 0xc001fb2100)
pkg/sentry/fsimpl/proc/task_files.go:668 +0x9e
gvisor.dev/gvisor/pkg/sentry/vfs.(*DynamicBytesFileDescriptionImpl).preadLocked(0xc001fb20e0, {0x2108b90, 0xc000df6040}, {{0x20ff238, 0xc000d51008}, {0x0, 0x1, 0x2000000000c0, 0x5}, {0x0, ...}}, ...)
pkg/sentry/vfs/file_description_impl_util.go:310 +0x1d9
gvisor.dev/gvisor/pkg/sentry/vfs.(*DynamicBytesFileDescriptionImpl).PRead(0xc001fb20e0, {0x2108b90, 0xc000df6040}, {{0x20ff238, 0xc000d51008}, {0x0, 0x1, 0x2000000000c0, 0x5}, {0x0, ...}}, ...)
pkg/sentry/vfs/file_description_impl_util.go:329 +0xd5
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*DynamicBytesFD).PRead(0xc001fb20e0, {0x2108b90, 0xc000df6040}, {{0x20ff238, 0xc000d51008}, {0x0, 0x1, 0x2000000000c0, 0x5}, {0x0, ...}}, ...)
pkg/sentry/fsimpl/kernfs/dynamic_bytes_file.go:133 +0xb7
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).PRead(0xc001fb2140, {0x2108b90, 0xc000df6040}, {{0x20ff238, 0xc000d51008}, {0x0, 0x1, 0x2000000000c0, 0x5}, {0x0, ...}}, ...)
pkg/sentry/vfs/file_description.go:636 +0x19b
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.getAIOCallback.func1({0x2108b90, 0xc000df6040})
pkg/sentry/syscalls/linux/sys_aio.go:361 +0x3f4
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).QueueAIO.func1()
pkg/sentry/kernel/aio.go:30 +0x62
created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).QueueAIO in goroutine 27081
pkg/sentry/kernel/aio.go:29 +0x225
====== kernel.taskMutex -> kernfs.ancestryRWMutex =====
goroutine 1524 [running]:
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*ancestryRWMutex).RLock(0xc000398f68)
bazel-out/k8-fastbuild/bin/pkg/sentry/fsimpl/kernfs/ancestry_mutex.go:59 +0x4d
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.genericPrependPath(0xc000398f00, {0x0?, 0x0?}, 0x0, 0xc00053aea0, 0xc000e7ed90)
bazel-out/k8-fastbuild/bin/pkg/sentry/fsimpl/kernfs/fstree.go:60 +0x99
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Dentry).FSLocalPath(0xc00053aea0)
pkg/sentry/fsimpl/kernfs/kernfs.go:627 +0x72
gvisor.dev/gvisor/pkg/sentry/kernel.(*Cgroup).Path(0xc000b12ef8)
pkg/sentry/kernel/cgroup.go:135 +0x47
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).GetCgroupEntries(0xc000c85908)
pkg/sentry/kernel/task_cgroup.go:252 +0x56f
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).GenerateProcTaskCgroup(0xc000c85908, 0xc000926100)
pkg/sentry/kernel/task_cgroup.go:262 +0x55
gvisor.dev/gvisor/pkg/sentry/fsimpl/proc.(*taskCgroupData).Generate(0xc000e45508, {0xc000daced0?, 0x200000001?}, 0xc000926100)
pkg/sentry/fsimpl/proc/task_files.go:1485 +0xdb
gvisor.dev/gvisor/pkg/sentry/vfs.(*DynamicBytesFileDescriptionImpl).preadLocked(0xc0009260e0, {0x2108b00, 0xc000e6a008}, {{0x20ff238, 0xc000dac008}, {0x0, 0x0, 0x0, 0x0}, {0x0, ...}}, ...)
pkg/sentry/vfs/file_description_impl_util.go:310 +0x1d9
gvisor.dev/gvisor/pkg/sentry/vfs.(*DynamicBytesFileDescriptionImpl).PRead(0xc0009260e0, {0x2108b00, 0xc000e6a008}, {{0x20ff238, 0xc000dac008}, {0x0, 0x0, 0x0, 0x0}, {0x0, ...}}, ...)
pkg/sentry/vfs/file_description_impl_util.go:329 +0xd5
gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*DynamicBytesFD).PRead(0xc0009260e0, {0x2108b00, 0xc000e6a008}, {{0x20ff238, 0xc000dac008}, {0x0, 0x0, 0x0, 0x0}, {0x0, ...}}, ...)
pkg/sentry/fsimpl/kernfs/dynamic_bytes_file.go:133 +0xb7
gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).PRead(0xc000926140, {0x2108b00, 0xc000e6a008}, {{0x20ff238, 0xc000dac008}, {0x0, 0x0, 0x0, 0x0}, {0x0, ...}}, ...)
pkg/sentry/vfs/file_description.go:636 +0x19b
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.pread(0xc000e6a008, 0xc000926140, {{0x20ff238, 0xc000dac008}, {0x0, 0x0, 0x0, 0x0}, {0x0, 0x1}}, ...)
pkg/sentry/syscalls/linux/sys_read_write.go:250 +0xb2
gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Preadv(0xc000e6a008, 0x457a27?, {{0x3}, {0x0}, {0x0}, {0x6}, {0xf}, {0x0}})
pkg/sentry/syscalls/linux/sys_read_write.go:198 +0x3bf
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc000e6a008, 0x127, {{0x3}, {0x0}, {0x0}, {0x6}, {0xf}, {0x0}})
pkg/sentry/kernel/task_syscall.go:143 +0xb90
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc000e6a008, 0x127, {{0x3}, {0x0}, {0x0}, {0x6}, {0xf}, {0x0}})
pkg/sentry/kernel/task_syscall.go:323 +0x85
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc000e6a008, 0x127, {{0x3}, {0x0}, {0x0}, {0x6}, {0xf}, {0x0}})
pkg/sentry/kernel/task_syscall.go:283 +0xc7
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc000e6a008)
pkg/sentry/kernel/task_syscall.go:258 +0x53e
gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0xc000e6a008?, 0xc000e6a008)
pkg/sentry/kernel/task_run.go:269 +0x220c
gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc000e6a008, 0x1a0)
pkg/sentry/kernel/task_run.go:97 +0x402
created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start in goroutine 1515
pkg/sentry/kernel/task_start.go:412 +0x17e