-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
connmgr: Concurrent Map Misuse #1847
Comments
Some more logs shared here: ipfs/kubo#9374 (comment) @julian88110 @MarcoPolo would either of you like to take a look? |
taking a look. |
Thanks @p-shahi being on top of this. We would like to get this in the next (0.17) Kubo release. The RC is on Thursday, 2022-11-10. A patch here could come after the RC but before the final release on 2022-11-17. |
Let's sync up @julian88110 I started this earlier today. |
Synced up. I'll take. |
Description
Reported in: ipfs/kubo#9374 (comment)
When running
Kubo 0.16.0
users report a crash.There is a provided stacktrace:
https://github.com/libp2p/go-libp2p/blob/master/p2p/net/connmgr/connmgr.go#L255
Versions affected
Kubo 0.16.0
usesgo-libp2p v0.23.2
But this issue could have existed for some time.
Root Cause Analysis
Open Questions:
If it's valid that concurrent goroutines need to read
peerInfos
as it's being written to, shouldn't it be locked inside the sync read write mutex?go-libp2p/p2p/net/connmgr/connmgr.go
Lines 374 to 377 in 7465a50
go-libp2p/p2p/net/connmgr/connmgr.go
Lines 405 to 407 in 7465a50
go-libp2p/p2p/net/connmgr/connmgr.go
Lines 456 to 468 in 7465a50
The text was updated successfully, but these errors were encountered: