syzbot


DATA RACE in atomic.CompareAndSwapInt32 (2)

Status: fixed on 2019/04/04 10:15
Fix commit: d14a7de65865 Fix more data races in shm debug messages.
First crash: 1873d, last: 1873d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
gvisor DATA RACE in atomic.CompareAndSwapInt32 (4) syz 4 1043d 1036d 14/26 fixed on 2021/07/22 02:46
gvisor DATA RACE in atomic.CompareAndSwapInt32 C 9 1878d 1891d 0/26 fixed on 2019/04/01 09:44

Sample crash report:
WARNING: DATA RACE
Write at 0x00c0001941c8 by goroutine 360:
  sync/atomic.CompareAndSwapInt32()
      bazel-out/k8-fastbuild/bin/external/io_bazel_rules_go/linux_amd64_static_race_stripped/stdlib%/src/runtime/race_amd64.s:293 +0xb
  sync.(*Mutex).Lock()
      GOROOT/src/sync/mutex.go:74 +0x4d
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel/shm.(*Shm).RemoveMapping()
      pkg/sentry/kernel/shm/shm.go:422 +0x47
DIAGNOSIS:
I0402 11:23:49.825801   56691 x:0] ***************************
I0402 11:23:49.826374   56691 x:0] Args: [/syzkaller/managers/kvm-direct-overlay-host-race/current/image -root /syzkaller/managers/kvm-direct-overlay-host-race/workdir/gvisor_root -watchdog-action=panic -network=none -debug -platform=ptrace -file-access=exclusive -overlay -network=host debug -stacks ci-gvisor-kvm-direct-overlay-host-race-0]
I0402 11:23:49.826507   56691 x:0] Version release-20190304.1-70-g1df3fa699774
I0402 11:23:49.826534   56691 x:0] PID: 56691
I0402 11:23:49.826581   56691 x:0] UID: 0, GID: 0
I0402 11:23:49.826638   56691 x:0] Configuration:
I0402 11:23:49.826657   56691 x:0] 		RootDir: /syzkaller/managers/kvm-direct-overlay-host-race/workdir/gvisor_root
I0402 11:23:49.826673   56691 x:0] 		Platform: ptrace
I0402 11:23:49.826697   56691 x:0] 		FileAccess: exclusive, overlay: true
I0402 11:23:49.826745   56691 x:0] 		Network: host, logging: false
I0402 11:23:49.826785   56691 x:0] 		Strace: false, max size: 1024, syscalls: []
I0402 11:23:49.826827   56691 x:0] ***************************
D0402 11:23:49.826924   56691 x:0] Load container "/syzkaller/managers/kvm-direct-overlay-host-race/workdir/gvisor_root" "ci-gvisor-kvm-direct-overlay-host-race-0"
D0402 11:23:49.837163   56691 x:0] Signal container "ci-gvisor-kvm-direct-overlay-host-race-0": signal 0
D0402 11:23:49.837356   56691 x:0] Signal sandbox "ci-gvisor-kvm-direct-overlay-host-race-0"
D0402 11:23:49.837425   56691 x:0] Connecting to sandbox "ci-gvisor-kvm-direct-overlay-host-race-0"
D0402 11:23:49.838354   56691 x:0] urpc: successfully marshalled 120 bytes.
D0402 11:23:49.840843   56691 x:0] urpc: unmarshal success.
I0402 11:23:49.841120   56691 x:0] Found sandbox "ci-gvisor-kvm-direct-overlay-host-race-0", PID: 41364
I0402 11:23:49.841223   56691 x:0] Retrieving sandbox stacks
D0402 11:23:49.841271   56691 x:0] Stacks sandbox "ci-gvisor-kvm-direct-overlay-host-race-0"
D0402 11:23:49.841358   56691 x:0] Connecting to sandbox "ci-gvisor-kvm-direct-overlay-host-race-0"
D0402 11:23:49.841878   56691 x:0] urpc: successfully marshalled 36 bytes.
D0402 11:23:50.023852   56691 x:0] urpc: unmarshal success.
I0402 11:23:50.024096   56691 x:0]      *** Stack dump ***
goroutine 127082 [running]:
gvisor.googlesource.com/gvisor/pkg/log.Stacks(0x45c801, 0xc0002bf1a0, 0xc000913830, 0xc0005f8380)
	pkg/log/log.go:259 +0xb6
gvisor.googlesource.com/gvisor/runsc/boot.(*debug).Stacks(0x23dbc70, 0x23dbc70, 0xc00065a4d0, 0x0, 0x0)
	runsc/boot/debug.go:26 +0x38
reflect.Value.call(0xc0002bf1a0, 0xc0002dc198, 0x13, 0x112e16b, 0x4, 0xc00100feb8, 0x3, 0x3, 0x4a864e, 0xfdf3c0, ...)
	GOROOT/src/reflect/value.go:447 +0x649
reflect.Value.Call(0xc0002bf1a0, 0xc0002dc198, 0x13, 0xc00100feb8, 0x3, 0x3, 0x0, 0x23dbc70, 0x16)
	GOROOT/src/reflect/value.go:308 +0xc1
gvisor.googlesource.com/gvisor/pkg/urpc.(*Server).handleOne(0xc000288150, 0xc0010f33e0, 0x0, 0x0)
	pkg/urpc/urpc.go:325 +0x63f
gvisor.googlesource.com/gvisor/pkg/urpc.(*Server).handleRegistered(0xc000288150, 0xc0010f33e0, 0xc000288150, 0xc0010f33e0)
	pkg/urpc/urpc.go:420 +0x43
gvisor.googlesource.com/gvisor/pkg/urpc.(*Server).StartHandling.func1(0xc000288150, 0xc0010f33e0)
	pkg/urpc/urpc.go:440 +0x77
created by gvisor.googlesource.com/gvisor/pkg/urpc.(*Server).StartHandling
	pkg/urpc/urpc.go:438 +0x6f

goroutine 1 [semacquire, 6 minutes]:
sync.runtime_Semacquire(0xc00029c124)
	GOROOT/src/runtime/sema.go:56 +0x39
sync.(*WaitGroup).Wait(0xc00029c124)
	GOROOT/src/sync/waitgroup.go:130 +0xb2
gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Kernel).WaitExited(...)
	pkg/sentry/kernel/kernel.go:820
gvisor.googlesource.com/gvisor/runsc/boot.(*Loader).WaitExit(0xc00022a8c0, 0x0, 0x0)
	runsc/boot/loader.go:781 +0x74
gvisor.googlesource.com/gvisor/runsc/cmd.(*Boot).Execute(0xc0002281b0, 0x12bfc20, 0xc0000ce008, 0xc000106c00, 0xc00019f120, 0x2, 0x2, 0x0)
	runsc/cmd/boot.go:252 +0x12e4
github.com/google/subcommands.(*Commander).Execute(0xc000124000, 0x12bfc20, 0xc0000ce008, 0xc00019f120, 0x2, 0x2, 0x203000)
	external/com_github_google_subcommands/subcommands.go:141 +0x522
github.com/google/subcommands.Execute(...)
	external/com_github_google_subcommands/subcommands.go:371
main.main()
	runsc/main.go:238 +0x2473

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/04/02 11:36 https://gvisor.googlesource.com/gvisor master 1df3fa699774 a9ca43d4 .config console log report syz ci-gvisor-kvm-direct-overlay-host-race
2019/04/02 09:48 https://gvisor.googlesource.com/gvisor master 1df3fa699774 a9ca43d4 .config console log report ci-gvisor-kvm-direct-overlay-host-race
* Struck through repros no longer work on HEAD.