You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nov 18 16:01:36 kubo-staging-us-east-02 ipfs[573811]: 2024-11-18T16:01:36.870Z ERROR fullrtdht fullrt/dht.go:450 key not found in map
Nov 18 16:01:36 kubo-staging-us-east-02 ipfs[573811]: 2024-11-18T16:01:36.870Z ERROR fullrtdht fullrt/dht.go:450 key not found in map
Nov 18 16:01:36 kubo-staging-us-east-02 ipfs[573811]: 2024-11-18T16:01:36.905Z ERROR fullrtdht fullrt/dht.go:450 key not found in map
Nov 18 16:01:36 kubo-staging-us-east-02 ipfs[573811]: 2024-11-18T16:01:36.906Z ERROR fullrtdht fullrt/dht.go:450 key not found in map
Nov 18 16:01:36 kubo-staging-us-east-02 ipfs[573811]: 2024-11-18T16:01:36.952Z ERROR fullrtdht fullrt/dht.go:450 key not found in map
Nov 18 16:01:36 kubo-staging-us-east-02 ipfs[573811]: 2024-11-18T16:01:36.953Z ERROR fullrtdht fullrt/dht.go:450 key not found in map
Nov 18 16:01:36 kubo-staging-us-east-02 ipfs[573811]: 2024-11-18T16:01:36.953Z ERROR fullrtdht fullrt/dht.go:450 key not found in map
Nov 18 16:01:36 kubo-staging-us-east-02 ipfs[573811]: 2024-11-18T16:01:36.963Z ERROR fullrtdht fullrt/dht.go:450 key not found in map
Nov 18 16:01:36 kubo-staging-us-east-02 ipfs[573811]: 2024-11-18T16:01:36.963Z ERROR fullrtdht fullrt/dht.go:450 key not found in map
Nov 18 16:01:36 kubo-staging-us-east-02 ipfs[573811]: 2024-11-18T16:01:36.963Z ERROR fullrtdht fullrt/dht.go:450 key not found in map
Nov 18 16:01:36 kubo-staging-us-east-02 ipfs[573811]: 2024-11-18T16:01:36.963Z ERROR fullrtdht fullrt/dht.go:450 key not found in map
Nov 18 16:01:36 kubo-staging-us-east-02 ipfs[573811]: 2024-11-18T16:01:36.966Z ERROR fullrtdht fullrt/dht.go:450 key not found in map
Nov 18 16:01:36 kubo-staging-us-east-02 ipfs[573811]: 2024-11-18T16:01:36.966Z ERROR fullrtdht fullrt/dht.go:450 key not found in map
Nov 18 16:01:36 kubo-staging-us-east-02 ipfs[573811]: 2024-11-18T16:01:36.966Z ERROR fullrtdht fullrt/dht.go:450 key not found in map
Nov 18 16:01:37 kubo-staging-us-east-02 ipfs[573811]: 2024-11-18T16:01:37.077Z ERROR fullrtdht fullrt/dht.go:450 key not found in map
Nov 18 16:01:37 kubo-staging-us-east-02 ipfs[573811]: 2024-11-18T16:01:37.086Z ERROR fullrtdht fullrt/dht.go:450 key not found in map
Filling this issue so others can +1 if they also experienced it.
I'll monitor things for next few weeks and post update if we see it again in our infra.
it seems this should not be error, but a debug log message
also, the fact we just log, and still process this non-existing peer, means the code will try to access peerAddrs for a non-existent peer, which could lead to unexpected behavior. It looks like a bug to me, or a very anti-pattern way of signaling there is no info for a peer.
Potential fix
Did not test it, but my intuition would be to log to debug + skip appending nil peer?
+ dht.kMapLk.RUnlock()
if !ok {
- logger.Errorf("key not found in map: %v", k)+ logger.Debugf("key not found in map: %v", k)+ continue
}
- dht.kMapLk.RUnlock()
The text was updated successfully, but these errors were encountered:
However, IIUC this reveals a deeper problem in the fullrt implementation, since all keys that are in the trie (dht.rt) are expected to have a peer id mapping.
Yes all keys in the trie are expected to have mappings to their peerIDs (and addresses) so this is surprising
That's also why this logs an error. Logging debug wouldn't tell us if there was an issue since almost no one looks at debug logs, and people have been running the client for a while now so I suspect we'd have seen complaints if this was happening all the time and errors were clogging up people's consoles
Adding the continue seems reasonable, but also this is likely a race condition related to having separate locks for the trie and the map and probably fixable by having them share a lock.
Does this happen frequently? Any conditions that make it happen more frequently, and what's your confidence that if we roll out a fix you'll notice it?
Testing Kubo 0.32.1 with go-libp2p-kad-dht v0.28.1 revealed some ERROR messages in log:
Filling this issue so others can +1 if they also experienced it.
I'll monitor things for next few weeks and post update if we see it again in our infra.
Analysis
ERROR comes from:
go-libp2p-kad-dht/fullrt/dht.go
Lines 435 to 461 in e8189b5
Two problems:
Potential fix
Did not test it, but my intuition would be to log to debug + skip appending
nil
peer?The text was updated successfully, but these errors were encountered: