GoogleChrome / GoogleChrome/ripunzip
possibility of an indefinite while loop when https stream reader thread notifies and the other thread has not yet read the condVar
- Dominant language
- Rust
- Stars
- 294
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Description
Suppose a scenario, where we have 2 threads doing the read operation,
it is possible that when the thread has errored out, in say `read_exact` method, now when it tries to notify the other thread, it is possible that the other thread is somewhere between while loop and claiming the cache mutex, so the notification is missed,

and since it errored out in `read_exact`, it has not set the state.reader to the right state and is None, which can potentially cause missed notification and an indefinite while loop.
we should also add retries in case we face the issue when doing `read_exact`, especially if the error is Interrupted or UnexpectedEOF.
Contributor guide
Assessment
This issue has not been assessed yet.