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

[POSTPONED] fix: Fix panic when sending 30 offline messages #4419

Closed
wants to merge 3 commits into from

Conversation

Hocuri
Copy link
Collaborator

@Hocuri Hocuri commented May 23, 2023

Fix #4414

This might not be needed after all because of
tokio-rs/tokio#5710, but since I already wrote the code, I created a PR anyway.

This might not be needed after all because of
tokio-rs/tokio#5710, but since I already wrote
the code, I created a PR anyway.
@Hocuri Hocuri changed the title fix: Fix tokio panic fix: Fix panic when sending 30 offline messages May 23, 2023
@Hocuri
Copy link
Collaborator Author

Hocuri commented Jun 8, 2023

tokio-rs/tokio#5710 didn't have any progress, so, seems like we are going to need the PR here, after all.

tokio::time::timeout(duration, async {
tools::timeout(duration, async {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Simon-Laux and me assume that this was the offending line:

At

timeout = Some(timeout.map_or(30, |timeout: u64| timeout.saturating_mul(3)))

we multiply the timeout by 3 every time a message can't be sent, whether . So, if the user sends 30 messages, idle_interrupt_receiver receives an interrupt every time, the message fails to be sent every time, and the timeout is multiplied by 3 every time.

@Hocuri
Copy link
Collaborator Author

Hocuri commented Jun 11, 2023

tokio-rs/tokio#5710 is merged 🎉 as soon as it's released, I'll update the PR here.

@Hocuri Hocuri changed the title fix: Fix panic when sending 30 offline messages [POSTPONED] fix: Fix panic when sending 30 offline messages Jun 11, 2023
@gerryfrancis
Copy link
Contributor

FYI, the new tokio version has been released. :)

@link2xt
Copy link
Collaborator

link2xt commented Jun 28, 2023

I am going to replace this PR with #4490, porting the test there and then upgrading tokio to 1.29.0.

@link2xt
Copy link
Collaborator

link2xt commented Jun 28, 2023

Replaced with #4490

@link2xt link2xt closed this Jun 28, 2023
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.

After 29 offline messages DC crashes
3 participants