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

reader_concurrency_semaphore: background reads can trigger assert failure when the reader is made inactive #12700

Closed
denesb opened this issue Feb 1, 2023 · 1 comment · Fixed by #12777
Assignees
Milestone

Comments

@denesb
Copy link
Contributor

denesb commented Feb 1, 2023

Since aab5954, readers request memory for I/O via request_memory() which returns a future<>. If memory usage is above the serialize limit, all such requests, except those that belong to the one blessed permit, will be queued for memory. This can be triggered from any I/O, including any background I/O the read is doing and when queued, the permit has its state changed to waiting_for_memory.
Such a read can be registered as inactive and currently this triggers an assert failure:

#6  0x0000000003e544f7 in reader_permit::impl::on_register_as_inactive (this=0x600005b1b200) at reader_concurrency_semaphore.cc:241
241             assert(_state == reader_permit::state::active_unused || _state == reader_permit::state::active_used);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants