syzbot


DATA RACE in waiter.(*Queue).Notify

Status: fixed on 2018/08/19 04:48
Fix commit: d4939f6dc22e TTY: Fix data race where calls into tty.queue's waiter were not synchronized.
First crash: 2348d, last: 2295d

Sample crash report:
WARNING: DATA RACE
Read at 0x00c4203ba528 by goroutine 139:
  gvisor.googlesource.com/gvisor/pkg/waiter.(*Queue).Notify()
      pkg/waiter/waiter.go:177 +0xa4
  gvisor.googlesource.com/gvisor/pkg/sentry/fs/tty.(*queue).writeBytes()
      pkg/sentry/fs/tty/queue.go:189 +0x1e6
  gvisor.googlesource.com/gvisor/pkg/sentry/fs/tty.(*queue).write()
      pkg/sentry/fs/tty/queue.go:170 +0x165
  gvisor.googlesource.com/gvisor/pkg/sentry/fs/tty.(*lineDiscipline).outputQueueWrite()
      pkg/sentry/fs/tty/line_discipline.go:175 +0xf8
  gvisor.googlesource.com/gvisor/pkg/sentry/fs/tty.(*slaveFileOperations).Write()
      pkg/sentry/fs/tty/slave.go:130 +0xe7
  gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*File).Writev()
      pkg/sentry/fs/file.go:271 +0x1ba
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.writev()
      pkg/sentry/syscalls/linux/sys_write.go:191 +0xa1
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Write()
      pkg/sentry/syscalls/linux/sys_write.go:67 +0x295
  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 0x00c4203ba528 by goroutine 130:
  gvisor.googlesource.com/gvisor/pkg/waiter.(*Queue).EventRegister()
      pkg/waiter/waiter.go:159 +0x59
  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:175 +0x6a
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls.(*PollFD).initReadiness()
      pkg/sentry/syscalls/polling.go:61 +0x2a9
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls.Poll()
      pkg/sentry/syscalls/polling.go:96 +0x17c
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.doPoll()
      pkg/sentry/syscalls/linux/sys_poll.go:70 +0x2b5
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.poll()
      pkg/sentry/syscalls/linux/sys_poll.go:289 +0x63
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Poll()
      pkg/sentry/syscalls/linux/sys_poll.go:307 +0x60
  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

Crashes (72):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/07/03 19:29 https://github.com/dvyukov/gvisor.git race 082553a8233a b9f93868 .config console log report syz C ci-gvisor-ptrace-proxy-sandbox-race
2018/08/14 20:44 https://github.com/dvyukov/gvisor.git race e4ce26c8b9b1 5084a625 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/08/05 20:49 https://github.com/dvyukov/gvisor.git race 72627b310e89 1beb8136 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/08/04 20:45 https://github.com/dvyukov/gvisor.git race 72627b310e89 3476a2df .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/08/02 21:33 https://github.com/dvyukov/gvisor.git race 72627b310e89 5b7e23bb .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/08/01 23:09 https://github.com/dvyukov/gvisor.git race 72627b310e89 0a7cf4ec .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/08/01 19:58 https://github.com/dvyukov/gvisor.git race 72627b310e89 0a7cf4ec .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/08/01 03:02 https://github.com/dvyukov/gvisor.git race 72627b310e89 8ef497b6 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/31 20:38 https://github.com/dvyukov/gvisor.git race 72627b310e89 8ef497b6 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/31 18:43 https://github.com/dvyukov/gvisor.git race 72627b310e89 1a381291 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/31 11:53 https://github.com/dvyukov/gvisor.git race 72627b310e89 1a381291 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/30 16:02 https://github.com/dvyukov/gvisor.git race 72627b310e89 1a381291 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/29 21:25 https://github.com/dvyukov/gvisor.git race 72627b310e89 1a381291 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/29 17:41 https://github.com/dvyukov/gvisor.git race 72627b310e89 0824d7a1 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/25 15:50 https://github.com/dvyukov/gvisor.git race 72627b310e89 375a3e31 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/25 05:12 https://github.com/dvyukov/gvisor.git race 72627b310e89 375a3e31 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/23 17:51 https://github.com/dvyukov/gvisor.git race 72627b310e89 f69c5fcd .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/23 00:43 https://github.com/dvyukov/gvisor.git race 72627b310e89 8cc079c3 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/22 19:00 https://github.com/dvyukov/gvisor.git race 72627b310e89 8cc079c3 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/22 07:21 https://github.com/dvyukov/gvisor.git race 72627b310e89 8cc079c3 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/21 22:12 https://github.com/dvyukov/gvisor.git race 72627b310e89 8cc079c3 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/21 21:04 https://github.com/dvyukov/gvisor.git race 72627b310e89 8cc079c3 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/21 10:25 https://github.com/dvyukov/gvisor.git race 72627b310e89 8cc079c3 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/21 07:35 https://github.com/dvyukov/gvisor.git race 72627b310e89 8cc079c3 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/21 06:07 https://github.com/dvyukov/gvisor.git race 72627b310e89 af255b09 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/20 13:53 https://github.com/dvyukov/gvisor.git race 72627b310e89 49f35839 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/20 08:02 https://github.com/dvyukov/gvisor.git race 72627b310e89 49f35839 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/20 00:34 https://github.com/dvyukov/gvisor.git race 72627b310e89 49f35839 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/19 12:22 https://github.com/dvyukov/gvisor.git race 72627b310e89 49f35839 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/19 11:08 https://github.com/dvyukov/gvisor.git race 72627b310e89 49f35839 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/19 06:48 https://github.com/dvyukov/gvisor.git race 72627b310e89 49f35839 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/19 05:37 https://github.com/dvyukov/gvisor.git race 72627b310e89 49f35839 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/18 16:42 https://github.com/dvyukov/gvisor.git race 72627b310e89 809256c3 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/18 08:38 https://github.com/dvyukov/gvisor.git race 54dabe736f40 6d5bd5b5 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/17 05:52 https://github.com/dvyukov/gvisor.git race 54dabe736f40 13761366 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/16 14:45 https://github.com/dvyukov/gvisor.git race 54dabe736f40 92a49505 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/16 09:19 https://github.com/dvyukov/gvisor.git race 54dabe736f40 92a49505 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/16 06:25 https://github.com/dvyukov/gvisor.git race 54dabe736f40 92a49505 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/15 17:03 https://github.com/dvyukov/gvisor.git race 54dabe736f40 92a49505 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/15 06:42 https://github.com/dvyukov/gvisor.git race 54dabe736f40 92a49505 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/14 23:16 https://github.com/dvyukov/gvisor.git race 54dabe736f40 92a49505 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/07/14 09:39 https://github.com/dvyukov/gvisor.git race 54dabe736f40 92a49505 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/06/23 08:37 https://github.com/dvyukov/gvisor.git race 60dbbdc2d54b 665947c7 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
* Struck through repros no longer work on HEAD.