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

bug: duplicate messages on the network #2998

Open
NagyZoltanPeter opened this issue Aug 27, 2024 · 2 comments
Open

bug: duplicate messages on the network #2998

NagyZoltanPeter opened this issue Aug 27, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@NagyZoltanPeter
Copy link
Contributor

Problem

It has been found that in some cases messages can appear multiple times in the network out of the gossip sub layer's duplicate check time window.
With liteprotocoltester the issue is reproduced in separated simulation environment with high stress conditions but verified the on TWN messages are regularly duplicated in the network multiple times.

Impact

Growing bandwidth usage on the network with these "spam" messages as they are re-delivered to every node again and again.
One may can use this bug to flood the network maliciously.

To reproduce

Liteprotocoltester run on TWN.
With waku-sim it is harder to reproduce due the need of just enough high load.

This thread describes the issue and ways to reproduce it: https://discord.com/channels/1110799176264056863/1269986371142160478

Expected behavior

Messages shall not appear at a node twice for processing and relaying. Duplicates must be clearly filtered within the used time window of 2 min.

nwaku version/commit hash

Comes continuously since first tested and seen on v0.31.0 (probably not related to that release just we have not tested this way before)

Additional context

We have some hypotheses on how it can happen. Enough to have one malfunctioning / slow node - maybe due to low resources - that has stale async operation, specially on processing the message sending queue that would flash the message to the wire.
If that process is starving due to resource conditions, it can happen that message gets send out of the dup-check time window thus other nodes will not recognise it as duplicate and normal propagation will take place.

@NagyZoltanPeter NagyZoltanPeter added the bug Something isn't working label Aug 27, 2024
@NagyZoltanPeter NagyZoltanPeter self-assigned this Aug 27, 2024
@SionoiS
Copy link
Contributor

SionoiS commented Sep 10, 2024

may be related libp2p/rust-libp2p#5504 (comment)

@NagyZoltanPeter
Copy link
Contributor Author

may be related libp2p/rust-libp2p#5504 (comment)

Thanks for it, it is exactly we are facing with!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In Progress
Development

No branches or pull requests

2 participants