Skip to content

possibility of an indefinite while loop when https stream reader thread notifies and the other thread has not yet read the condVar #102

@Abhinav-Upadhya-ni

Description

@Abhinav-Upadhya-ni

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,

Image

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions