Bug 2159307 - mds/PurgeQueue: don't consider filer_max_purge_ops when _calculate_ops
Summary: mds/PurgeQueue: don't consider filer_max_purge_ops when _calculate_ops
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: CephFS
Version: 5.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 6.1
Assignee: Dhairya Parmar
QA Contact: Hemanth Kumar
Akash Raj
URL:
Whiteboard:
Depends On: 2159301
Blocks: 2192813
TreeView+ depends on / blocked
 
Reported: 2023-01-09 11:18 UTC by Dhairya Parmar
Modified: 2023-06-15 09:17 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
.Integer overflow and `ops_in_flight` value overflow no longer happens Previously, `_calculate_ops` would rely on a configuration option `filer_max_purge_ops`, which could be modified on the fly too. Due to this, if the value of `ops_in_flight` is set to more than `uint64`’s capability, then there would be an integer overflow, and this would make `ops_in_flight` far more greater than `max_purge_ops` and it would not be able to go back to a reasonable value. With this fix, the usage of `filer_max_purge_ops` in `ops_in_flight` is ignored, since it is already used in `Filer::_do_purge_range()`. Integer overflow and `ops_in_flight` value overflow no longer happens.
Clone Of: 2159301
Environment:
Last Closed: 2023-06-15 09:16:27 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ceph ceph pull 49655 0 None Merged quincy: mds/PurgeQueue: don't consider filer_max_purge_ops when _calculate_ops 2023-04-10 21:31:11 UTC
Red Hat Issue Tracker RHCEPH-5893 0 None None None 2023-01-09 11:30:49 UTC
Red Hat Product Errata RHSA-2023:3623 0 None None None 2023-06-15 09:17:39 UTC

Description Dhairya Parmar 2023-01-09 11:18:26 UTC
+++ This bug was initially created as a clone of Bug #2159301 +++

Description of problem:
_calculate_ops relying on a config which can be modified on the fly will cause a bug. e.g.

A file has 20 objects and filer_max_purge_ops config was 10.
calling PurgeQueue::_execute_item and _calculate_ops returns 10, so ops_in_flight add 10.
adjust filer_max_purge_ops to 20 on the fly
calling PurgeQueue::_execute_item_complete and _calculate_ops returns 20, so ops_in_flight dec 20.
since ops_in_flight is uint64, this cause an overflow which makes ops_in_flight far more greater than max_purge_ops and can't go back to a reasonable value.
filer_max_purge_ops will still work when _do_purge_range, so it's ok to ignore it here.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from RHEL Program Management on 2023-01-09 11:16:54 UTC ---

Please specify the severity of this bug. Severity is defined here:
https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity.

Comment 1 RHEL Program Management 2023-01-09 11:18:39 UTC
Please specify the severity of this bug. Severity is defined here:
https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity.

Comment 3 Ken Dreyer (Red Hat) 2023-04-10 21:31:11 UTC
https://github.com/ceph/ceph/pull/49655 is in v17.2.6

Comment 10 errata-xmlrpc 2023-06-15 09:16:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Red Hat Ceph Storage 6.1 security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:3623


Note You need to log in before you can comment on or make changes to this bug.