Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data race in p2p package #2784

Closed
xenowits opened this issue Jan 12, 2024 · 3 comments
Closed

data race in p2p package #2784

xenowits opened this issue Jan 12, 2024 · 3 comments
Assignees
Labels
bug Something isn't working protocol Protocol Team tickets

Comments

@xenowits
Copy link
Contributor

🐞 Bug Report

Description

A data race condition was observed in a github job running on a PR: https://github.com/ObolNetwork/charon/actions/runs/7464121777/job/20415456429?pr=2777

Has this worked before in a previous version?

Yes

🔬 Minimal Reproduction

See the logs here: https://github.com/ObolNetwork/charon/actions/runs/7464121777/job/20415456429?pr=2777

🔥 Error

==================
WARNING: DATA RACE
Write at 0x00c007869a30 by goroutine 149088:
  github.com/obolnetwork/charon/p2p.(*Sender).addResult()
      /home/runner/work/charon/charon/p2p/sender.go:67 +0x19c
  github.com/obolnetwork/charon/p2p.(*Sender).SendAsync.func1()
      /home/runner/work/charon/charon/p2p/sender.go:117 +0x27c

Previous write at 0x00c007869a30 by goroutine 149081:
  github.com/obolnetwork/charon/p2p.(*Sender).addResult()
      /home/runner/work/charon/charon/p2p/sender.go:67 +0x19c
  github.com/obolnetwork/charon/p2p.(*Sender).SendAsync.func1()
      /home/runner/work/charon/charon/p2p/sender.go:117 +0x27c

Goroutine 149088 (running) created at:
  github.com/obolnetwork/charon/p2p.(*Sender).SendAsync()
      /home/runner/work/charon/charon/p2p/sender.go:110 +0x288
  github.com/obolnetwork/charon/core/consensus.(*transport).Broadcast()
      /home/runner/work/charon/charon/core/consensus/transport.go:131 +0xdd6
  github.com/obolnetwork/charon/core/consensus.(*transport).Broadcast-fm()
      <autogenerated>:1 +0x16b
  github.com/obolnetwork/charon/core/qbft.Run[go.shape.struct { Slot uint64; Type github.com/obolnetwork/charon/core.DutyType },go.shape.[32]uint8].func2()
      /home/runner/work/charon/charon/core/qbft/qbft.go:198 +0x1c2
  github.com/obolnetwork/charon/core/qbft.Run[go.shape.struct { Slot uint64; Type github.com/obolnetwork/charon/core.DutyType },go.shape.[32]uint8]()
      /home/runner/work/charon/charon/core/qbft/qbft.go:321 +0x16b4
  github.com/obolnetwork/charon/core/consensus.(*Component).runInstance()
      /home/runner/work/charon/charon/core/consensus/component.go:469 +0xe48
  github.com/obolnetwork/charon/core/consensus.(*Component).propose()
      /home/runner/work/charon/charon/core/consensus/component.go:375 +0x6a4
  github.com/obolnetwork/charon/core/consensus.(*Component).ProposePriority()
      /home/runner/work/charon/charon/core/consensus/component.go:327 +0x74
  github.com/obolnetwork/charon/core/priority.startConsensus.func1()
      /home/runner/work/charon/charon/core/priority/prioritiser.go:369 +0x9d

Goroutine 149081 (running) created at:
  github.com/obolnetwork/charon/p2p.(*Sender).SendAsync()
      /home/runner/work/charon/charon/p2p/sender.go:110 +0x288
  github.com/obolnetwork/charon/core/consensus.(*transport).Broadcast()
      /home/runner/work/charon/charon/core/consensus/transport.go:131 +0xdd6
  github.com/obolnetwork/charon/core/consensus.(*transport).Broadcast-fm()
      <autogenerated>:1 +0x16b
  github.com/obolnetwork/charon/core/qbft.Run[go.shape.struct { Slot uint64; Type github.com/obolnetwork/charon/core.DutyType },go.shape.[32]uint8].func2()
      /home/runner/work/charon/charon/core/qbft/qbft.go:198 +0x1c2
  github.com/obolnetwork/charon/core/qbft.Run[go.shape.struct { Slot uint64; Type github.com/obolnetwork/charon/core.DutyType },go.shape.[32]uint8]()
      /home/runner/work/charon/charon/core/qbft/qbft.go:284 +0x1865
  github.com/obolnetwork/charon/core/consensus.(*Component).runInstance()
      /home/runner/work/charon/charon/core/consensus/component.go:469 +0xe48
  github.com/obolnetwork/charon/core/consensus.(*Component).propose()
      /home/runner/work/charon/charon/core/consensus/component.go:375 +0x6a4
  github.com/obolnetwork/charon/core/consensus.(*Component).ProposePriority()
      /home/runner/work/charon/charon/core/consensus/component.go:327 +0x74
  github.com/obolnetwork/charon/core/priority.startConsensus.func1()
      /home/runner/work/charon/charon/core/priority/prioritiser.go:369 +0x9d
==================

🌍 Your Environment

None

What version of Charon are you running? (Which release)

Latest

Anything else relevant (validator index / public key)?

@github-actions github-actions bot added the protocol Protocol Team tickets label Jan 12, 2024
@boulder225 boulder225 added the bug Something isn't working label Jan 12, 2024
@xenowits
Copy link
Contributor Author

xenowits commented Jan 15, 2024

Comments:

@dB2510
Copy link
Contributor

dB2510 commented Jan 31, 2024

Hey team! Please add your planning poker estimate with Zenhub @dB2510 @gsora @pinebit @xenowits

@gsora
Copy link
Collaborator

gsora commented Feb 8, 2024

Duplicate of #2763

@gsora gsora marked this as a duplicate of #2763 Feb 8, 2024
obol-bulldozer bot pushed a commit that referenced this issue Feb 12, 2024
`peerState.failing` can be accessed concurrently by integration tests.

Make sure to guard its access with an `atomic.Bool`.

category: bug
ticket: #2784
@gsora gsora closed this as completed Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working protocol Protocol Team tickets
Projects
None yet
Development

No branches or pull requests

4 participants