syzbot


DATA RACE in log.GoogleEmitter.Emit (3)

Status: fixed on 2024/07/17 10:25
Fix commit: ddfbb50ecc2d Don't log the task in CgroupPrepareMigrate warning.
First crash: 133d, last: 133d
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 C 34 1467d 1473d 0/26 fixed on 2020/11/21 02:21
gvisor DATA RACE in log.GoogleEmitter.Emit (2) 3 554d 556d 26/26 fixed on 2023/05/25 09:13

Sample crash report:
WARNING: DATA RACE
Read at 0x00c00107a038 by goroutine 893:
  reflect.typedmemmove()
      GOROOT/src/runtime/mbarrier.go:203 +0x0
  reflect.packEface()
      GOROOT/src/reflect/value.go:135 +0xc5
  reflect.valueInterface()
      GOROOT/src/reflect/value.go:1526 +0x179
  reflect.Value.Interface()
      GOROOT/src/reflect/value.go:1496 +0xb4
  fmt.(*pp).printValue()
      GOROOT/src/fmt/print.go:769 +0xc5
  fmt.(*pp).printValue()
      GOROOT/src/fmt/print.go:921 +0x132a
  fmt.(*pp).printArg()
      GOROOT/src/fmt/print.go:759 +0xb84
  fmt.(*pp).doPrintf()
      GOROOT/src/fmt/print.go:1075 +0x592
  fmt.Sprintf()
      GOROOT/src/fmt/print.go:239 +0x5c
  gvisor.dev/gvisor/pkg/log.GoogleEmitter.Emit()
      pkg/log/glog.go:82 +0x2b1
  gvisor.dev/gvisor/pkg/log.(*BasicLogger).WarningfAtDepth()
      pkg/log/log.go:234 +0x121
  gvisor.dev/gvisor/pkg/log.Warningf()
      pkg/log/log.go:290 +0x6c
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).CgroupPrepareMigrate()
      pkg/sentry/kernel/task_cgroup.go:159 +0x630
  gvisor.dev/gvisor/pkg/sentry/kernel.(*ThreadGroup).MigrateCgroup()
      pkg/sentry/kernel/task_cgroup.go:184 +0x228
  gvisor.dev/gvisor/pkg/sentry/fsimpl/cgroupfs.(*cgroupProcsData).Write()
      pkg/sentry/fsimpl/cgroupfs/base.go:454 +0x217
  gvisor.dev/gvisor/pkg/sentry/vfs.(*DynamicBytesFileDescriptionImpl).pwriteLocked()
      pkg/sentry/vfs/file_description_impl_util.go:390 +0x3c7
  gvisor.dev/gvisor/pkg/sentry/vfs.(*DynamicBytesFileDescriptionImpl).Write()
      pkg/sentry/vfs/file_description_impl_util.go:411 +0x129
  gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*DynamicBytesFD).Write()
      pkg/sentry/fsimpl/kernfs/dynamic_bytes_file.go:137 +0xa4
  gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).Write()
      pkg/sentry/vfs/file_description.go:679 +0x144
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.write()
      pkg/sentry/syscalls/linux/sys_read_write.go:347 +0xa4
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Writev()
      pkg/sentry/syscalls/linux/sys_read_write.go:341 +0x36e
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:143 +0xb9e
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke()
      pkg/sentry/kernel/task_syscall.go:323 +0x84
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:283 +0xc6
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:258 +0x549
  gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:263 +0x22f4
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:98 +0x39a
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start.gowrap1()
      pkg/sentry/kernel/task_start.go:393 +0x44

Previous write at 0x00c00107a038 by goroutine 898:
  sync/atomic.StoreInt64()
      src/runtime/race_amd64.s:237 +0xb
  sync/atomic.StoreInt64()
      <autogenerated>:1 +0x15
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:60 +0x70
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start.gowrap1()
      pkg/sentry/kernel/task_start.go:393 +0x44

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/15 20:44 gvisor e87ab0a3018d e8709b21 .config console log report info ci-gvisor-systrap-1-race-cover DATA RACE in log.GoogleEmitter.Emit
* Struck through repros no longer work on HEAD.