capnproto / go-capnp

Cap'n Proto library and code generator for Go

Home Page:https://capnproto.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Data race

zenhack opened this issue · comments

From https://github.com/capnproto/go-capnproto2/actions/runs/3560344070/jobs/5980345025#step:5:1515

WARNING: DATA RACE
Read at 0x00c0000ba070 by goroutine 64:
  capnproto.org/go/capnp/v3.(*Message).Reset()
      /home/runner/work/go-capnproto2/go-capnproto2/message.go:133 +0x152
  capnproto.org/go/capnp/v3/rpc/transport.(*transport).NewMessage.func2()
      /home/runner/work/go-capnproto2/go-capnproto2/rpc/transport/transport.go:162 +0x7b
  capnproto.org/go/capnp/v3/rpc.(*Conn).newReturn.func1()
      /home/runner/work/go-capnproto2/go-capnproto2/rpc/answer.go:117 +0x4d
  runtime.deferreturn()
      /opt/hostedtoolcache/go/1.18.8/x64/src/runtime/panic.go:436 +0x32
  capnproto.org/go/capnp/v3/rpc.(*Conn).send()
      /home/runner/work/go-capnproto2/go-capnproto2/rpc/rpc.go:445 +0x2d
  capnproto.org/go/capnp/v3/rpc.(*Conn).send-fm()
      <autogenerated>:1 +0x39
  capnproto.org/go/capnp/v3/rpc.(*Conn).backgroundTask.func1()
      /home/runner/work/go-capnproto2/go-capnproto2/rpc/rpc.go:191 +0x92
  golang.org/x/sync/errgroup.(*Group).Go.func1()
      /home/runner/go/pkg/mod/golang.org/x/sync@v0.0.0-20201020160332-67f06af15bc9/errgroup/errgroup.go:57 +0x91

Previous write at 0x00c0000ba070 by goroutine 65:
  capnproto.org/go/capnp/v3/rpc.releaseList.release()
      /home/runner/work/go-capnproto2/go-capnproto2/rpc/export.go:314 +0x3e6
  capnproto.org/go/capnp/v3/rpc.(*Conn).handleFinish()
      /home/runner/work/go-capnproto2/go-capnproto2/rpc/rpc.go:1106 +0x222
  capnproto.org/go/capnp/v3/rpc.(*Conn).receive()
      /home/runner/work/go-capnproto2/go-capnproto2/rpc/rpc.go:530 +0xcb4
  capnproto.org/go/capnp/v3/rpc.(*Conn).receive-fm()
      <autogenerated>:1 +0x39
  capnproto.org/go/capnp/v3/rpc.(*Conn).backgroundTask.func1()
      /home/runner/work/go-capnproto2/go-capnproto2/rpc/rpc.go:191 +0x92
  golang.org/x/sync/errgroup.(*Group).Go.func1()
      /home/runner/go/pkg/mod/golang.org/x/sync@v0.0.0-20201020160332-67f06af15bc9/errgroup/errgroup.go:57 +0x91

Goroutine 64 (running) created at:
  golang.org/x/sync/errgroup.(*Group).Go()
      /home/runner/go/pkg/mod/golang.org/x/sync@v0.0.0-20201020160332-67f06af15bc9/errgroup/errgroup.go:54 +0xee
  capnproto.org/go/capnp/v3/rpc.NewConn()
      /home/runner/work/go-capnproto2/go-capnproto2/rpc/rpc.go:156 +0x744
  capnproto.org/go/capnp/v3/rpc_test.TestRecvDisembargo()
      /home/runner/work/go-capnproto2/go-capnproto2/rpc/level1_test.go:513 +0x444
  testing.tRunner()
      /opt/hostedtoolcache/go/1.18.8/x64/src/testing/testing.go:1439 +0x213
  testing.(*T).Run.func1()
      /opt/hostedtoolcache/go/1.18.8/x64/src/testing/testing.go:1486 +0x47

Goroutine 65 (running) created at:
  golang.org/x/sync/errgroup.(*Group).Go()
      /home/runner/go/pkg/mod/golang.org/x/sync@v0.0.0-20201020160332-67f06af15bc9/errgroup/errgroup.go:54 +0xee
  capnproto.org/go/capnp/v3/rpc.NewConn()
      /home/runner/work/go-capnproto2/go-capnproto2/rpc/rpc.go:157 +0x7d1
  capnproto.org/go/capnp/v3/rpc_test.TestRecvDisembargo()
      /home/runner/work/go-capnproto2/go-capnproto2/rpc/level1_test.go:513 +0x444
  testing.tRunner()
      /opt/hostedtoolcache/go/1.18.8/x64/src/testing/testing.go:1439 +0x213
  testing.(*T).Run.func1()
      /opt/hostedtoolcache/go/1.18.8/x64/src/testing/testing.go:1486 +0x47

It seems plausible that pooling arenas could have made this more likely, but I strongly suspect it's not a new bug.