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

Tokio async flush stuck with big files #4301

Closed
davxy opened this issue Oct 15, 2022 · 2 comments
Closed

Tokio async flush stuck with big files #4301

davxy opened this issue Oct 15, 2022 · 2 comments
Labels
C-bug Category: This is a bug R-duplicate Duplicated issue: please refer to the linked issue

Comments

@davxy
Copy link
Contributor

davxy commented Oct 15, 2022

Summary

The async flush hangs it the file lenght is greater than ~1M.

In particular this async call never returns:

writer.flush().await?;

Reproducible creating a "big enough file" and exiting the editor with :wq.

After some tests I was able to find out the exact amount of bytes required to get the flush stuck.
This value (on machine) is exactly : 1,030,385 bytes

Note: the bug doesn't trigger if a write and quit in two separate actions.

Reproduction Steps

  1. Create a file big enough (1040385 bytes on my machine)
tr -dc A-Za-z0-9 < /dev/random | head -c 1040385 > test.txt
  1. Open it in Helix.
  2. Hit :wq in normal mode to exit

Platform

Linux

Terminal Emulator

Alacritty

Helix Version

helix 22.08.1 (66276ce)

@davxy davxy added the C-bug Category: This is a bug label Oct 15, 2022
@Ordoviz
Copy link
Contributor

Ordoviz commented Oct 15, 2022

1040385 is exactly the amount of bytes that causes #3975, which will be fixed by #2267.

@the-mikedavis
Copy link
Member

Duplicate of #3975

@the-mikedavis the-mikedavis marked this as a duplicate of #3975 Oct 15, 2022
@the-mikedavis the-mikedavis closed this as not planned Won't fix, can't repro, duplicate, stale Oct 15, 2022
@the-mikedavis the-mikedavis added the R-duplicate Duplicated issue: please refer to the linked issue label Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug R-duplicate Duplicated issue: please refer to the linked issue
Projects
None yet
Development

No branches or pull requests

3 participants