From c71647f2cc73ee334260b797a96e51eca5c3d580 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 20 Jun 2018 15:49:10 +0200 Subject: [PATCH] pkg/report: add gvisor support --- pkg/report/gvisor.go | 176 ++++++++++++++++++++++++++++ pkg/report/report.go | 4 + pkg/report/testdata/gvisor/report/0 | 123 +++++++++++++++++++ pkg/report/testdata/gvisor/report/1 | 105 +++++++++++++++++ pkg/report/testdata/gvisor/report/2 | 68 +++++++++++ pkg/report/testdata/gvisor/report/3 | 92 +++++++++++++++ pkg/report/testdata/gvisor/report/4 | 97 +++++++++++++++ pkg/report/testdata/gvisor/report/5 | 53 +++++++++ pkg/report/testdata/gvisor/report/6 | 165 ++++++++++++++++++++++++++ pkg/report/testdata/gvisor/report/7 | 169 ++++++++++++++++++++++++++ pkg/report/testdata/gvisor/report/8 | 170 +++++++++++++++++++++++++++ pkg/report/testdata/gvisor/report/9 | 96 +++++++++++++++ 12 files changed, 1318 insertions(+) create mode 100644 pkg/report/gvisor.go create mode 100644 pkg/report/testdata/gvisor/report/0 create mode 100644 pkg/report/testdata/gvisor/report/1 create mode 100644 pkg/report/testdata/gvisor/report/2 create mode 100644 pkg/report/testdata/gvisor/report/3 create mode 100644 pkg/report/testdata/gvisor/report/4 create mode 100644 pkg/report/testdata/gvisor/report/5 create mode 100644 pkg/report/testdata/gvisor/report/6 create mode 100644 pkg/report/testdata/gvisor/report/7 create mode 100644 pkg/report/testdata/gvisor/report/8 create mode 100644 pkg/report/testdata/gvisor/report/9 diff --git a/pkg/report/gvisor.go b/pkg/report/gvisor.go new file mode 100644 index 00000000..357051fb --- /dev/null +++ b/pkg/report/gvisor.go @@ -0,0 +1,176 @@ +// Copyright 2018 syzkaller project authors. All rights reserved. +// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +package report + +import ( + "bytes" + "regexp" + + "github.com/google/syzkaller/pkg/symbolizer" +) + +type gvisor struct { + ignores []*regexp.Regexp +} + +func ctorGvisor(kernelSrc, kernelObj string, symbols map[string][]symbolizer.Symbol, + ignores []*regexp.Regexp) (Reporter, error) { + ctx := &gvisor{ + ignores: ignores, + } + return ctx, nil +} + +func (ctx *gvisor) ContainsCrash(output []byte) bool { + return containsCrash(output, gvisorOopses, ctx.ignores) +} + +func (ctx *gvisor) Parse(output []byte) *Report { + rep := &Report{ + Output: output, + } + var oops *oops + for pos := 0; pos < len(output); { + next := bytes.IndexByte(output[pos:], '\n') + if next != -1 { + next += pos + } else { + next = len(output) + } + line := output[pos:next] + for _, oops1 := range gvisorOopses { + match := matchOops(line, oops1, ctx.ignores) + if match != -1 { + oops = oops1 + rep.StartPos = pos + break + } + } + if oops != nil { + break + } + pos = next + 1 + } + if oops == nil { + return nil + } + title, corrupted, _ := extractDescription(output[rep.StartPos:], oops, nil) + rep.Title = title + rep.Report = ctx.shortenReport(output[rep.StartPos:]) + rep.Corrupted = corrupted != "" + rep.corruptedReason = corrupted + return rep +} + +func (ctx *gvisor) shortenReport(report []byte) []byte { + // gvisor panics include stacks of all goroutines. + // This output is too lengthy for report and not very useful. + // So we always take 5 lines from report and then cut it at the next empty line. + // The intention is to capture panic header and traceback of the first goroutine. + pos := 0 + for i := 0; i < 5; i++ { + pos1 := bytes.IndexByte(report[pos:], '\n') + if pos1 == -1 { + return report + } + pos += pos1 + 1 + } + end := bytes.Index(report[pos:], []byte{'\n', '\n'}) + if end == -1 { + return report + } + if bytes.Contains(report, []byte("WARNING: DATA RACE")) { + // For data races extract both stacks. + end2 := bytes.Index(report[pos+end+2:], []byte{'\n', '\n'}) + if end2 != -1 { + end += end2 + 2 + } + } + return report[:pos+end+1] +} + +func (ctx *gvisor) Symbolize(rep *Report) error { + return nil +} + +var gvisorOopses = []*oops{ + &oops{ + []byte("panic:"), + []oopsFormat{ + { + title: compile("panic:(.*)"), + fmt: "panic:%[1]v", + noStackTrace: true, + }, + }, + []*regexp.Regexp{}, + }, + &oops{ + []byte("Panic:"), + []oopsFormat{ + { + title: compile("Panic:(.*)"), + fmt: "Panic:%[1]v", + noStackTrace: true, + }, + }, + []*regexp.Regexp{}, + }, + &oops{ + []byte("fatal error:"), + []oopsFormat{ + { + title: compile("fatal error:(.*)"), + fmt: "fatal error:%[1]v", + noStackTrace: true, + }, + }, + []*regexp.Regexp{}, + }, + &oops{ + []byte("runtime error:"), + []oopsFormat{ + { + title: compile("runtime error:(.*)"), + fmt: "runtime error:%[1]v", + noStackTrace: true, + }, + }, + []*regexp.Regexp{}, + }, + &oops{ + []byte("signal SIGSEGV"), + []oopsFormat{ + { + title: compile("signal SIGSEGV(.*)"), + fmt: "signal SIGSEGV%[1]v", + noStackTrace: true, + }, + }, + []*regexp.Regexp{}, + }, + &oops{ + []byte("signal SIGBUS"), + []oopsFormat{ + { + title: compile("signal SIGBUS(.*)"), + fmt: "signal SIGBUS%[1]v", + noStackTrace: true, + }, + }, + []*regexp.Regexp{}, + }, + &oops{ + []byte("WARNING: DATA RACE"), + []oopsFormat{ + { + title: compile("WARNING: DATA RACE"), + report: compile("WARNING: DATA RACE\n(?:.*\n)*? (?:[a-zA-Z0-9./-_]+/)([a-zA-Z0-9.()*_]+)\\(\\)\n"), + fmt: "DATA RACE in %[1]v", + noStackTrace: true, + }, + }, + []*regexp.Regexp{}, + }, +} diff --git a/pkg/report/report.go b/pkg/report/report.go index 713a3f1f..bd702b1d 100644 --- a/pkg/report/report.go +++ b/pkg/report/report.go @@ -52,6 +52,9 @@ type Report struct { // ignores: optional list of regexps to ignore (must match first line of crash message) func NewReporter(os, vmType, kernelSrc, kernelObj string, symbols map[string][]symbolizer.Symbol, ignores []*regexp.Regexp) (Reporter, error) { + if vmType == "gvisor" { + os = vmType + } ctor := ctors[os] if ctor == nil { return nil, fmt.Errorf("unknown os: %v", os) @@ -69,6 +72,7 @@ func NewReporter(os, vmType, kernelSrc, kernelObj string, symbols map[string][]s var ctors = map[string]fn{ "akaros": ctorStub, "linux": ctorLinux, + "gvisor": ctorGvisor, "freebsd": ctorFreebsd, "netbsd": ctorNetbsd, "fuchsia": ctorFuchsia, diff --git a/pkg/report/testdata/gvisor/report/0 b/pkg/report/testdata/gvisor/report/0 new file mode 100644 index 00000000..74dd3e42 --- /dev/null +++ b/pkg/report/testdata/gvisor/report/0 @@ -0,0 +1,123 @@ +TITLE: panic: runtime error: invalid memory address or nil pointer dereference + +r9 = getuid() +ioctl$TUNSETOWNER(r3, 0x400454cc, r9) + +panic: runtime error: invalid memory address or nil pointer dereference +[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x811ac1] + +goroutine 9707990 [running]: +panic(0xaddd00, 0x10d2b90) + GOROOT/src/runtime/panic.go:551 +0x3c1 fp=0xc4205d15b0 sp=0xc4205d1510 pc=0x428fa1 +runtime.panicmem() + GOROOT/src/runtime/panic.go:63 +0x5e fp=0xc4205d15d0 sp=0xc4205d15b0 pc=0x427e7e +runtime.sigpanic() + GOROOT/src/runtime/signal_unix.go:388 +0x17a fp=0xc4205d1620 sp=0xc4205d15d0 pc=0x43e59a +gvisor.googlesource.com/gvisor/pkg/sentry/fs/gofer.(*handleReadWriter).WriteFromBlocks(0xc420ef06e0, 0x7fe2a3453200, 0xffffffffffffffff, 0x0, 0x61, 0x0, 0x0, 0x0) + pkg/sentry/fs/gofer/handles.go:133 +0x41 fp=0xc4205d1698 sp=0xc4205d1620 pc=0x811ac1 +gvisor.googlesource.com/gvisor/pkg/sentry/fs/gofer.(*inodeFileState).WriteFromBlocksAt(0xc4204e24d0, 0xc94d20, 0xc4203fdcc8, 0x7fe2a3453200, 0xffffffffffffffff, 0x0, 0x61, 0x200, 0x0, 0x0, ...) + pkg/sentry/fs/gofer/inode.go:204 +0xfe fp=0xc4205d1710 sp=0xc4205d1698 pc=0x81239e +gvisor.googlesource.com/gvisor/pkg/sentry/fs/fsutil.(*inodeReadWriter).WriteFromBlocks(0xc421cdcf40, 0x7fe2a3453200, 0xffffffffffffffff, 0x0, 0x61, 0x0, 0x0, 0x0) + pkg/sentry/fs/fsutil/inode_cached.go:605 +0x35d fp=0xc4205d1848 sp=0xc4205d1710 pc=0x660f8d +gvisor.googlesource.com/gvisor/pkg/sentry/safemem.(Writer).WriteFromBlocks-fm(0x7fe2a3453200, 0xffffffffffffffff, 0x0, 0x61, 0x20000261, 0x7fe2a3453200, 0xffffffffffffffff) + pkg/sentry/mm/io.go:309 +0x57 fp=0xc4205d1898 sp=0xc4205d1848 pc=0x6bacd7 +gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).withInternalMappings(0xc4214a6580, 0xc94d20, 0xc4203fdcc8, 0x20000200, 0x20000261, 0x1, 0xc420ef0b40, 0x10fd8e0, 0x6e5a33137f9f62, 0xc420ef0a88) + pkg/sentry/mm/io.go:464 +0x72c fp=0xc4205d1998 sp=0xc4205d1898 pc=0x694c4c +gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).withVecInternalMappings(0xc4214a6580, 0xc94d20, 0xc4203fdcc8, 0x0, 0x1, 0x20000200, 0x61, 0xc400000001, 0xc420ef0b40, 0x1538c53a716d7b9c, ...) + pkg/sentry/mm/io.go:533 +0x7f1 fp=0xc4205d1a90 sp=0xc4205d1998 pc=0x6954c1 +gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).CopyInTo(0xc4214a6580, 0xc94d20, 0xc4203fdcc8, 0x0, 0x1, 0x20000200, 0x61, 0xc87960, 0xc421cdcf40, 0x0, ...) + pkg/sentry/mm/io.go:309 +0x17c fp=0xc4205d1b68 sp=0xc4205d1a90 pc=0x69370c +gvisor.googlesource.com/gvisor/pkg/sentry/usermem.IOSequence.CopyInTo(0xc93580, 0xc4214a6580, 0x0, 0x1, 0x20000200, 0x61, 0x0, 0xc94d20, 0xc4203fdcc8, 0xc87960, ...) + pkg/sentry/usermem/usermem.go:528 +0xad fp=0xc4205d1be0 sp=0xc4205d1b68 pc=0x590a4d +gvisor.googlesource.com/gvisor/pkg/sentry/fs/fsutil.(*CachingInodeOperations).Write(0xc4202ed800, 0xc94d20, 0xc4203fdcc8, 0xc93580, 0xc4214a6580, 0x0, 0x1, 0x20000200, 0x61, 0x0, ...) + pkg/sentry/fs/fsutil/inode_cached.go:474 +0x19e fp=0xc4205d1ca0 sp=0xc4205d1be0 pc=0x66037e +gvisor.googlesource.com/gvisor/pkg/sentry/fs/gofer.(*fileOperations).Write(0xc421fcd1d0, 0xc94d20, 0xc4203fdcc8, 0xc4205e9000, 0xc93580, 0xc4214a6580, 0x0, 0x1, 0x20000200, 0x61, ...) + pkg/sentry/fs/gofer/file.go:192 +0x271 fp=0xc4205d1d78 sp=0xc4205d1ca0 pc=0x80dbf1 +gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*overlayFileOperations).Write(0xc421fcd200, 0xc94d20, 0xc4203fdcc8, 0xc4205e9080, 0xc93580, 0xc4214a6580, 0x0, 0x1, 0x20000200, 0x61, ...) + pkg/sentry/fs/file_overlay.go:222 +0x9b fp=0xc4205d1e00 sp=0xc4205d1d78 pc=0x61d95b +gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*File).Pwritev(0xc4205e9080, 0xc94d20, 0xc4203fdcc8, 0xc93580, 0xc4214a6580, 0x0, 0x1, 0x20000200, 0x61, 0x0, ...) + pkg/sentry/fs/file.go:269 +0x1c2 fp=0xc4205d1ea8 sp=0xc4205d1e00 pc=0x61b532 +gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.performCallback(0xc421b91b00, 0xc4205e9080, 0x20000280, 0xc4204a8a80, 0xc93580, 0xc4214a6580, 0x0, 0x1, 0x20000200, 0x61, ...) + pkg/sentry/syscalls/linux/sys_aio.go:264 +0x2a4 fp=0xc4205d1f38 sp=0xc4205d1ea8 pc=0x8c2144 +gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.submitCallback.func1() + pkg/sentry/syscalls/linux/sys_aio.go:342 +0x7c fp=0xc4205d1fb0 sp=0xc4205d1f38 pc=0x8ef8bc +gvisor.googlesource.com/gvisor/pkg/sentry/fs.Async.func1(0xc420172b60) + pkg/sentry/fs/fs.go:82 +0x4f fp=0xc4205d1fd8 sp=0xc4205d1fb0 pc=0x63408f +runtime.goexit() + bazel-out/k8-fastbuild/bin/external/io_bazel_rules_go/linux_amd64_pure_stripped/stdlib~/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc4205d1fe0 sp=0xc4205d1fd8 pc=0x455f11 +created by gvisor.googlesource.com/gvisor/pkg/sentry/fs.Async + pkg/sentry/fs/fs.go:80 +0x58 + +goroutine 1 [semacquire, 23 minutes]: +runtime.gopark(0xbfba68, 0x10ec600, 0xbd8524, 0xa, 0xc4200e0319, 0x4) + GOROOT/src/runtime/proc.go:291 +0x11a fp=0xc4204f1920 sp=0xc4204f1900 pc=0x42b10a +runtime.goparkunlock(0x10ec600, 0xbd8524, 0xa, 0x19, 0x4) + GOROOT/src/runtime/proc.go:297 +0x5e fp=0xc4204f1960 sp=0xc4204f1920 pc=0x42b1be +runtime.semacquire1(0xc42011e700, 0x403300, 0x1) + GOROOT/src/runtime/sema.go:144 +0x1d4 fp=0xc4204f19d0 sp=0xc4204f1960 pc=0x43b3e4 +sync.runtime_Semacquire(0xc42011e700) + GOROOT/src/runtime/sema.go:56 +0x39 fp=0xc4204f19f8 sp=0xc4204f19d0 pc=0x43b009 +sync.(*WaitGroup).Wait(0xc42011e6f4) + GOROOT/src/sync/waitgroup.go:129 +0x72 fp=0xc4204f1a20 sp=0xc4204f19f8 pc=0x46bd72 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Kernel).WaitExited(0xc42025eb40) + pkg/sentry/kernel/kernel.go:730 +0x35 fp=0xc4204f1a38 sp=0xc4204f1a20 pc=0x70bbb5 +gvisor.googlesource.com/gvisor/runsc/boot.(*Loader).WaitExit(0xc420318000, 0x0, 0x0) + runsc/boot/loader.go:354 +0x2e fp=0xc4204f1a60 sp=0xc4204f1a38 pc=0x97e95e +gvisor.googlesource.com/gvisor/runsc/cmd.(*Boot).Execute(0xc420136740, 0xc8f900, 0xc42010c010, 0xc42011e420, 0xc42011de40, 0x2, 0x2, 0x0) + runsc/cmd/boot.go:144 +0xa28 fp=0xc4204f1c00 sp=0xc4204f1a60 pc=0xa05148 +github.com/google/subcommands.(*Commander).Execute(0xc420120000, 0xc8f900, 0xc42010c010, 0xc42011de40, 0x2, 0x2, 0xc42011de40) + external/com_github_google_subcommands/subcommands.go:141 +0x29f fp=0xc4204f1ca8 sp=0xc4204f1c00 pc=0x4e263f +github.com/google/subcommands.Execute(0xc8f900, 0xc42010c010, 0xc42011de40, 0x2, 0x2, 0x5) + external/com_github_google_subcommands/subcommands.go:371 +0x5f fp=0xc4204f1cf0 sp=0xc4204f1ca8 pc=0x4e406f +main.main() + runsc/main.go:188 +0xfda fp=0xc4204f1f88 sp=0xc4204f1cf0 pc=0xa0ff7a +runtime.main() + GOROOT/src/runtime/proc.go:198 +0x212 fp=0xc4204f1fe0 sp=0xc4204f1f88 pc=0x42acb2 +runtime.goexit() + bazel-out/k8-fastbuild/bin/external/io_bazel_rules_go/linux_amd64_pure_stripped/stdlib~/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc4204f1fe8 sp=0xc4204f1fe0 pc=0x455f11 + +REPORT: +panic: runtime error: invalid memory address or nil pointer dereference +[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x811ac1] + +goroutine 9707990 [running]: +panic(0xaddd00, 0x10d2b90) + GOROOT/src/runtime/panic.go:551 +0x3c1 fp=0xc4205d15b0 sp=0xc4205d1510 pc=0x428fa1 +runtime.panicmem() + GOROOT/src/runtime/panic.go:63 +0x5e fp=0xc4205d15d0 sp=0xc4205d15b0 pc=0x427e7e +runtime.sigpanic() + GOROOT/src/runtime/signal_unix.go:388 +0x17a fp=0xc4205d1620 sp=0xc4205d15d0 pc=0x43e59a +gvisor.googlesource.com/gvisor/pkg/sentry/fs/gofer.(*handleReadWriter).WriteFromBlocks(0xc420ef06e0, 0x7fe2a3453200, 0xffffffffffffffff, 0x0, 0x61, 0x0, 0x0, 0x0) + pkg/sentry/fs/gofer/handles.go:133 +0x41 fp=0xc4205d1698 sp=0xc4205d1620 pc=0x811ac1 +gvisor.googlesource.com/gvisor/pkg/sentry/fs/gofer.(*inodeFileState).WriteFromBlocksAt(0xc4204e24d0, 0xc94d20, 0xc4203fdcc8, 0x7fe2a3453200, 0xffffffffffffffff, 0x0, 0x61, 0x200, 0x0, 0x0, ...) + pkg/sentry/fs/gofer/inode.go:204 +0xfe fp=0xc4205d1710 sp=0xc4205d1698 pc=0x81239e +gvisor.googlesource.com/gvisor/pkg/sentry/fs/fsutil.(*inodeReadWriter).WriteFromBlocks(0xc421cdcf40, 0x7fe2a3453200, 0xffffffffffffffff, 0x0, 0x61, 0x0, 0x0, 0x0) + pkg/sentry/fs/fsutil/inode_cached.go:605 +0x35d fp=0xc4205d1848 sp=0xc4205d1710 pc=0x660f8d +gvisor.googlesource.com/gvisor/pkg/sentry/safemem.(Writer).WriteFromBlocks-fm(0x7fe2a3453200, 0xffffffffffffffff, 0x0, 0x61, 0x20000261, 0x7fe2a3453200, 0xffffffffffffffff) + pkg/sentry/mm/io.go:309 +0x57 fp=0xc4205d1898 sp=0xc4205d1848 pc=0x6bacd7 +gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).withInternalMappings(0xc4214a6580, 0xc94d20, 0xc4203fdcc8, 0x20000200, 0x20000261, 0x1, 0xc420ef0b40, 0x10fd8e0, 0x6e5a33137f9f62, 0xc420ef0a88) + pkg/sentry/mm/io.go:464 +0x72c fp=0xc4205d1998 sp=0xc4205d1898 pc=0x694c4c +gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).withVecInternalMappings(0xc4214a6580, 0xc94d20, 0xc4203fdcc8, 0x0, 0x1, 0x20000200, 0x61, 0xc400000001, 0xc420ef0b40, 0x1538c53a716d7b9c, ...) + pkg/sentry/mm/io.go:533 +0x7f1 fp=0xc4205d1a90 sp=0xc4205d1998 pc=0x6954c1 +gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).CopyInTo(0xc4214a6580, 0xc94d20, 0xc4203fdcc8, 0x0, 0x1, 0x20000200, 0x61, 0xc87960, 0xc421cdcf40, 0x0, ...) + pkg/sentry/mm/io.go:309 +0x17c fp=0xc4205d1b68 sp=0xc4205d1a90 pc=0x69370c +gvisor.googlesource.com/gvisor/pkg/sentry/usermem.IOSequence.CopyInTo(0xc93580, 0xc4214a6580, 0x0, 0x1, 0x20000200, 0x61, 0x0, 0xc94d20, 0xc4203fdcc8, 0xc87960, ...) + pkg/sentry/usermem/usermem.go:528 +0xad fp=0xc4205d1be0 sp=0xc4205d1b68 pc=0x590a4d +gvisor.googlesource.com/gvisor/pkg/sentry/fs/fsutil.(*CachingInodeOperations).Write(0xc4202ed800, 0xc94d20, 0xc4203fdcc8, 0xc93580, 0xc4214a6580, 0x0, 0x1, 0x20000200, 0x61, 0x0, ...) + pkg/sentry/fs/fsutil/inode_cached.go:474 +0x19e fp=0xc4205d1ca0 sp=0xc4205d1be0 pc=0x66037e +gvisor.googlesource.com/gvisor/pkg/sentry/fs/gofer.(*fileOperations).Write(0xc421fcd1d0, 0xc94d20, 0xc4203fdcc8, 0xc4205e9000, 0xc93580, 0xc4214a6580, 0x0, 0x1, 0x20000200, 0x61, ...) + pkg/sentry/fs/gofer/file.go:192 +0x271 fp=0xc4205d1d78 sp=0xc4205d1ca0 pc=0x80dbf1 +gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*overlayFileOperations).Write(0xc421fcd200, 0xc94d20, 0xc4203fdcc8, 0xc4205e9080, 0xc93580, 0xc4214a6580, 0x0, 0x1, 0x20000200, 0x61, ...) + pkg/sentry/fs/file_overlay.go:222 +0x9b fp=0xc4205d1e00 sp=0xc4205d1d78 pc=0x61d95b +gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*File).Pwritev(0xc4205e9080, 0xc94d20, 0xc4203fdcc8, 0xc93580, 0xc4214a6580, 0x0, 0x1, 0x20000200, 0x61, 0x0, ...) + pkg/sentry/fs/file.go:269 +0x1c2 fp=0xc4205d1ea8 sp=0xc4205d1e00 pc=0x61b532 +gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.performCallback(0xc421b91b00, 0xc4205e9080, 0x20000280, 0xc4204a8a80, 0xc93580, 0xc4214a6580, 0x0, 0x1, 0x20000200, 0x61, ...) + pkg/sentry/syscalls/linux/sys_aio.go:264 +0x2a4 fp=0xc4205d1f38 sp=0xc4205d1ea8 pc=0x8c2144 +gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.submitCallback.func1() + pkg/sentry/syscalls/linux/sys_aio.go:342 +0x7c fp=0xc4205d1fb0 sp=0xc4205d1f38 pc=0x8ef8bc +gvisor.googlesource.com/gvisor/pkg/sentry/fs.Async.func1(0xc420172b60) + pkg/sentry/fs/fs.go:82 +0x4f fp=0xc4205d1fd8 sp=0xc4205d1fb0 pc=0x63408f +runtime.goexit() + bazel-out/k8-fastbuild/bin/external/io_bazel_rules_go/linux_amd64_pure_stripped/stdlib~/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc4205d1fe0 sp=0xc4205d1fd8 pc=0x455f11 +created by gvisor.googlesource.com/gvisor/pkg/sentry/fs.Async + pkg/sentry/fs/fs.go:80 +0x58 diff --git a/pkg/report/testdata/gvisor/report/1 b/pkg/report/testdata/gvisor/report/1 new file mode 100644 index 00000000..4eddd6dc --- /dev/null +++ b/pkg/report/testdata/gvisor/report/1 @@ -0,0 +1,105 @@ +TITLE: panic: MountNamespace.FindInode: path is empty + +move_pages(r2, 0x5, &(0x7f0000000080)=[&(0x7f0000ffb000/0x3000)=nil, &(0x7f0000ffb000/0x4000)=nil, &(0x7f0000ffc000/0x4000)=nil, &(0x7f0000ffd000/0x3000)=nil, &(0x7f0000ffc000/0x4000)=nil], 0x0, &(0x7f00000000c0), 0x4) +write$cgroup_subtree(r1, &(0x7f0000000140), 0x0) + +panic: MountNamespace.FindInode: path is empty + +goroutine 56049 [running]: +panic(0xa8fd00, 0xc84ba0) + GOROOT/src/runtime/panic.go:551 +0x3c1 fp=0xc420c6f078 sp=0xc420c6efd8 pc=0x428fa1 +gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*MountNamespace).FindLink(0xc42011eae0, 0xc94840, 0xc42039a400, 0xc4202165a0, 0xc420aa7f40, 0x0, 0x0, 0x28, 0xc420592788, 0xc4205927d0, ...) + pkg/sentry/fs/mounts.go:352 +0x500 fp=0xc420c6f148 sp=0xc420c6f078 pc=0x631560 +gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*MountNamespace).FindInode(0xc42011eae0, 0xc94840, 0xc42039a400, 0xc4202165a0, 0xc420aa7f40, 0x0, 0x0, 0x28, 0x20, 0xc420488160, ...) + pkg/sentry/fs/mounts.go:437 +0x71 fp=0xc420c6f1b0 sp=0xc420c6f148 pc=0x631601 +gvisor.googlesource.com/gvisor/pkg/sentry/loader.openPath(0xc94840, 0xc42039a400, 0xc42011eae0, 0xc4202165a0, 0xc420aa7f40, 0x28, 0x0, 0x0, 0x0, 0x0, ...) + pkg/sentry/loader/loader.go:58 +0xc1 fp=0xc420c6f2f8 sp=0xc420c6f1b0 pc=0x6ebd91 +gvisor.googlesource.com/gvisor/pkg/sentry/loader.loadPath(0xc94840, 0xc42039a400, 0xc420728c80, 0xc42011eae0, 0xc4202165a0, 0xc420aa7f40, 0x28, 0xc4202943c0, 0x0, 0x0, ...) + pkg/sentry/loader/loader.go:135 +0x170 fp=0xc420c6f5e8 sp=0xc420c6f2f8 pc=0x6ec850 +gvisor.googlesource.com/gvisor/pkg/sentry/loader.Load(0xc94840, 0xc42039a400, 0xc420728c80, 0xc42011eae0, 0xc4202165a0, 0xc420aa7f40, 0x28, 0xc4202943c0, 0x0, 0x0, ...) + pkg/sentry/loader/loader.go:195 +0x158 fp=0xc420c6f938 sp=0xc420c6f5e8 pc=0x6ed738 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Kernel).LoadTaskImage(0xc42025ea20, 0xc94840, 0xc42039a400, 0xc42011eae0, 0xc4202165a0, 0xc420aa7f40, 0x28, 0x0, 0x0, 0x0, ...) + pkg/sentry/kernel/task_context.go:157 +0x1b9 fp=0xc420c6fa60 sp=0xc420c6f938 pc=0x72a0e9 +gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Execve(0xc42039a400, 0x20000040, 0x200000c0, 0x20000200, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) + pkg/sentry/syscalls/linux/sys_thread.go:106 +0x2c8 fp=0xc420c6fb78 sp=0xc420c6fa60 pc=0x8e7348 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc42039a400, 0x3b, 0x20000040, 0x200000c0, 0x20000200, 0x0, 0x0, 0x0, 0xc4202943c0, 0xbd3380, ...) + pkg/sentry/kernel/task_syscall.go:162 +0x307 fp=0xc420c6fc30 sp=0xc420c6fb78 pc=0x73c3f7 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc42039a400, 0x3b, 0x20000040, 0x200000c0, 0x20000200, 0x0, 0x0, 0x0, 0x0, 0x0) + pkg/sentry/kernel/task_syscall.go:278 +0x62 fp=0xc420c6fcb8 sp=0xc420c6fc30 pc=0x73d092 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc42039a400, 0x3b, 0x20000040, 0x200000c0, 0x20000200, 0x0, 0x0, 0x0, 0xc87be0, 0xc420c6fe00) + pkg/sentry/kernel/task_syscall.go:241 +0x91 fp=0xc420c6fd18 sp=0xc420c6fcb8 pc=0x73ccc1 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc42039a400, 0x2, 0xc4202787e0) + pkg/sentry/kernel/task_syscall.go:216 +0x10c fp=0xc420c6fe10 sp=0xc420c6fd18 pc=0x73c61c +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc42039a400, 0xc87be0, 0x0) + pkg/sentry/kernel/task_run.go:217 +0xed8 fp=0xc420c6ff88 sp=0xc420c6fe10 pc=0x733af8 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run(0xc42039a400, 0x35c) + pkg/sentry/kernel/task_run.go:95 +0x174 fp=0xc420c6ffd0 sp=0xc420c6ff88 pc=0x7328b4 +runtime.goexit() + bazel-out/k8-fastbuild/bin/external/io_bazel_rules_go/linux_amd64_pure_stripped/stdlib~/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc420c6ffd8 sp=0xc420c6ffd0 pc=0x455f11 +created by gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).Start + pkg/sentry/kernel/task_start.go:251 +0x100 + +goroutine 1 [semacquire]: +runtime.gopark(0xbfba68, 0x10ec000, 0xbd8524, 0xa, 0xc4200e0219, 0x4) + GOROOT/src/runtime/proc.go:291 +0x11a fp=0xc420505920 sp=0xc420505900 pc=0x42b10a +runtime.goparkunlock(0x10ec000, 0xbd8524, 0xa, 0x19, 0x4) + GOROOT/src/runtime/proc.go:297 +0x5e fp=0xc420505960 sp=0xc420505920 pc=0x42b1be +runtime.semacquire1(0xc42011e640, 0x403300, 0x1) + GOROOT/src/runtime/sema.go:144 +0x1d4 fp=0xc4205059d0 sp=0xc420505960 pc=0x43b3e4 +sync.runtime_Semacquire(0xc42011e640) + GOROOT/src/runtime/sema.go:56 +0x39 fp=0xc4205059f8 sp=0xc4205059d0 pc=0x43b009 +sync.(*WaitGroup).Wait(0xc42011e634) + GOROOT/src/sync/waitgroup.go:129 +0x72 fp=0xc420505a20 sp=0xc4205059f8 pc=0x46bd72 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Kernel).WaitExited(0xc42025ea20) + pkg/sentry/kernel/kernel.go:730 +0x35 fp=0xc420505a38 sp=0xc420505a20 pc=0x70bbb5 +gvisor.googlesource.com/gvisor/runsc/boot.(*Loader).WaitExit(0xc4201ca240, 0x0, 0x0) + runsc/boot/loader.go:354 +0x2e fp=0xc420505a60 sp=0xc420505a38 pc=0x97e95e +gvisor.googlesource.com/gvisor/runsc/cmd.(*Boot).Execute(0xc420136740, 0xc8f900, 0xc42010c010, 0xc42011e360, 0xc42011de40, 0x2, 0x2, 0x0) + runsc/cmd/boot.go:144 +0xa28 fp=0xc420505c00 sp=0xc420505a60 pc=0xa05148 +github.com/google/subcommands.(*Commander).Execute(0xc420120000, 0xc8f900, 0xc42010c010, 0xc42011de40, 0x2, 0x2, 0xc42011de40) + external/com_github_google_subcommands/subcommands.go:141 +0x29f fp=0xc420505ca8 sp=0xc420505c00 pc=0x4e263f +github.com/google/subcommands.Execute(0xc8f900, 0xc42010c010, 0xc42011de40, 0x2, 0x2, 0x5) + external/com_github_google_subcommands/subcommands.go:371 +0x5f fp=0xc420505cf0 sp=0xc420505ca8 pc=0x4e406f +main.main() + runsc/main.go:188 +0xfda fp=0xc420505f88 sp=0xc420505cf0 pc=0xa0ff7a +runtime.main() + GOROOT/src/runtime/proc.go:198 +0x212 fp=0xc420505fe0 sp=0xc420505f88 pc=0x42acb2 +runtime.goexit() + bazel-out/k8-fastbuild/bin/external/io_bazel_rules_go/linux_amd64_pure_stripped/stdlib~/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc420505fe8 sp=0xc420505fe0 pc=0x455f11 + +REPORT: +panic: MountNamespace.FindInode: path is empty + +goroutine 56049 [running]: +panic(0xa8fd00, 0xc84ba0) + GOROOT/src/runtime/panic.go:551 +0x3c1 fp=0xc420c6f078 sp=0xc420c6efd8 pc=0x428fa1 +gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*MountNamespace).FindLink(0xc42011eae0, 0xc94840, 0xc42039a400, 0xc4202165a0, 0xc420aa7f40, 0x0, 0x0, 0x28, 0xc420592788, 0xc4205927d0, ...) + pkg/sentry/fs/mounts.go:352 +0x500 fp=0xc420c6f148 sp=0xc420c6f078 pc=0x631560 +gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*MountNamespace).FindInode(0xc42011eae0, 0xc94840, 0xc42039a400, 0xc4202165a0, 0xc420aa7f40, 0x0, 0x0, 0x28, 0x20, 0xc420488160, ...) + pkg/sentry/fs/mounts.go:437 +0x71 fp=0xc420c6f1b0 sp=0xc420c6f148 pc=0x631601 +gvisor.googlesource.com/gvisor/pkg/sentry/loader.openPath(0xc94840, 0xc42039a400, 0xc42011eae0, 0xc4202165a0, 0xc420aa7f40, 0x28, 0x0, 0x0, 0x0, 0x0, ...) + pkg/sentry/loader/loader.go:58 +0xc1 fp=0xc420c6f2f8 sp=0xc420c6f1b0 pc=0x6ebd91 +gvisor.googlesource.com/gvisor/pkg/sentry/loader.loadPath(0xc94840, 0xc42039a400, 0xc420728c80, 0xc42011eae0, 0xc4202165a0, 0xc420aa7f40, 0x28, 0xc4202943c0, 0x0, 0x0, ...) + pkg/sentry/loader/loader.go:135 +0x170 fp=0xc420c6f5e8 sp=0xc420c6f2f8 pc=0x6ec850 +gvisor.googlesource.com/gvisor/pkg/sentry/loader.Load(0xc94840, 0xc42039a400, 0xc420728c80, 0xc42011eae0, 0xc4202165a0, 0xc420aa7f40, 0x28, 0xc4202943c0, 0x0, 0x0, ...) + pkg/sentry/loader/loader.go:195 +0x158 fp=0xc420c6f938 sp=0xc420c6f5e8 pc=0x6ed738 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Kernel).LoadTaskImage(0xc42025ea20, 0xc94840, 0xc42039a400, 0xc42011eae0, 0xc4202165a0, 0xc420aa7f40, 0x28, 0x0, 0x0, 0x0, ...) + pkg/sentry/kernel/task_context.go:157 +0x1b9 fp=0xc420c6fa60 sp=0xc420c6f938 pc=0x72a0e9 +gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Execve(0xc42039a400, 0x20000040, 0x200000c0, 0x20000200, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) + pkg/sentry/syscalls/linux/sys_thread.go:106 +0x2c8 fp=0xc420c6fb78 sp=0xc420c6fa60 pc=0x8e7348 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc42039a400, 0x3b, 0x20000040, 0x200000c0, 0x20000200, 0x0, 0x0, 0x0, 0xc4202943c0, 0xbd3380, ...) + pkg/sentry/kernel/task_syscall.go:162 +0x307 fp=0xc420c6fc30 sp=0xc420c6fb78 pc=0x73c3f7 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc42039a400, 0x3b, 0x20000040, 0x200000c0, 0x20000200, 0x0, 0x0, 0x0, 0x0, 0x0) + pkg/sentry/kernel/task_syscall.go:278 +0x62 fp=0xc420c6fcb8 sp=0xc420c6fc30 pc=0x73d092 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc42039a400, 0x3b, 0x20000040, 0x200000c0, 0x20000200, 0x0, 0x0, 0x0, 0xc87be0, 0xc420c6fe00) + pkg/sentry/kernel/task_syscall.go:241 +0x91 fp=0xc420c6fd18 sp=0xc420c6fcb8 pc=0x73ccc1 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc42039a400, 0x2, 0xc4202787e0) + pkg/sentry/kernel/task_syscall.go:216 +0x10c fp=0xc420c6fe10 sp=0xc420c6fd18 pc=0x73c61c +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc42039a400, 0xc87be0, 0x0) + pkg/sentry/kernel/task_run.go:217 +0xed8 fp=0xc420c6ff88 sp=0xc420c6fe10 pc=0x733af8 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run(0xc42039a400, 0x35c) + pkg/sentry/kernel/task_run.go:95 +0x174 fp=0xc420c6ffd0 sp=0xc420c6ff88 pc=0x7328b4 +runtime.goexit() + bazel-out/k8-fastbuild/bin/external/io_bazel_rules_go/linux_amd64_pure_stripped/stdlib~/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc420c6ffd8 sp=0xc420c6ffd0 pc=0x455f11 +created by gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).Start + pkg/sentry/kernel/task_start.go:251 +0x100 diff --git a/pkg/report/testdata/gvisor/report/2 b/pkg/report/testdata/gvisor/report/2 new file mode 100644 index 00000000..e61a023f --- /dev/null +++ b/pkg/report/testdata/gvisor/report/2 @@ -0,0 +1,68 @@ +TITLE: panic: ptrace set regs failed: no such process + +I0616 12:16:04.416012 11084 x:0] [ 3656] Error opening /bin/sh: no such file or directory +I0616 12:16:04.416026 11084 x:0] [ 3656] Failed to load /bin/sh: no such file or directory +panic: ptrace set regs failed: no such process + +goroutine 340101 [running]: +panic(0xa8fd00, 0xc4203340b0) + GOROOT/src/runtime/panic.go:551 +0x3c1 fp=0xc420b41c08 sp=0xc420b41b68 pc=0x428fa1 +gvisor.googlesource.com/gvisor/pkg/sentry/platform/ptrace.(*subprocess).switchToApp(0xc420130b40, 0xc4204209c0, 0xc99620, 0xc42033ca20, 0x404800) + pkg/sentry/platform/ptrace/subprocess.go:437 +0xa72 fp=0xc420b41d90 sp=0xc420b41c08 pc=0x8b7952 +gvisor.googlesource.com/gvisor/pkg/sentry/platform/ptrace.(*context).Switch(0xc4204209c0, 0xc93e80, 0xc420130b40, 0xc99620, 0xc42033ca20, 0x7feaffffffff, 0x0, 0x0, 0x0, 0x0) + pkg/sentry/platform/ptrace/ptrace.go:102 +0x71 fp=0xc420b41e10 sp=0xc420b41d90 pc=0x8b4901 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc42039e400, 0xc87be0, 0x0) + pkg/sentry/kernel/task_run.go:207 +0x17d fp=0xc420b41f88 sp=0xc420b41e10 pc=0x732d9d +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run(0xc42039e400, 0xd44) + pkg/sentry/kernel/task_run.go:95 +0x174 fp=0xc420b41fd0 sp=0xc420b41f88 pc=0x7328b4 +runtime.goexit() + bazel-out/k8-fastbuild/bin/external/io_bazel_rules_go/linux_amd64_pure_stripped/stdlib~/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc420b41fd8 sp=0xc420b41fd0 pc=0x455f11 +created by gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).Start + pkg/sentry/kernel/task_start.go:251 +0x100 + +goroutine 1 [semacquire]: +runtime.gopark(0xbfba68, 0x10ec340, 0xbd8524, 0xa, 0xc420127919, 0x4) + GOROOT/src/runtime/proc.go:291 +0x11a fp=0xc420457920 sp=0xc420457900 pc=0x42b10a +runtime.goparkunlock(0x10ec340, 0xbd8524, 0xa, 0x19, 0x4) + GOROOT/src/runtime/proc.go:297 +0x5e fp=0xc420457960 sp=0xc420457920 pc=0x42b1be +runtime.semacquire1(0xc4200e0280, 0x403300, 0x1) + GOROOT/src/runtime/sema.go:144 +0x1d4 fp=0xc4204579d0 sp=0xc420457960 pc=0x43b3e4 +sync.runtime_Semacquire(0xc4200e0280) + GOROOT/src/runtime/sema.go:56 +0x39 fp=0xc4204579f8 sp=0xc4204579d0 pc=0x43b009 +sync.(*WaitGroup).Wait(0xc4200e0274) + GOROOT/src/sync/waitgroup.go:129 +0x72 fp=0xc420457a20 sp=0xc4204579f8 pc=0x46bd72 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Kernel).WaitExited(0xc42029e000) + pkg/sentry/kernel/kernel.go:730 +0x35 fp=0xc420457a38 sp=0xc420457a20 pc=0x70bbb5 +gvisor.googlesource.com/gvisor/runsc/boot.(*Loader).WaitExit(0xc4201e00c0, 0x0, 0x0) + runsc/boot/loader.go:354 +0x2e fp=0xc420457a60 sp=0xc420457a38 pc=0x97e95e +gvisor.googlesource.com/gvisor/runsc/cmd.(*Boot).Execute(0xc420146740, 0xc8f900, 0xc420122000, 0xc4201263c0, 0xc42012fe60, 0x2, 0x2, 0x0) + runsc/cmd/boot.go:144 +0xa28 fp=0xc420457c00 sp=0xc420457a60 pc=0xa05148 +github.com/google/subcommands.(*Commander).Execute(0xc420128000, 0xc8f900, 0xc420122000, 0xc42012fe60, 0x2, 0x2, 0xc42012fe60) + external/com_github_google_subcommands/subcommands.go:141 +0x29f fp=0xc420457ca8 sp=0xc420457c00 pc=0x4e263f +github.com/google/subcommands.Execute(0xc8f900, 0xc420122000, 0xc42012fe60, 0x2, 0x2, 0x5) + external/com_github_google_subcommands/subcommands.go:371 +0x5f fp=0xc420457cf0 sp=0xc420457ca8 pc=0x4e406f +main.main() + runsc/main.go:188 +0xfda fp=0xc420457f88 sp=0xc420457cf0 pc=0xa0ff7a +runtime.main() + GOROOT/src/runtime/proc.go:198 +0x212 fp=0xc420457fe0 sp=0xc420457f88 pc=0x42acb2 +runtime.goexit() + bazel-out/k8-fastbuild/bin/external/io_bazel_rules_go/linux_amd64_pure_stripped/stdlib~/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc420457fe8 sp=0xc420457fe0 pc=0x455f11 + +REPORT: +panic: ptrace set regs failed: no such process + +goroutine 340101 [running]: +panic(0xa8fd00, 0xc4203340b0) + GOROOT/src/runtime/panic.go:551 +0x3c1 fp=0xc420b41c08 sp=0xc420b41b68 pc=0x428fa1 +gvisor.googlesource.com/gvisor/pkg/sentry/platform/ptrace.(*subprocess).switchToApp(0xc420130b40, 0xc4204209c0, 0xc99620, 0xc42033ca20, 0x404800) + pkg/sentry/platform/ptrace/subprocess.go:437 +0xa72 fp=0xc420b41d90 sp=0xc420b41c08 pc=0x8b7952 +gvisor.googlesource.com/gvisor/pkg/sentry/platform/ptrace.(*context).Switch(0xc4204209c0, 0xc93e80, 0xc420130b40, 0xc99620, 0xc42033ca20, 0x7feaffffffff, 0x0, 0x0, 0x0, 0x0) + pkg/sentry/platform/ptrace/ptrace.go:102 +0x71 fp=0xc420b41e10 sp=0xc420b41d90 pc=0x8b4901 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc42039e400, 0xc87be0, 0x0) + pkg/sentry/kernel/task_run.go:207 +0x17d fp=0xc420b41f88 sp=0xc420b41e10 pc=0x732d9d +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run(0xc42039e400, 0xd44) + pkg/sentry/kernel/task_run.go:95 +0x174 fp=0xc420b41fd0 sp=0xc420b41f88 pc=0x7328b4 +runtime.goexit() + bazel-out/k8-fastbuild/bin/external/io_bazel_rules_go/linux_amd64_pure_stripped/stdlib~/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc420b41fd8 sp=0xc420b41fd0 pc=0x455f11 +created by gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).Start + pkg/sentry/kernel/task_start.go:251 +0x100 diff --git a/pkg/report/testdata/gvisor/report/3 b/pkg/report/testdata/gvisor/report/3 new file mode 100644 index 00000000..be87bdd6 --- /dev/null +++ b/pkg/report/testdata/gvisor/report/3 @@ -0,0 +1,92 @@ +TITLE: panic: Decrementing non-positive ref count + +I0617 06:54:32.688334 62388 x:0] [ 1843] Error opening /bin/sh: no such file or directory +I0617 06:54:32.688354 62388 x:0] [ 1843] Failed to load /bin/sh: no such file or directory +panic: Decrementing non-positive ref count + +goroutine 361941 [running]: +panic(0xa8fd00, 0xc84b50) + GOROOT/src/runtime/panic.go:551 +0x3c1 fp=0xc420e30a60 sp=0xc420e309c0 pc=0x428fa1 +gvisor.googlesource.com/gvisor/pkg/refs.(*AtomicRefCount).DecRefWithDestructor(0xc42048e0c0, 0xc420e30ab8) + pkg/refs/refcounter.go:267 +0x162 fp=0xc420e30aa8 sp=0xc420e30a60 pc=0x5df222 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel/shm.(*Shm).DecRef(0xc42048e0c0) + pkg/sentry/kernel/shm/shm.go:373 +0x48 fp=0xc420e30ad8 sp=0xc420e30aa8 pc=0x63dcf8 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel/shm.(*Shm).MarkDestroyed(0xc42048e0c0) + pkg/sentry/kernel/shm/shm.go:592 +0x7c fp=0xc420e30b08 sp=0xc420e30ad8 pc=0x63ec8c +gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Shmctl(0xc420184d00, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x428854, 0xbfb7d0, 0xc420e30c08, ...) + pkg/sentry/syscalls/linux/sys_shm.go:143 +0x323 fp=0xc420e30b78 sp=0xc420e30b08 pc=0x8dc363 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc420184d00, 0x1f, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc420294360, 0xbd3380, ...) + pkg/sentry/kernel/task_syscall.go:162 +0x307 fp=0xc420e30c30 sp=0xc420e30b78 pc=0x73c3f7 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc420184d00, 0x1f, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) + pkg/sentry/kernel/task_syscall.go:278 +0x62 fp=0xc420e30cb8 sp=0xc420e30c30 pc=0x73d092 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc420184d00, 0x1f, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc87be0, 0xc420e30e00) + pkg/sentry/kernel/task_syscall.go:241 +0x91 fp=0xc420e30d18 sp=0xc420e30cb8 pc=0x73ccc1 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc420184d00, 0x2, 0xc4202786c0) + pkg/sentry/kernel/task_syscall.go:216 +0x10c fp=0xc420e30e10 sp=0xc420e30d18 pc=0x73c61c +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc420184d00, 0xc87be0, 0x0) + pkg/sentry/kernel/task_run.go:217 +0xed8 fp=0xc420e30f88 sp=0xc420e30e10 pc=0x733af8 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run(0xc420184d00, 0x734) + pkg/sentry/kernel/task_run.go:95 +0x174 fp=0xc420e30fd0 sp=0xc420e30f88 pc=0x7328b4 +runtime.goexit() + bazel-out/k8-fastbuild/bin/external/io_bazel_rules_go/linux_amd64_pure_stripped/stdlib~/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc420e30fd8 sp=0xc420e30fd0 pc=0x455f11 +created by gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).Start + pkg/sentry/kernel/task_start.go:251 +0x100 + +goroutine 1 [semacquire]: +runtime.gopark(0xbfba68, 0x10ec300, 0xbd8524, 0xa, 0xc4200e0319, 0x4) + GOROOT/src/runtime/proc.go:291 +0x11a fp=0xc420553920 sp=0xc420553900 pc=0x42b10a +runtime.goparkunlock(0x10ec300, 0xbd8524, 0xa, 0x19, 0x4) + GOROOT/src/runtime/proc.go:297 +0x5e fp=0xc420553960 sp=0xc420553920 pc=0x42b1be +runtime.semacquire1(0xc42011e6a0, 0x403300, 0x1) + GOROOT/src/runtime/sema.go:144 +0x1d4 fp=0xc4205539d0 sp=0xc420553960 pc=0x43b3e4 +sync.runtime_Semacquire(0xc42011e6a0) + GOROOT/src/runtime/sema.go:56 +0x39 fp=0xc4205539f8 sp=0xc4205539d0 pc=0x43b009 +sync.(*WaitGroup).Wait(0xc42011e694) + GOROOT/src/sync/waitgroup.go:129 +0x72 fp=0xc420553a20 sp=0xc4205539f8 pc=0x46bd72 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Kernel).WaitExited(0xc42025e7e0) + pkg/sentry/kernel/kernel.go:730 +0x35 fp=0xc420553a38 sp=0xc420553a20 pc=0x70bbb5 +gvisor.googlesource.com/gvisor/runsc/boot.(*Loader).WaitExit(0xc420310000, 0x0, 0x0) + runsc/boot/loader.go:354 +0x2e fp=0xc420553a60 sp=0xc420553a38 pc=0x97e95e +gvisor.googlesource.com/gvisor/runsc/cmd.(*Boot).Execute(0xc420136740, 0xc8f900, 0xc42010c010, 0xc42011e3c0, 0xc42011de40, 0x2, 0x2, 0x0) + runsc/cmd/boot.go:144 +0xa28 fp=0xc420553c00 sp=0xc420553a60 pc=0xa05148 +github.com/google/subcommands.(*Commander).Execute(0xc420120000, 0xc8f900, 0xc42010c010, 0xc42011de40, 0x2, 0x2, 0xc42011de40) + external/com_github_google_subcommands/subcommands.go:141 +0x29f fp=0xc420553ca8 sp=0xc420553c00 pc=0x4e263f +github.com/google/subcommands.Execute(0xc8f900, 0xc42010c010, 0xc42011de40, 0x2, 0x2, 0x5) + external/com_github_google_subcommands/subcommands.go:371 +0x5f fp=0xc420553cf0 sp=0xc420553ca8 pc=0x4e406f +main.main() + runsc/main.go:188 +0xfda fp=0xc420553f88 sp=0xc420553cf0 pc=0xa0ff7a +runtime.main() + GOROOT/src/runtime/proc.go:198 +0x212 fp=0xc420553fe0 sp=0xc420553f88 pc=0x42acb2 +runtime.goexit() + bazel-out/k8-fastbuild/bin/external/io_bazel_rules_go/linux_amd64_pure_stripped/stdlib~/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc420553fe8 sp=0xc420553fe0 pc=0x455f11 + +REPORT: +panic: Decrementing non-positive ref count + +goroutine 361941 [running]: +panic(0xa8fd00, 0xc84b50) + GOROOT/src/runtime/panic.go:551 +0x3c1 fp=0xc420e30a60 sp=0xc420e309c0 pc=0x428fa1 +gvisor.googlesource.com/gvisor/pkg/refs.(*AtomicRefCount).DecRefWithDestructor(0xc42048e0c0, 0xc420e30ab8) + pkg/refs/refcounter.go:267 +0x162 fp=0xc420e30aa8 sp=0xc420e30a60 pc=0x5df222 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel/shm.(*Shm).DecRef(0xc42048e0c0) + pkg/sentry/kernel/shm/shm.go:373 +0x48 fp=0xc420e30ad8 sp=0xc420e30aa8 pc=0x63dcf8 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel/shm.(*Shm).MarkDestroyed(0xc42048e0c0) + pkg/sentry/kernel/shm/shm.go:592 +0x7c fp=0xc420e30b08 sp=0xc420e30ad8 pc=0x63ec8c +gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Shmctl(0xc420184d00, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x428854, 0xbfb7d0, 0xc420e30c08, ...) + pkg/sentry/syscalls/linux/sys_shm.go:143 +0x323 fp=0xc420e30b78 sp=0xc420e30b08 pc=0x8dc363 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc420184d00, 0x1f, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc420294360, 0xbd3380, ...) + pkg/sentry/kernel/task_syscall.go:162 +0x307 fp=0xc420e30c30 sp=0xc420e30b78 pc=0x73c3f7 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc420184d00, 0x1f, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) + pkg/sentry/kernel/task_syscall.go:278 +0x62 fp=0xc420e30cb8 sp=0xc420e30c30 pc=0x73d092 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc420184d00, 0x1f, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc87be0, 0xc420e30e00) + pkg/sentry/kernel/task_syscall.go:241 +0x91 fp=0xc420e30d18 sp=0xc420e30cb8 pc=0x73ccc1 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc420184d00, 0x2, 0xc4202786c0) + pkg/sentry/kernel/task_syscall.go:216 +0x10c fp=0xc420e30e10 sp=0xc420e30d18 pc=0x73c61c +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc420184d00, 0xc87be0, 0x0) + pkg/sentry/kernel/task_run.go:217 +0xed8 fp=0xc420e30f88 sp=0xc420e30e10 pc=0x733af8 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run(0xc420184d00, 0x734) + pkg/sentry/kernel/task_run.go:95 +0x174 fp=0xc420e30fd0 sp=0xc420e30f88 pc=0x7328b4 +runtime.goexit() + bazel-out/k8-fastbuild/bin/external/io_bazel_rules_go/linux_amd64_pure_stripped/stdlib~/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc420e30fd8 sp=0xc420e30fd0 pc=0x455f11 +created by gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).Start + pkg/sentry/kernel/task_start.go:251 +0x100 diff --git a/pkg/report/testdata/gvisor/report/4 b/pkg/report/testdata/gvisor/report/4 new file mode 100644 index 00000000..9154887c --- /dev/null +++ b/pkg/report/testdata/gvisor/report/4 @@ -0,0 +1,97 @@ +TITLE: panic: munmap(ADDR, 0)) failed: invalid argument + +perf_event_open(&(0x7f000025c000)={0x2, 0x70, 0x3e4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, @perf_bp={&(0x7f0000000100)}}, 0x0, 0xffffffffffffffff, 0xffffffffffffffff, 0x0) +bpf$PROG_LOAD(0x5, &(0x7f0000001380)={0x3, 0x2, &(0x7f0000000000)=@raw=[@exit={0x95}], &(0x7f0000000100)='syzkaller\x00', 0x2, 0xb9, &(0x7f00000012c0)=""/185, 0x0, 0x0, [], r1}, 0x48) + +panic: munmap(2000d000, 0)) failed: invalid argument + +goroutine 1158490 [running]: +panic(0xa8fd00, 0xc420496000) + GOROOT/src/runtime/panic.go:551 +0x3c1 fp=0xc4201955d8 sp=0xc420195538 pc=0x428fa1 +gvisor.googlesource.com/gvisor/pkg/sentry/platform/ptrace.(*subprocess).Unmap(0xc420252a20, 0x2000d000, 0x0) + pkg/sentry/platform/ptrace/subprocess.go:556 +0x3c6 fp=0xc420195758 sp=0xc4201955d8 pc=0x8b7f96 +gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).unmapASLocked(0xc420e78c80, 0x2000d000, 0x2000d000) + pkg/sentry/mm/address_space.go:217 +0x74 fp=0xc420195780 sp=0xc420195758 pc=0x6890a4 +gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).movePMAsLocked(0xc420e78c80, 0x2000d000, 0x2000d000, 0x20007000, 0x20008000) + pkg/sentry/mm/pma.go:628 +0x4d8 fp=0xc4201958f8 sp=0xc420195780 pc=0x69f478 +gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).MRemap(0xc420e78c80, 0xc94840, 0xc4205dbb00, 0x2000d000, 0xfffffffffffffe74, 0x1000, 0x2, 0x20007000, 0x0, 0x0, ...) + pkg/sentry/mm/syscalls.go:464 +0x8e8 fp=0xc420195b10 sp=0xc4201958f8 pc=0x6ad108 +gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Mremap(0xc4205dbb00, 0x2000d000, 0xfffffffffffffe74, 0x1000, 0x3, 0x20007000, 0x0, 0x428854, 0xbfb7d0, 0xc420195c08, ...) + pkg/sentry/syscalls/linux/sys_mmap.go:137 +0xc6 fp=0xc420195b78 sp=0xc420195b10 pc=0x8d15d6 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc4205dbb00, 0x19, 0x2000d000, 0xfffffffffffffe74, 0x1000, 0x3, 0x20007000, 0x0, 0xc4202703c0, 0xbd3380, ...) + pkg/sentry/kernel/task_syscall.go:162 +0x307 fp=0xc420195c30 sp=0xc420195b78 pc=0x73c3f7 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc4205dbb00, 0x19, 0x2000d000, 0xfffffffffffffe74, 0x1000, 0x3, 0x20007000, 0x0, 0x20007000, 0x0) + pkg/sentry/kernel/task_syscall.go:278 +0x62 fp=0xc420195cb8 sp=0xc420195c30 pc=0x73d092 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc4205dbb00, 0x19, 0x2000d000, 0xfffffffffffffe74, 0x1000, 0x3, 0x20007000, 0x0, 0xc87be0, 0xc420195e00) + pkg/sentry/kernel/task_syscall.go:241 +0x91 fp=0xc420195d18 sp=0xc420195cb8 pc=0x73ccc1 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc4205dbb00, 0x2, 0xc420252a20) + pkg/sentry/kernel/task_syscall.go:216 +0x10c fp=0xc420195e10 sp=0xc420195d18 pc=0x73c61c +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc4205dbb00, 0xc87be0, 0x0) + pkg/sentry/kernel/task_run.go:217 +0xed8 fp=0xc420195f88 sp=0xc420195e10 pc=0x733af8 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run(0xc4205dbb00, 0x1cd5) + pkg/sentry/kernel/task_run.go:95 +0x174 fp=0xc420195fd0 sp=0xc420195f88 pc=0x7328b4 +runtime.goexit() + bazel-out/k8-fastbuild/bin/external/io_bazel_rules_go/linux_amd64_pure_stripped/stdlib~/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc420195fd8 sp=0xc420195fd0 pc=0x455f11 +created by gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).Start + pkg/sentry/kernel/task_start.go:251 +0x100 + +goroutine 1 [semacquire, 2 minutes]: +runtime.gopark(0xbfba68, 0x10ebf80, 0xbd8524, 0xa, 0xc42026e219, 0x4) + GOROOT/src/runtime/proc.go:291 +0x11a fp=0xc4203eb920 sp=0xc4203eb900 pc=0x42b10a +runtime.goparkunlock(0x10ebf80, 0xbd8524, 0xa, 0x19, 0x4) + GOROOT/src/runtime/proc.go:297 +0x5e fp=0xc4203eb960 sp=0xc4203eb920 pc=0x42b1be +runtime.semacquire1(0xc4200e8760, 0x403300, 0x1) + GOROOT/src/runtime/sema.go:144 +0x1d4 fp=0xc4203eb9d0 sp=0xc4203eb960 pc=0x43b3e4 +sync.runtime_Semacquire(0xc4200e8760) + GOROOT/src/runtime/sema.go:56 +0x39 fp=0xc4203eb9f8 sp=0xc4203eb9d0 pc=0x43b009 +sync.(*WaitGroup).Wait(0xc4200e8754) + GOROOT/src/sync/waitgroup.go:129 +0x72 fp=0xc4203eba20 sp=0xc4203eb9f8 pc=0x46bd72 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Kernel).WaitExited(0xc420222360) + pkg/sentry/kernel/kernel.go:730 +0x35 fp=0xc4203eba38 sp=0xc4203eba20 pc=0x70bbb5 +gvisor.googlesource.com/gvisor/runsc/boot.(*Loader).WaitExit(0xc4202f0000, 0x0, 0x0) + runsc/boot/loader.go:354 +0x2e fp=0xc4203eba60 sp=0xc4203eba38 pc=0x97e95e +gvisor.googlesource.com/gvisor/runsc/cmd.(*Boot).Execute(0xc4200de780, 0xc8f900, 0xc4200380c8, 0xc4200e8480, 0xc42000be80, 0x2, 0x2, 0x0) + runsc/cmd/boot.go:144 +0xa28 fp=0xc4203ebc00 sp=0xc4203eba60 pc=0xa05148 +github.com/google/subcommands.(*Commander).Execute(0xc4200fa000, 0xc8f900, 0xc4200380c8, 0xc42000be80, 0x2, 0x2, 0xc42000be80) + external/com_github_google_subcommands/subcommands.go:141 +0x29f fp=0xc4203ebca8 sp=0xc4203ebc00 pc=0x4e263f +github.com/google/subcommands.Execute(0xc8f900, 0xc4200380c8, 0xc42000be80, 0x2, 0x2, 0x5) + external/com_github_google_subcommands/subcommands.go:371 +0x5f fp=0xc4203ebcf0 sp=0xc4203ebca8 pc=0x4e406f +main.main() + runsc/main.go:188 +0xfda fp=0xc4203ebf88 sp=0xc4203ebcf0 pc=0xa0ff7a +runtime.main() + GOROOT/src/runtime/proc.go:198 +0x212 fp=0xc4203ebfe0 sp=0xc4203ebf88 pc=0x42acb2 +runtime.goexit() + bazel-out/k8-fastbuild/bin/external/io_bazel_rules_go/linux_amd64_pure_stripped/stdlib~/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc4203ebfe8 sp=0xc4203ebfe0 pc=0x455f11 + +REPORT: +panic: munmap(2000d000, 0)) failed: invalid argument + +goroutine 1158490 [running]: +panic(0xa8fd00, 0xc420496000) + GOROOT/src/runtime/panic.go:551 +0x3c1 fp=0xc4201955d8 sp=0xc420195538 pc=0x428fa1 +gvisor.googlesource.com/gvisor/pkg/sentry/platform/ptrace.(*subprocess).Unmap(0xc420252a20, 0x2000d000, 0x0) + pkg/sentry/platform/ptrace/subprocess.go:556 +0x3c6 fp=0xc420195758 sp=0xc4201955d8 pc=0x8b7f96 +gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).unmapASLocked(0xc420e78c80, 0x2000d000, 0x2000d000) + pkg/sentry/mm/address_space.go:217 +0x74 fp=0xc420195780 sp=0xc420195758 pc=0x6890a4 +gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).movePMAsLocked(0xc420e78c80, 0x2000d000, 0x2000d000, 0x20007000, 0x20008000) + pkg/sentry/mm/pma.go:628 +0x4d8 fp=0xc4201958f8 sp=0xc420195780 pc=0x69f478 +gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).MRemap(0xc420e78c80, 0xc94840, 0xc4205dbb00, 0x2000d000, 0xfffffffffffffe74, 0x1000, 0x2, 0x20007000, 0x0, 0x0, ...) + pkg/sentry/mm/syscalls.go:464 +0x8e8 fp=0xc420195b10 sp=0xc4201958f8 pc=0x6ad108 +gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Mremap(0xc4205dbb00, 0x2000d000, 0xfffffffffffffe74, 0x1000, 0x3, 0x20007000, 0x0, 0x428854, 0xbfb7d0, 0xc420195c08, ...) + pkg/sentry/syscalls/linux/sys_mmap.go:137 +0xc6 fp=0xc420195b78 sp=0xc420195b10 pc=0x8d15d6 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc4205dbb00, 0x19, 0x2000d000, 0xfffffffffffffe74, 0x1000, 0x3, 0x20007000, 0x0, 0xc4202703c0, 0xbd3380, ...) + pkg/sentry/kernel/task_syscall.go:162 +0x307 fp=0xc420195c30 sp=0xc420195b78 pc=0x73c3f7 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc4205dbb00, 0x19, 0x2000d000, 0xfffffffffffffe74, 0x1000, 0x3, 0x20007000, 0x0, 0x20007000, 0x0) + pkg/sentry/kernel/task_syscall.go:278 +0x62 fp=0xc420195cb8 sp=0xc420195c30 pc=0x73d092 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc4205dbb00, 0x19, 0x2000d000, 0xfffffffffffffe74, 0x1000, 0x3, 0x20007000, 0x0, 0xc87be0, 0xc420195e00) + pkg/sentry/kernel/task_syscall.go:241 +0x91 fp=0xc420195d18 sp=0xc420195cb8 pc=0x73ccc1 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc4205dbb00, 0x2, 0xc420252a20) + pkg/sentry/kernel/task_syscall.go:216 +0x10c fp=0xc420195e10 sp=0xc420195d18 pc=0x73c61c +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc4205dbb00, 0xc87be0, 0x0) + pkg/sentry/kernel/task_run.go:217 +0xed8 fp=0xc420195f88 sp=0xc420195e10 pc=0x733af8 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run(0xc4205dbb00, 0x1cd5) + pkg/sentry/kernel/task_run.go:95 +0x174 fp=0xc420195fd0 sp=0xc420195f88 pc=0x7328b4 +runtime.goexit() + bazel-out/k8-fastbuild/bin/external/io_bazel_rules_go/linux_amd64_pure_stripped/stdlib~/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc420195fd8 sp=0xc420195fd0 pc=0x455f11 +created by gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).Start + pkg/sentry/kernel/task_start.go:251 +0x100 diff --git a/pkg/report/testdata/gvisor/report/5 b/pkg/report/testdata/gvisor/report/5 new file mode 100644 index 00000000..09ca9eb8 --- /dev/null +++ b/pkg/report/testdata/gvisor/report/5 @@ -0,0 +1,53 @@ +TITLE: panic: invalid segment range [ADDR, ADDR) + +panic: invalid segment range [0x401000, 0x401000) + +goroutine 273 [running]: +panic(0xa8fd00, 0xc423d64040) + GOROOT/src/runtime/panic.go:551 +0x3c1 fp=0xc4220c7208 sp=0xc4220c7168 pc=0x428fa1 +gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*pmaSet).Insert(0xc420c44668, 0xc420c44668, 0x1, 0x401000, 0x401000, 0x3fb8b34510f0, 0xc420268000, 0x83a1000, 0x1010101010001, 0x0, ...) + bazel-out/k8-fastbuild/bin/pkg/sentry/mm/pma_set.go:257 +0x11fb fp=0xc4220c79b0 sp=0xc4220c7208 pc=0x6a2c5b +gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).insertPMAsLocked(0xc420c44000, 0xc94840, 0xc4206f9200, 0xc420c44070, 0x0, 0xc420c44668, 0x1, 0x46f000, 0x470000, 0xbd3301, ...) + pkg/sentry/mm/pma.go:372 +0x4fd fp=0xc4220c7bb0 sp=0xc4220c79b0 pc=0x69da4d +gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).ensurePMAsLocked(0xc420c44000, 0xc94840, 0xc4206f9200, 0xc420c44070, 0x0, 0x46f000, 0x470000, 0x8ad6db, 0xb546c0, 0xc421278000, ...) + pkg/sentry/mm/pma.go:258 +0x24b fp=0xc4220c7c68 sp=0xc4220c7bb0 pc=0x69d42b +gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).getPMAsLocked(0xc420c44000, 0xc94840, 0xc4206f9200, 0xc420c44070, 0x0, 0x46f000, 0x470000, 0x0, 0xc420c44070, 0x1, ...) + pkg/sentry/mm/pma.go:128 +0xd1 fp=0xc4220c7d48 sp=0xc4220c7c68 pc=0x69c6d1 +gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).HandleUserFault(0xc420c44000, 0xc94840, 0xc4206f9200, 0x46f970, 0xc420010001, 0x7f4ade70ae18, 0xc421278000, 0x10001) + pkg/sentry/mm/syscalls.go:55 +0x194 fp=0xc4220c7e10 sp=0xc4220c7d48 pc=0x6ab634 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc4206f9200, 0xc87be0, 0x0) + pkg/sentry/kernel/task_run.go:235 +0x845 fp=0xc4220c7f88 sp=0xc4220c7e10 pc=0x733465 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run(0xc4206f9200, 0x1c) + pkg/sentry/kernel/task_run.go:95 +0x174 fp=0xc4220c7fd0 sp=0xc4220c7f88 pc=0x7328b4 +runtime.goexit() + bazel-out/k8-fastbuild/bin/external/io_bazel_rules_go/linux_amd64_pure_stripped/stdlib~/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc4220c7fd8 sp=0xc4220c7fd0 pc=0x455f11 +created by gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).Start + pkg/sentry/kernel/task_start.go:251 +0x100 + +goroutine 1 [semacquire, 3 minutes]: +runtime.gopark(0xbfba68, 0x10ec000, 0xbd8524, 0xa, 0xc42045e419, 0x4) + GOROOT/src/runtime/proc.go:291 +0x11a fp=0xc42045b920 sp=0xc42045b900 pc=0x42b10a +runtime.goparkunlock(0x10ec000, 0xbd8524, 0xa, 0x19, 0x4) + GOROOT/src/runtime/proc.go:297 +0x5e fp=0xc42045b960 sp=0xc42045b920 pc=0x42b1be +runtime.semacquire1(0xc42011e640, 0x403300, 0x1) + GOROOT/src/runtime/sema.go:144 +0x1d4 fp=0xc42045b9d0 sp=0xc42045b960 pc=0x43b3e4 +sync.runtime_Semacquire(0xc42011e640) + GOROOT/src/runtime/sema.go:56 +0x39 fp=0xc42045b9f8 sp=0xc42045b9d0 pc=0x43b009 +sync.(*WaitGroup).Wait(0xc42011e634) + GOROOT/src/sync/waitgroup.go:129 +0x72 fp=0xc42045ba20 sp=0xc42045b9f8 pc=0x46bd72 +gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Kernel).WaitExited(0xc4202617a0) + pkg/sentry/kernel/kernel.go:730 +0x35 fp=0xc42045ba38 sp=0xc42045ba20 pc=0x70bbb5 +gvisor.googlesource.com/gvisor/runsc/boot.(*Loader).WaitExit(0xc420494000, 0x0, 0x0) + runsc/boot/loader.go:354 +0x2e fp=0xc42045ba60 sp=0xc42045ba38 pc=0x97e95e +gvisor.googlesource.com/gvisor/runsc/cmd.(*Boot).Execute(0xc420136740, 0xc8f900, 0xc42010c010, 0xc42011e360, 0xc42011de80, 0x2, 0x2, 0x0) + runsc/cmd/boot.go:144 +0xa28 fp=0xc42045bc00 sp=0xc42045ba60 pc=0xa05148 +github.com/google/subcommands.(*Commander).Execute(0xc420120000, 0xc8f900, 0xc42010c010, 0xc42011de80, 0x2, 0x2, 0xc42011de80) + external/com_github_google_subcommands/subcommands.go:141 +0x29f fp=0xc42045bca8 sp=0xc42045bc00 pc=0x4e263f +github.com/google/subcommands.Execute(0xc8f900, 0xc42010c010, 0xc42011de80, 0x2, 0x2, 0x5) + external/com_github_google_subcommands/subcommands.go:371 +0x5f fp=0xc42045bcf0 sp=0xc42045bca8 pc=0x4e406f +main.main() + runsc/main.go:188 +0xfda fp=0xc42045bf88 sp=0xc42045bcf0 pc=0xa0ff7a +runtime.main() + GOROOT/src/runtime/proc.go:198 +0x212 fp=0xc42045bfe0 sp=0xc42045bf88 pc=0x42acb2 +runtime.goexit() + bazel-out/k8-fastbuild/bin/external/io_bazel_rules_go/linux_amd64_pure_stripped/stdlib~/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc42045bfe8 sp=0xc42045bfe0 pc=0x455f11 diff --git a/pkg/report/testdata/gvisor/report/6 b/pkg/report/testdata/gvisor/report/6 new file mode 100644 index 00000000..2088eafe --- /dev/null +++ b/pkg/report/testdata/gvisor/report/6 @@ -0,0 +1,165 @@ +TITLE: DATA RACE in waiter.(*Entry).Next + +getsockopt$sock_cred(0xffffffffffffffff, 0x1, 0x11, &(0x7f0000caaffb), &(0x7f0000cab000)=0xc) +setsockopt$inet_tcp_buf(r0, 0x6, 0x0, &(0x7f0000000240)="df", 0x1) + +================== +WARNING: DATA RACE +Read at 0x00c420e3a1b8 by goroutine 185: + gvisor.googlesource.com/gvisor/pkg/waiter.(*Entry).Next() + bazel-out/k8-fastbuild/bin/pkg/ilist/interface_list.go:150 +0x4c + gvisor.googlesource.com/gvisor/pkg/ilist.(*List).Remove() + bazel-out/k8-fastbuild/bin/pkg/ilist/interface_list.go:125 +0x6a + gvisor.googlesource.com/gvisor/pkg/waiter.(*Queue).EventUnregister() + pkg/waiter/waiter.go:167 +0x67 + gvisor.googlesource.com/gvisor/pkg/sentry/fs/tty.(*slaveFileOperations).EventUnregister() + pkg/sentry/fs/tty/slave.go:114 +0x96 + gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*File).EventUnregister() + pkg/sentry/fs/file.go:155 +0x5d + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.readv() + pkg/sentry/syscalls/linux/sys_read.go:223 +0x5e1 + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Readv() + pkg/sentry/syscalls/linux/sys_read.go:144 +0x28c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall() + pkg/sentry/kernel/task_syscall.go:162 +0x14e + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke() + pkg/sentry/kernel/task_syscall.go:278 +0x7d + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter() + pkg/sentry/kernel/task_syscall.go:241 +0xc3 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall() + pkg/sentry/kernel/task_syscall.go:216 +0x19c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute() + pkg/sentry/kernel/task_run.go:217 +0x157c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run() + pkg/sentry/kernel/task_run.go:95 +0x264 + +Previous write at 0x00c420e3a1b8 by goroutine 221: + gvisor.googlesource.com/gvisor/pkg/waiter.(*Entry).SetNext() + bazel-out/k8-fastbuild/bin/pkg/ilist/interface_list.go:160 +0x50 + gvisor.googlesource.com/gvisor/pkg/ilist.(*List).PushBack() + bazel-out/k8-fastbuild/bin/pkg/ilist/interface_list.go:70 +0xee + gvisor.googlesource.com/gvisor/pkg/waiter.(*Queue).EventRegister() + pkg/waiter/waiter.go:160 +0x86 + gvisor.googlesource.com/gvisor/pkg/sentry/fs/tty.(*slaveFileOperations).EventRegister() + pkg/sentry/fs/tty/slave.go:109 +0x10f + gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*File).EventRegister() + pkg/sentry/fs/file.go:150 +0x67 + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.readv() + pkg/sentry/syscalls/linux/sys_read.go:202 +0x3cb + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Readv() + pkg/sentry/syscalls/linux/sys_read.go:144 +0x28c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall() + pkg/sentry/kernel/task_syscall.go:162 +0x14e + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke() + pkg/sentry/kernel/task_syscall.go:278 +0x7d + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter() + pkg/sentry/kernel/task_syscall.go:241 +0xc3 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall() + pkg/sentry/kernel/task_syscall.go:216 +0x19c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute() + pkg/sentry/kernel/task_run.go:217 +0x157c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run() + pkg/sentry/kernel/task_run.go:95 +0x264 + +Goroutine 185 (running) created at: + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).Start() + pkg/sentry/kernel/task_start.go:251 +0x193 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).Clone() + pkg/sentry/kernel/task_clone.go:314 +0x10e6 + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.clone() + pkg/sentry/syscalls/linux/sys_thread.go:157 +0x22e + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Clone() + pkg/sentry/syscalls/linux/sys_thread.go:171 +0x80 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall() + pkg/sentry/kernel/task_syscall.go:162 +0x14e + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke() + pkg/sentry/kernel/task_syscall.go:278 +0x7d + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter() + pkg/sentry/kernel/task_syscall.go:241 +0xc3 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall() + pkg/sentry/kernel/task_syscall.go:216 +0x19c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute() + pkg/sentry/kernel/task_run.go:217 +0x157c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run() + pkg/sentry/kernel/task_run.go:95 +0x264 + +Goroutine 221 (running) created at: + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).Start() + pkg/sentry/kernel/task_start.go:251 +0x193 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).Clone() + pkg/sentry/kernel/task_clone.go:314 +0x10e6 + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.clone() + pkg/sentry/syscalls/linux/sys_thread.go:157 +0x22e + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Clone() + pkg/sentry/syscalls/linux/sys_thread.go:171 +0x80 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall() + pkg/sentry/kernel/task_syscall.go:162 +0x14e + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke() + pkg/sentry/kernel/task_syscall.go:278 +0x7d + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter() + pkg/sentry/kernel/task_syscall.go:241 +0xc3 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall() + pkg/sentry/kernel/task_syscall.go:216 +0x19c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute() + pkg/sentry/kernel/task_run.go:217 +0x157c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run() + pkg/sentry/kernel/task_run.go:95 +0x264 +================== + +REPORT: +WARNING: DATA RACE +Read at 0x00c420e3a1b8 by goroutine 185: + gvisor.googlesource.com/gvisor/pkg/waiter.(*Entry).Next() + bazel-out/k8-fastbuild/bin/pkg/ilist/interface_list.go:150 +0x4c + gvisor.googlesource.com/gvisor/pkg/ilist.(*List).Remove() + bazel-out/k8-fastbuild/bin/pkg/ilist/interface_list.go:125 +0x6a + gvisor.googlesource.com/gvisor/pkg/waiter.(*Queue).EventUnregister() + pkg/waiter/waiter.go:167 +0x67 + gvisor.googlesource.com/gvisor/pkg/sentry/fs/tty.(*slaveFileOperations).EventUnregister() + pkg/sentry/fs/tty/slave.go:114 +0x96 + gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*File).EventUnregister() + pkg/sentry/fs/file.go:155 +0x5d + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.readv() + pkg/sentry/syscalls/linux/sys_read.go:223 +0x5e1 + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Readv() + pkg/sentry/syscalls/linux/sys_read.go:144 +0x28c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall() + pkg/sentry/kernel/task_syscall.go:162 +0x14e + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke() + pkg/sentry/kernel/task_syscall.go:278 +0x7d + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter() + pkg/sentry/kernel/task_syscall.go:241 +0xc3 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall() + pkg/sentry/kernel/task_syscall.go:216 +0x19c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute() + pkg/sentry/kernel/task_run.go:217 +0x157c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run() + pkg/sentry/kernel/task_run.go:95 +0x264 + +Previous write at 0x00c420e3a1b8 by goroutine 221: + gvisor.googlesource.com/gvisor/pkg/waiter.(*Entry).SetNext() + bazel-out/k8-fastbuild/bin/pkg/ilist/interface_list.go:160 +0x50 + gvisor.googlesource.com/gvisor/pkg/ilist.(*List).PushBack() + bazel-out/k8-fastbuild/bin/pkg/ilist/interface_list.go:70 +0xee + gvisor.googlesource.com/gvisor/pkg/waiter.(*Queue).EventRegister() + pkg/waiter/waiter.go:160 +0x86 + gvisor.googlesource.com/gvisor/pkg/sentry/fs/tty.(*slaveFileOperations).EventRegister() + pkg/sentry/fs/tty/slave.go:109 +0x10f + gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*File).EventRegister() + pkg/sentry/fs/file.go:150 +0x67 + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.readv() + pkg/sentry/syscalls/linux/sys_read.go:202 +0x3cb + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Readv() + pkg/sentry/syscalls/linux/sys_read.go:144 +0x28c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall() + pkg/sentry/kernel/task_syscall.go:162 +0x14e + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke() + pkg/sentry/kernel/task_syscall.go:278 +0x7d + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter() + pkg/sentry/kernel/task_syscall.go:241 +0xc3 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall() + pkg/sentry/kernel/task_syscall.go:216 +0x19c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute() + pkg/sentry/kernel/task_run.go:217 +0x157c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run() + pkg/sentry/kernel/task_run.go:95 +0x264 diff --git a/pkg/report/testdata/gvisor/report/7 b/pkg/report/testdata/gvisor/report/7 new file mode 100644 index 00000000..a77edb7f --- /dev/null +++ b/pkg/report/testdata/gvisor/report/7 @@ -0,0 +1,169 @@ +TITLE: DATA RACE in mm.(*MemoryManager).internalMappingsLocked + +r0 = openat$null(0xffffffffffffff9c, &(0x7f0000000000)='/dev/null\x00', 0x0, 0x0) +ioctl$sock_inet_tcp_SIOCOUTQ(r0, 0x5411, &(0x7f00000000c0)) + +================== +WARNING: DATA RACE +Read at 0x00c4211413e0 by goroutine 224: + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).internalMappingsLocked() + bazel-out/k8-fastbuild/bin/pkg/sentry/mm/pma_set.go:881 +0x76 + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).withInternalMappings() + pkg/sentry/mm/io.go:464 +0x85a + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).CopyIn() + pkg/sentry/mm/io.go:162 +0x20f + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).CopyInBytes() + pkg/sentry/kernel/task_usermem.go:62 +0xaa + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.copyTimespecIn() + pkg/sentry/syscalls/linux/timespec.go:33 +0xcc + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Futex() + pkg/sentry/syscalls/linux/sys_futex.go:255 +0x336 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall() + pkg/sentry/kernel/task_syscall.go:162 +0x14e + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke() + pkg/sentry/kernel/task_syscall.go:278 +0x7d + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter() + pkg/sentry/kernel/task_syscall.go:241 +0xc3 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall() + pkg/sentry/kernel/task_syscall.go:216 +0x19c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute() + pkg/sentry/kernel/task_run.go:217 +0x157c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run() + pkg/sentry/kernel/task_run.go:95 +0x264 + +Previous write at 0x00c4211413e0 by goroutine 45: + runtime.slicecopy() + GOROOT/src/runtime/slice.go:192 +0x0 + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*pmaSet).Remove() + bazel-out/k8-fastbuild/bin/pkg/sentry/mm/pma_set.go:335 +0x13d + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).invalidateLocked() + pkg/sentry/mm/pma.go:574 +0x42c + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).Invalidate() + pkg/sentry/mm/pma.go:540 +0x238 + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).unmapLocked() + pkg/sentry/mm/vma.go:309 +0x55 + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).createVMALocked() + pkg/sentry/mm/vma.go:61 +0x208 + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).MMap() + pkg/sentry/mm/syscalls.go:130 +0x1d6 + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Mmap() + pkg/sentry/syscalls/linux/sys_mmap.go:101 +0x32e + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall() + pkg/sentry/kernel/task_syscall.go:162 +0x14e + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke() + pkg/sentry/kernel/task_syscall.go:278 +0x7d + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter() + pkg/sentry/kernel/task_syscall.go:241 +0xc3 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall() + pkg/sentry/kernel/task_syscall.go:216 +0x19c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute() + pkg/sentry/kernel/task_run.go:217 +0x157c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run() + pkg/sentry/kernel/task_run.go:95 +0x264 + +Goroutine 224 (running) created at: + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).Start() + pkg/sentry/kernel/task_start.go:251 +0x193 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).Clone() + pkg/sentry/kernel/task_clone.go:314 +0x10e6 + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.clone() + pkg/sentry/syscalls/linux/sys_thread.go:157 +0x22e + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Clone() + pkg/sentry/syscalls/linux/sys_thread.go:171 +0x80 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall() + pkg/sentry/kernel/task_syscall.go:162 +0x14e + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke() + pkg/sentry/kernel/task_syscall.go:278 +0x7d + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter() + pkg/sentry/kernel/task_syscall.go:241 +0xc3 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall() + pkg/sentry/kernel/task_syscall.go:216 +0x19c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute() + pkg/sentry/kernel/task_run.go:217 +0x157c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run() + pkg/sentry/kernel/task_run.go:95 +0x264 + +Goroutine 45 (running) created at: + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).Start() + pkg/sentry/kernel/task_start.go:251 +0x193 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).Clone() + pkg/sentry/kernel/task_clone.go:314 +0x10e6 + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.clone() + pkg/sentry/syscalls/linux/sys_thread.go:157 +0x22e + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Clone() + pkg/sentry/syscalls/linux/sys_thread.go:171 +0x80 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall() + pkg/sentry/kernel/task_syscall.go:162 +0x14e + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke() + pkg/sentry/kernel/task_syscall.go:278 +0x7d + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter() + pkg/sentry/kernel/task_syscall.go:241 +0xc3 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall() + pkg/sentry/kernel/task_syscall.go:216 +0x19c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute() + pkg/sentry/kernel/task_run.go:217 +0x157c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run() + pkg/sentry/kernel/task_run.go:95 +0x264 +================== +W0618 15:50:34.276259 112427 x:0] FATAL ERROR: error running container: err waiting on container "syz-1": EOF +error running container: err waiting on container "syz-1": EOF +W0618 15:50:34.276259 112492 x:0] FATAL ERROR: error getting processes for container: error executing in sandbox: EOF +error getting processes for container: error executing in sandbox: EOF + +REPORT: +WARNING: DATA RACE +Read at 0x00c4211413e0 by goroutine 224: + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).internalMappingsLocked() + bazel-out/k8-fastbuild/bin/pkg/sentry/mm/pma_set.go:881 +0x76 + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).withInternalMappings() + pkg/sentry/mm/io.go:464 +0x85a + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).CopyIn() + pkg/sentry/mm/io.go:162 +0x20f + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).CopyInBytes() + pkg/sentry/kernel/task_usermem.go:62 +0xaa + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.copyTimespecIn() + pkg/sentry/syscalls/linux/timespec.go:33 +0xcc + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Futex() + pkg/sentry/syscalls/linux/sys_futex.go:255 +0x336 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall() + pkg/sentry/kernel/task_syscall.go:162 +0x14e + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke() + pkg/sentry/kernel/task_syscall.go:278 +0x7d + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter() + pkg/sentry/kernel/task_syscall.go:241 +0xc3 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall() + pkg/sentry/kernel/task_syscall.go:216 +0x19c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute() + pkg/sentry/kernel/task_run.go:217 +0x157c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run() + pkg/sentry/kernel/task_run.go:95 +0x264 + +Previous write at 0x00c4211413e0 by goroutine 45: + runtime.slicecopy() + GOROOT/src/runtime/slice.go:192 +0x0 + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*pmaSet).Remove() + bazel-out/k8-fastbuild/bin/pkg/sentry/mm/pma_set.go:335 +0x13d + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).invalidateLocked() + pkg/sentry/mm/pma.go:574 +0x42c + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).Invalidate() + pkg/sentry/mm/pma.go:540 +0x238 + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).unmapLocked() + pkg/sentry/mm/vma.go:309 +0x55 + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).createVMALocked() + pkg/sentry/mm/vma.go:61 +0x208 + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).MMap() + pkg/sentry/mm/syscalls.go:130 +0x1d6 + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Mmap() + pkg/sentry/syscalls/linux/sys_mmap.go:101 +0x32e + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall() + pkg/sentry/kernel/task_syscall.go:162 +0x14e + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke() + pkg/sentry/kernel/task_syscall.go:278 +0x7d + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter() + pkg/sentry/kernel/task_syscall.go:241 +0xc3 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall() + pkg/sentry/kernel/task_syscall.go:216 +0x19c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute() + pkg/sentry/kernel/task_run.go:217 +0x157c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run() + pkg/sentry/kernel/task_run.go:95 +0x264 diff --git a/pkg/report/testdata/gvisor/report/8 b/pkg/report/testdata/gvisor/report/8 new file mode 100644 index 00000000..14e15b20 --- /dev/null +++ b/pkg/report/testdata/gvisor/report/8 @@ -0,0 +1,170 @@ +TITLE: DATA RACE in mm.(*pmaSet).Find + +================== +WARNING: DATA RACE +Read at 0x00c4203c26f8 by goroutine 34: + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*pmaSet).Find() + bazel-out/k8-fastbuild/bin/pkg/sentry/mm/pma_set.go:131 +0xa4 + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*pmaSet).FindSegment() + bazel-out/k8-fastbuild/bin/pkg/sentry/mm/pma_set.go:151 +0x42 + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).existingPMAsLocked() + pkg/sentry/mm/pma.go:48 +0x4e + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).withInternalMappings() + pkg/sentry/mm/io.go:463 +0xcd + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).CopyOut() + pkg/sentry/mm/io.go:119 +0x20f + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).CopyOutBytes() + pkg/sentry/kernel/task_usermem.go:83 +0xaa + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.copyTimespecOut() + pkg/sentry/syscalls/linux/timespec.go:52 +0x3b1 + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.copyOutTimespecRemaining() + pkg/sentry/syscalls/linux/sys_poll.go:260 +0xc8 + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Pselect() + pkg/sentry/syscalls/linux/sys_poll.go:423 +0x187 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall() + pkg/sentry/kernel/task_syscall.go:162 +0x14e + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke() + pkg/sentry/kernel/task_syscall.go:278 +0x7d + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter() + pkg/sentry/kernel/task_syscall.go:241 +0xc3 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall() + pkg/sentry/kernel/task_syscall.go:216 +0x19c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute() + pkg/sentry/kernel/task_run.go:217 +0x157c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run() + pkg/sentry/kernel/task_run.go:95 +0x264 + +Previous write at 0x00c4203c26f8 by goroutine 27: + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*pmaSet).InsertWithoutMergingUnchecked() + bazel-out/k8-fastbuild/bin/pkg/sentry/mm/pma_set.go:316 +0x229 + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*pmaSet).Insert() + bazel-out/k8-fastbuild/bin/pkg/sentry/mm/pma_set.go:288 +0x225 + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).insertPMAsLocked() + pkg/sentry/mm/pma.go:339 +0xf5b + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).ensurePMAsLocked() + pkg/sentry/mm/pma.go:258 +0x25e + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).getPMAsLocked() + pkg/sentry/mm/pma.go:128 +0xe1 + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).populateAndUnlock() + pkg/sentry/mm/syscalls.go:180 +0x187 + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).MMap() + pkg/sentry/mm/syscalls.go:148 +0x2c3 + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Mmap() + pkg/sentry/syscalls/linux/sys_mmap.go:101 +0x32e + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall() + pkg/sentry/kernel/task_syscall.go:162 +0x14e + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke() + pkg/sentry/kernel/task_syscall.go:278 +0x7d + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter() + pkg/sentry/kernel/task_syscall.go:241 +0xc3 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall() + pkg/sentry/kernel/task_syscall.go:216 +0x19c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute() + pkg/sentry/kernel/task_run.go:217 +0x157c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run() + pkg/sentry/kernel/task_run.go:95 +0x264 + +Goroutine 34 (running) created at: + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).Start() + pkg/sentry/kernel/task_start.go:251 +0x193 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).Clone() + pkg/sentry/kernel/task_clone.go:314 +0x10e6 + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.clone() + pkg/sentry/syscalls/linux/sys_thread.go:157 +0x22e + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Clone() + pkg/sentry/syscalls/linux/sys_thread.go:171 +0x80 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall() + pkg/sentry/kernel/task_syscall.go:162 +0x14e + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke() + pkg/sentry/kernel/task_syscall.go:278 +0x7d + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter() + pkg/sentry/kernel/task_syscall.go:241 +0xc3 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall() + pkg/sentry/kernel/task_syscall.go:216 +0x19c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute() + pkg/sentry/kernel/task_run.go:217 +0x157c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run() + pkg/sentry/kernel/task_run.go:95 +0x264 + +Goroutine 27 (running) created at: + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).Start() + pkg/sentry/kernel/task_start.go:251 +0x193 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Kernel).Start() + pkg/sentry/kernel/kernel.go:664 +0x320 + gvisor.googlesource.com/gvisor/runsc/boot.(*Loader).run() + runsc/boot/loader.go:343 +0x2f2 + gvisor.googlesource.com/gvisor/runsc/boot.(*Loader).Run() + runsc/boot/loader.go:298 +0x3c + gvisor.googlesource.com/gvisor/runsc/cmd.(*Boot).Execute() + runsc/cmd/boot.go:140 +0xf02 + github.com/google/subcommands.(*Commander).Execute() + external/com_github_google_subcommands/subcommands.go:141 +0x486 + github.com/google/subcommands.Execute() + external/com_github_google_subcommands/subcommands.go:371 +0x80 + main.main() + runsc/main.go:188 +0x16d0 +================== + +REPORT: +WARNING: DATA RACE +Read at 0x00c4203c26f8 by goroutine 34: + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*pmaSet).Find() + bazel-out/k8-fastbuild/bin/pkg/sentry/mm/pma_set.go:131 +0xa4 + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*pmaSet).FindSegment() + bazel-out/k8-fastbuild/bin/pkg/sentry/mm/pma_set.go:151 +0x42 + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).existingPMAsLocked() + pkg/sentry/mm/pma.go:48 +0x4e + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).withInternalMappings() + pkg/sentry/mm/io.go:463 +0xcd + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).CopyOut() + pkg/sentry/mm/io.go:119 +0x20f + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).CopyOutBytes() + pkg/sentry/kernel/task_usermem.go:83 +0xaa + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.copyTimespecOut() + pkg/sentry/syscalls/linux/timespec.go:52 +0x3b1 + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.copyOutTimespecRemaining() + pkg/sentry/syscalls/linux/sys_poll.go:260 +0xc8 + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Pselect() + pkg/sentry/syscalls/linux/sys_poll.go:423 +0x187 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall() + pkg/sentry/kernel/task_syscall.go:162 +0x14e + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke() + pkg/sentry/kernel/task_syscall.go:278 +0x7d + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter() + pkg/sentry/kernel/task_syscall.go:241 +0xc3 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall() + pkg/sentry/kernel/task_syscall.go:216 +0x19c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute() + pkg/sentry/kernel/task_run.go:217 +0x157c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run() + pkg/sentry/kernel/task_run.go:95 +0x264 + +Previous write at 0x00c4203c26f8 by goroutine 27: + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*pmaSet).InsertWithoutMergingUnchecked() + bazel-out/k8-fastbuild/bin/pkg/sentry/mm/pma_set.go:316 +0x229 + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*pmaSet).Insert() + bazel-out/k8-fastbuild/bin/pkg/sentry/mm/pma_set.go:288 +0x225 + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).insertPMAsLocked() + pkg/sentry/mm/pma.go:339 +0xf5b + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).ensurePMAsLocked() + pkg/sentry/mm/pma.go:258 +0x25e + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).getPMAsLocked() + pkg/sentry/mm/pma.go:128 +0xe1 + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).populateAndUnlock() + pkg/sentry/mm/syscalls.go:180 +0x187 + gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).MMap() + pkg/sentry/mm/syscalls.go:148 +0x2c3 + gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Mmap() + pkg/sentry/syscalls/linux/sys_mmap.go:101 +0x32e + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall() + pkg/sentry/kernel/task_syscall.go:162 +0x14e + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke() + pkg/sentry/kernel/task_syscall.go:278 +0x7d + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter() + pkg/sentry/kernel/task_syscall.go:241 +0xc3 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall() + pkg/sentry/kernel/task_syscall.go:216 +0x19c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute() + pkg/sentry/kernel/task_run.go:217 +0x157c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run() + pkg/sentry/kernel/task_run.go:95 +0x264 diff --git a/pkg/report/testdata/gvisor/report/9 b/pkg/report/testdata/gvisor/report/9 new file mode 100644 index 00000000..4bf29e39 --- /dev/null +++ b/pkg/report/testdata/gvisor/report/9 @@ -0,0 +1,96 @@ +TITLE: DATA RACE in kernel.(*Task).accountTaskGoroutineEnter + +================== +WARNING: DATA RACE +Write at 0x00c4203e8058 by goroutine 27: + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).accountTaskGoroutineEnter() + pkg/sentry/kernel/task_sched.go:94 +0x13c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute() + pkg/sentry/kernel/task_run.go:206 +0x125 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run() + pkg/sentry/kernel/task_run.go:95 +0x264 + +Previous read at 0x00c4203e8058 by goroutine 23: + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.SeqAtomicLoadTaskGoroutineSchedInfo() + bazel-out/k8-fastbuild/bin/pkg/sentry/kernel/seqatomic_taskgoroutineschedinfo.go:25 +0x68 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).TaskGoroutineSchedInfo() + pkg/sentry/kernel/task_sched.go:120 +0x4b + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).cpuStatsAt() + pkg/sentry/kernel/task_sched.go:134 +0x3c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*ThreadGroup).CPUStats() + pkg/sentry/kernel/task_sched.go:167 +0x1e5 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*tgClock).Now() + pkg/sentry/kernel/timer.go:78 +0x4d + gvisor.googlesource.com/gvisor/pkg/sentry/kernel/time.(*Timer).Tick() + pkg/sentry/kernel/time/time.go:491 +0x5e + gvisor.googlesource.com/gvisor/pkg/sentry/kernel/time.(*Timer).runGoroutine() + pkg/sentry/kernel/time/time.go:484 +0x52 + +Goroutine 27 (running) created at: + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).Start() + pkg/sentry/kernel/task_start.go:251 +0x193 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Kernel).Start() + pkg/sentry/kernel/kernel.go:664 +0x320 + gvisor.googlesource.com/gvisor/runsc/boot.(*Loader).run() + runsc/boot/loader.go:343 +0x2f2 + gvisor.googlesource.com/gvisor/runsc/boot.(*Loader).Run() + runsc/boot/loader.go:298 +0x3c + gvisor.googlesource.com/gvisor/runsc/cmd.(*Boot).Execute() + runsc/cmd/boot.go:140 +0xf02 + github.com/google/subcommands.(*Commander).Execute() + external/com_github_google_subcommands/subcommands.go:141 +0x486 + github.com/google/subcommands.Execute() + external/com_github_google_subcommands/subcommands.go:371 +0x80 + main.main() + runsc/main.go:188 +0x16d0 + +Goroutine 23 (running) created at: + gvisor.googlesource.com/gvisor/pkg/sentry/kernel/time.(*Timer).init() + pkg/sentry/kernel/time/time.go:455 +0x2bc + gvisor.googlesource.com/gvisor/pkg/sentry/kernel/time.NewTimer() + pkg/sentry/kernel/time/time.go:418 +0xf4 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.newTimerManager() + pkg/sentry/kernel/timer.go:219 +0x47c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.NewThreadGroup() + pkg/sentry/kernel/thread_group.go:218 +0x1e5 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Kernel).CreateProcess() + pkg/sentry/kernel/kernel.go:572 +0x343 + gvisor.googlesource.com/gvisor/runsc/boot.(*Loader).run() + runsc/boot/loader.go:335 +0x15b + gvisor.googlesource.com/gvisor/runsc/boot.(*Loader).Run() + runsc/boot/loader.go:298 +0x3c + gvisor.googlesource.com/gvisor/runsc/cmd.(*Boot).Execute() + runsc/cmd/boot.go:140 +0xf02 + github.com/google/subcommands.(*Commander).Execute() + external/com_github_google_subcommands/subcommands.go:141 +0x486 + github.com/google/subcommands.Execute() + external/com_github_google_subcommands/subcommands.go:371 +0x80 + main.main() + runsc/main.go:188 +0x16d0 +================== + +REPORT: +WARNING: DATA RACE +Write at 0x00c4203e8058 by goroutine 27: + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).accountTaskGoroutineEnter() + pkg/sentry/kernel/task_sched.go:94 +0x13c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute() + pkg/sentry/kernel/task_run.go:206 +0x125 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run() + pkg/sentry/kernel/task_run.go:95 +0x264 + +Previous read at 0x00c4203e8058 by goroutine 23: + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.SeqAtomicLoadTaskGoroutineSchedInfo() + bazel-out/k8-fastbuild/bin/pkg/sentry/kernel/seqatomic_taskgoroutineschedinfo.go:25 +0x68 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).TaskGoroutineSchedInfo() + pkg/sentry/kernel/task_sched.go:120 +0x4b + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).cpuStatsAt() + pkg/sentry/kernel/task_sched.go:134 +0x3c + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*ThreadGroup).CPUStats() + pkg/sentry/kernel/task_sched.go:167 +0x1e5 + gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*tgClock).Now() + pkg/sentry/kernel/timer.go:78 +0x4d + gvisor.googlesource.com/gvisor/pkg/sentry/kernel/time.(*Timer).Tick() + pkg/sentry/kernel/time/time.go:491 +0x5e + gvisor.googlesource.com/gvisor/pkg/sentry/kernel/time.(*Timer).runGoroutine() + pkg/sentry/kernel/time/time.go:484 +0x52