libp2p / libp2p/jvm-libp2p

Gossip outbound stream is not yet opened on heartbeat

Open
#163 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
366
Forks
85
Avg merge
2d 39m
Merged PRs (30d)
6

Description

20:55:47.258 WARN  - Exception in gossipsub heartbeat
io.libp2p.core.InternalErrorException: Outbound gossip stream not initialized or protocol is missing
        at io.libp2p.pubsub.gossip.GossipRouterKt.getOutboundProtocol(GossipRouter.kt:40) ~[jvm-libp2p-minimal-0.5.8-RELEASE.jar:?]
        at io.libp2p.pubsub.gossip.GossipRouterKt.getOutboundGossipProtocol(GossipRouter.kt:42) ~[jvm-libp2p-minimal-0.5.8-RELEASE.jar:?]
        at io.libp2p.pubsub.gossip.GossipRouter.enqueuePrune(GossipRouter.kt:457) ~[jvm-libp2p-minimal-0.5.8-RELEASE.jar:?]
        at io.libp2p.pubsub.gossip.GossipRouter.prune(GossipRouter.kt:442) ~[jvm-libp2p-minimal-0.5.8-RELEASE.jar:?]
        at io.libp2p.pubsub.gossip.GossipRouter.heartbeat(GossipRouter.kt:371) [jvm-libp2p-minimal-0.5.8-RELEASE.jar:?]

While the WARN log was fixed the stacktrace is suspicious: why gossip outbound stream is not opened on heartbeat? Normally outbound stream can be not yet opened at some moments when gossip initiated by a remote peer and immediately sending some message (see #160). But the outbound stream should be opened immediately and it's unlikely that during heartbeat it's not opened yet.

See the issue comment: https://github.com/ConsenSys/teku/issues/2836#issuecomment-726357019

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in GossipRouter.kt at heartbeat (line 371), prune (line 442), enqueuePrune (line 457), and the outbound protocol accessors at lines 40 and 42. Trace how the outbound gossip stream is initialized when gossip starts remotely, then determine why heartbeat can reach the missing protocol state. Done means heartbeat no longer produces this exception when the stream has not yet been opened.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
distributed-systems, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.