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

fix(router): router.chDesc concurrent map iteration and write in pqueue #794

Merged
merged 2 commits into from
May 22, 2024

Conversation

lklimek
Copy link
Collaborator

@lklimek lklimek commented May 21, 2024

Issue being fixed or feature implemented

 fatal error: concurrent map iteration and map write                                                                                                                                   │
010.57942s full01         |                                                                                                                                                                                       │
010.57944s full01         | goroutine 605 gp=0xc0000ff180 m=3 mp=0xc000069008 [running]:                                                                                                                          │
010.57945s full01         | runtime.fatal({0x1c34522?, 0xc0000b4c38?})                                                                                                                                            │
010.57945s full01         |     /usr/local/go/src/runtime/panic.go:1042 +0x5c fp=0xc0011c56a8 sp=0xc0011c5678 pc=0x44dd9c                                                                                         │
010.57946s full01         | runtime.mapiternext(0xc0011c58e0)                                                                                                                                                     │
010.57947s full01         |     /usr/local/go/src/runtime/map.go:869 +0x45 fp=0xc0011c5738 sp=0xc0011c56a8 pc=0x41e105                                                                                            │
010.57948s full01         | runtime.mapiterinit(0x4523f5?, 0xc000513a10, 0xc0011c58e0)                                                                                                                            │
010.57949s full01         |     /usr/local/go/src/runtime/map.go:859 +0x179 fp=0xc0011c5758 sp=0xc0011c5738 pc=0x41e079                                                                                           │
010.57950s full01         | github.com/dashpay/tenderdash/internal/p2p.newPQScheduler({0x1f3d220, 0xc00058f880}, 0xc00002c200, 0xc000303680, 0xc000513a10, 0x10, 0x10, 0xf42400)                                  │
010.57952s full01         |     /src/tenderdash/internal/p2p/pqueue.go:108 +0x10f fp=0xc0011c5960 sp=0xc0011c5758 pc=0x147a70f                                                                                    │
010.57952s full01         | github.com/dashpay/tenderdash/internal/p2p.(*Router).createQueueFactory.func1(0x20)                                                                                                   │
010.57953s full01         |     /src/tenderdash/internal/p2p/router.go:228 +0x105 fp=0xc0011c5a20 sp=0xc0011c5960 pc=0x147e945                                                                                    │
010.57954s full01         | github.com/dashpay/tenderdash/internal/p2p.(*Router).getOrMakeQueue(0xc0001ff0e0, {0xc0003ac1e8, 0x28}, 0xc000386db0)                                                                 │
010.59023s full01         |     /src/tenderdash/internal/p2p/router.go:610 +0x1e2 fp=0xc0011c5b30 sp=0xc0011c5a20 pc=0x1484482                                                                                    │
010.59023s full01         | github.com/dashpay/tenderdash/internal/p2p.(*Router).routePeer(0xc0001ff0e0, {0x1f3aa58, 0xc00059b260}, {0xc0003ac1e8, 0x28}, {0x1f3eb70, 0xc0005980b0}, 0xc000386db0)                │
010.59030s full01         |     /src/tenderdash/internal/p2p/router.go:713 +0x1af fp=0xc0011c5f50 sp=0xc0011c5b30 pc=0x148656f                                                                                    │
010.59232s full01         | github.com/dashpay/tenderdash/internal/p2p.(*Router).connectPeer.gowrap1()                                                                                                            │
010.59238s full01         |     /src/tenderdash/internal/p2p/router.go:599 +0x99 fp=0xc0011c5fe0 sp=0xc0011c5f50 pc=0x1484259                                                                                     │
010.59245s full01         | runtime.goexit({})                                                                                                                                                                    │
010.59252s full01         |     /usr/local/go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc0011c5fe8 sp=0xc0011c5fe0 pc=0x489421                                                                                       │
010.59258s full01         | created by github.com/dashpay/tenderdash/internal/p2p.(*Router).connectPeer in goroutine 227                                                                                          │
010.59265s full01         |     /src/tenderdash/internal/p2p/router.go:599 +0x1153                       

What was done?

How Has This Been Tested?

GHA

Breaking Changes

None

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@lklimek lklimek enabled auto-merge (squash) May 21, 2024 08:21
@lklimek lklimek merged commit 8dd12fd into v0.14-dev May 22, 2024
15 checks passed
@lklimek lklimek deleted the fix/pqueue-race branch May 23, 2024 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants