panic: invalid allocation length: 0x0 goroutine 79444 [running]: gvisor.googlesource.com/gvisor/pkg/sentry/platform/filemem.(*FileMem).Allocate(0xc42015db00, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0) pkg/sentry/platform/filemem/filemem.go:232 +0x765 gvisor.googlesource.com/gvisor/pkg/sentry/fs/tmpfs.(*fileReadWriter).WriteFromBlocks(0xc420131460, 0x7fd2ed3ff080, 0xffffffffffffffff, 0x0, 0x94, 0x0, 0x0, 0x0) pkg/sentry/fs/tmpfs/inode_file.go:411 +0x461 gvisor.googlesource.com/gvisor/pkg/sentry/safemem.(Writer).WriteFromBlocks-fm(0x7fd2ed3ff080, 0xffffffffffffffff, 0x0, 0x94, 0x20000114, 0x7fd2ed3ff080, 0xffffffffffffffff) pkg/sentry/mm/io.go:309 +0x76 gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).withInternalMappings(0xc420ff2c80, 0x10d3f40, 0xc420e5a110, 0x20000080, 0x20000114, 0x1, 0xc420900b68, 0xc420900968, 0x47b965, 0x47ed19) pkg/sentry/mm/io.go:464 +0x88f gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).withVecInternalMappings(0xc420ff2c80, 0x10d3f40, 0xc420e5a110, 0x0, 0x1, 0x20000080, 0x94, 0x1, 0xc420900b68, 0x0, ...) pkg/sentry/mm/io.go:533 +0x974 gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).CopyInTo(0xc420ff2c80, 0x10d3f40, 0xc420e5a110, 0x0, 0x1, 0x20000080, 0x94, 0x10c4a60, 0xc420131460, 0x153c6f696ca80000, ...) pkg/sentry/mm/io.go:309 +0x211 gvisor.googlesource.com/gvisor/pkg/sentry/usermem.IOSequence.CopyInTo(0x10d2620, 0xc420ff2c80, 0x0, 0x1, 0x20000080, 0x94, 0x0, 0x10d3f40, 0xc420e5a110, 0x10c4a60, ...) pkg/sentry/usermem/usermem.go:528 +0xcf gvisor.googlesource.com/gvisor/pkg/sentry/fs/tmpfs.(*fileInodeOperations).write(0xc420db4900, 0x10d3f40, 0xc420e5a110, 0x10d2620, 0xc420ff2c80, 0x0, 0x1, 0x20000080, 0x94, 0x0, ...) pkg/sentry/fs/tmpfs/inode_file.go:289 +0x1cb gvisor.googlesource.com/gvisor/pkg/sentry/fs/tmpfs.(*regularFileOperations).Write(0xc42055c128, 0x10d3f40, 0xc420e5a110, 0xc4209c77a0, 0x10d2620, 0xc420ff2c80, 0x0, 0x1, 0x20000080, 0x94, ...) pkg/sentry/fs/tmpfs/file_regular.go:50 +0xb9 gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*File).Pwritev(0xc4209c77a0, 0x10d3f40, 0xc420e5a110, 0x10d2620, 0xc420ff2c80, 0x0, 0x1, 0x20000080, 0x94, 0x0, ...) pkg/sentry/fs/file.go:294 +0x200 gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.performCallback(0xc420a31600, 0xc4209c77a0, 0x20000180, 0xc42013e3c0, 0x10d2620, 0xc420ff2c80, 0x0, 0x1, 0x20000080, 0x94, ...) pkg/sentry/syscalls/linux/sys_aio.go:264 +0x457 gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.submitCallback.func1() pkg/sentry/syscalls/linux/sys_aio.go:342 +0x11b gvisor.googlesource.com/gvisor/pkg/sentry/fs.Async.func1(0xc4202ce460) pkg/sentry/fs/fs.go:82 +0x5d created by gvisor.googlesource.com/gvisor/pkg/sentry/fs.Async pkg/sentry/fs/fs.go:80 +0x66