Repository navigation
Conversation
An all-zero bluestore_cache_age_bins_* string (zeros are documented as "no items at that priority"), or an empty one, makes import_bins() call set_bin_count(0): circular_buffer::set_capacity(0) frees the ring, shift_bins() then inserts nothing, and the next insert into that cache dereferences age_bins.front() of an empty ring. The OSD segfaults within a second of mount, for the data, meta and both rocksdb caches. Clamp the ring to one bin in both set_bin_count() implementations. Fixes: https://tracker.ceph.com/issues/82941 Signed-off-by: Ming Lei <[email protected]>
Set all four age-bin lists to zeros with a 0.1 s bin interval, write, remount, and read after the mempool thread has imported the bins. The test segfaulted before the fix. Fixes: https://tracker.ceph.com/issues/82941 Signed-off-by: Ming Lei <[email protected]>
5 of 14 tasks
Contributor
|
Please explain value of this PR. |
Contributor
Author
An all-zero list means everything at the lowest priority, so it isn't wrong from interface viewpoint. And it is one segment fault, which is supposed to avoid in such situation. |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Zeros in
bluestore_cache_age_bins_*are documented as "no items at that priority", so an all-zero list means everything at the lowest priority. It also makesimport_bins()callset_bin_count(0):circular_buffer::set_capacity(0)frees the ring,shift_bins()then inserts nothing, and the next insert dereferencesage_bins.front()of an empty ring. The OSD segfaults within a second of mount, for the data, meta and both rocksdb caches. An empty or malformed string parses to no bins and crashes the same way.Clamp the ring to one bin in both
set_bin_count()implementations. Valid lists are unchanged. The added store test sets all four lists to zeros, remounts and reads; it segfaulted before the fix and passes with it.Fixes: https://tracker.ceph.com/issues/82941
Checklist