panic: invalid allocation length: 0x0 goroutine 327082 [running]: gvisor.googlesource.com/gvisor/pkg/sentry/platform/filemem.(*FileMem).Allocate(0xc4202ba000, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0) pkg/sentry/platform/filemem/filemem.go:232 +0x66f gvisor.googlesource.com/gvisor/pkg/sentry/fs/tmpfs.(*fileReadWriter).WriteFromBlocks(0xc4206a20e0, 0x7f5ee9a01180, 0xffffffffffffffff, 0x0, 0x4e, 0x0, 0x0, 0x0) pkg/sentry/fs/tmpfs/inode_file.go:411 +0x2a8 gvisor.googlesource.com/gvisor/pkg/sentry/safemem.(Writer).WriteFromBlocks-fm(0x7f5ee9a01180, 0xffffffffffffffff, 0x0, 0x4e, 0x200001ce, 0x7f5ee9a01180, 0xffffffffffffffff) pkg/sentry/mm/io.go:309 +0x57 gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).withInternalMappings(0xc420924c80, 0xc730e0, 0xc4201fe0e0, 0x20000180, 0x200001ce, 0x1, 0xc42072bc20, 0x10d1d18, 0x31902773cc8e6, 0xc42072bb68) pkg/sentry/mm/io.go:464 +0x72c gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).withVecInternalMappings(0xc420924c80, 0xc730e0, 0xc4201fe0e0, 0x0, 0x1, 0x20000180, 0x4e, 0xc400000001, 0xc42072bc20, 0x153c11310ded90d3, ...) pkg/sentry/mm/io.go:533 +0x7f1 gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).CopyInTo(0xc420924c80, 0xc730e0, 0xc4201fe0e0, 0x0, 0x1, 0x20000180, 0x4e, 0xc65ca0, 0xc4206a20e0, 0x0, ...) pkg/sentry/mm/io.go:309 +0x17c gvisor.googlesource.com/gvisor/pkg/sentry/usermem.IOSequence.CopyInTo(0xc71940, 0xc420924c80, 0x0, 0x1, 0x20000180, 0x4e, 0x0, 0xc730e0, 0xc4201fe0e0, 0xc65ca0, ...) pkg/sentry/usermem/usermem.go:528 +0xad gvisor.googlesource.com/gvisor/pkg/sentry/fs/tmpfs.(*fileInodeOperations).write(0xc420f8dd40, 0xc730e0, 0xc4201fe0e0, 0xc71940, 0xc420924c80, 0x0, 0x1, 0x20000180, 0x4e, 0x0, ...) pkg/sentry/fs/tmpfs/inode_file.go:289 +0x198 gvisor.googlesource.com/gvisor/pkg/sentry/fs/tmpfs.(*regularFileOperations).Write(0xc4203be180, 0xc730e0, 0xc4201fe0e0, 0xc421768c60, 0xc71940, 0xc420924c80, 0x0, 0x1, 0x20000180, 0x4e, ...) pkg/sentry/fs/tmpfs/file_regular.go:50 +0x89 gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*File).Pwritev(0xc421768c60, 0xc730e0, 0xc4201fe0e0, 0xc71940, 0xc420924c80, 0x0, 0x1, 0x20000180, 0x4e, 0x0, ...) pkg/sentry/fs/file.go:294 +0x1c5 gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.performCallback(0xc420e60900, 0xc421768c60, 0x20000200, 0xc4202ce180, 0xc71940, 0xc420924c80, 0x0, 0x1, 0x20000180, 0x4e, ...) pkg/sentry/syscalls/linux/sys_aio.go:264 +0x2a7 gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.submitCallback.func1() pkg/sentry/syscalls/linux/sys_aio.go:342 +0x7c gvisor.googlesource.com/gvisor/pkg/sentry/fs.Async.func1(0xc42042e4d0) pkg/sentry/fs/fs.go:82 +0x4f created by gvisor.googlesource.com/gvisor/pkg/sentry/fs.Async pkg/sentry/fs/fs.go:80 +0x58