syzbot


DATA RACE in log.GoogleEmitter.Emit (2)

Status: fixed on 2023/05/25 09:13
Fix commit: 158636229e87 Avoid serializing the sharedContext struct in formatting directives.
First crash: 556d, last: 554d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
gvisor DATA RACE in log.GoogleEmitter.Emit (4) 1 116d 116d 26/26 fixed on 2024/08/03 02:02
gvisor DATA RACE in log.GoogleEmitter.Emit (3) 1 133d 133d 26/26 fixed on 2024/07/17 10:25
gvisor DATA RACE in log.GoogleEmitter.Emit C 34 1467d 1473d 0/26 fixed on 2020/11/21 02:21

Sample crash report:
WARNING: DATA RACE
Read at 0x00c00028e6d0 by goroutine 228:
  reflect.Value.Int()
      GOROOT/src/reflect/value.go:1457 +0x564
  fmt.(*pp).printValue()
      GOROOT/src/fmt/print.go:792 +0x4c0
  fmt.(*pp).printValue()
      GOROOT/src/fmt/print.go:853 +0x1d25
  fmt.(*pp).printValue()
      GOROOT/src/fmt/print.go:853 +0x1d25
  fmt.(*pp).printValue()
      GOROOT/src/fmt/print.go:923 +0x12da
  fmt.(*pp).badVerb()
      GOROOT/src/fmt/print.go:394 +0x7d7
  fmt.(*pp).fmtPointer()
      GOROOT/src/fmt/print.go:583 +0x136
  fmt.(*pp).printValue()
      GOROOT/src/fmt/print.go:929 +0x1cb3
  fmt.(*pp).printValue()
      GOROOT/src/fmt/print.go:853 +0x1d25
  fmt.(*pp).printValue()
      GOROOT/src/fmt/print.go:923 +0x12da
  fmt.(*pp).printArg()
      GOROOT/src/fmt/print.go:759 +0xe44
  fmt.(*pp).doPrintf()
      GOROOT/src/fmt/print.go:1077 +0x599
  fmt.Sprintf()
      GOROOT/src/fmt/print.go:239 +0x67
  gvisor.dev/gvisor/pkg/log.GoogleEmitter.Emit()
      pkg/log/glog.go:82 +0x29b
  gvisor.dev/gvisor/pkg/log.(*BasicLogger).WarningfAtDepth()
      pkg/log/log.go:234 +0x12f
  gvisor.dev/gvisor/pkg/log.Warningf()
      pkg/log/log.go:290 +0x6f
  gvisor.dev/gvisor/pkg/sentry/platform/systrap.(*sharedContext).sleepOnState()
      pkg/sentry/platform/systrap/shared_context.go:216 +0x23a
  gvisor.dev/gvisor/pkg/sentry/platform/systrap.(*subprocess).waitOnState()
      pkg/sentry/platform/systrap/subprocess.go:814 +0x1b1
  gvisor.dev/gvisor/pkg/sentry/platform/systrap.(*subprocess).switchToApp()
      pkg/sentry/platform/systrap/subprocess.go:740 +0x508
  gvisor.dev/gvisor/pkg/sentry/platform/systrap.(*context).Switch()
      pkg/sentry/platform/systrap/systrap.go:176 +0x144
  gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:252 +0x1259
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:98 +0x35a
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start.func1()
      pkg/sentry/kernel/task_start.go:377 +0x47

Previous write at 0x00c00028e6d0 by goroutine 222:
  sync/atomic.AddInt32()
      src/runtime/race_amd64.s:281 +0xb
  sync/atomic.AddInt32()
      <autogenerated>:1 +0x1a
  gvisor.dev/gvisor/pkg/sentry/platform/systrap.(*subprocess).kickSysmsgThread()
      pkg/sentry/platform/systrap/subprocess.go:870 +0x2ca
  gvisor.dev/gvisor/pkg/sentry/platform/systrap.(*subprocess).waitOnState()
      pkg/sentry/platform/systrap/subprocess.go:798 +0x271
  gvisor.dev/gvisor/pkg/sentry/platform/systrap.(*subprocess).switchToApp()
      pkg/sentry/platform/systrap/subprocess.go:740 +0x508
  gvisor.dev/gvisor/pkg/sentry/platform/systrap.(*context).Switch()
      pkg/sentry/platform/systrap/systrap.go:176 +0x144
  gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:252 +0x1259
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:98 +0x35a
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start.func1()
      pkg/sentry/kernel/task_start.go:377 +0x47

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/05/22 04:48 gvisor 7e32a238387b 4bce1a3e .config console log report info ci-gvisor-systrap-1-race-cover DATA RACE in log.GoogleEmitter.Emit
2023/05/22 04:47 gvisor 7e32a238387b 4bce1a3e .config console log report info ci-gvisor-systrap-1-race DATA RACE in log.GoogleEmitter.Emit
2023/05/20 03:27 gvisor 226f5145b682 96689200 .config console log report info ci-gvisor-systrap-1-race DATA RACE in log.GoogleEmitter.Emit
* Struck through repros no longer work on HEAD.