Project

General

Profile

Actions

Bug #42091

closed

bluefs: sync_metadata leaks dirty files if log_t is empty

Added by Xuehan Xu over 4 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
% Done:

0%

Source:
Tags:
Backport:
mimic, nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

When reading the source code, we found that, in the following code, if BlueFS::log_t is empty while there are BlueFS::dirty_files is not, the latter one would be leaked.

void BlueFS::sync_metadata()
{
  std::unique_lock l(lock);
  if (log_t.empty()) {
    dout(10) << __func__ << " - no pending log events" << dendl;
  } else {
    dout(10) << __func__ << dendl;
    utime_t start = ceph_clock_now();
    flush_bdev(); // FIXME?
    _flush_and_sync_log(l);
    dout(10) << __func__ << " done in " << (ceph_clock_now() - start) << dendl;
  }

  if (_should_compact_log()) {
    if (cct->_conf->bluefs_compact_log_sync) {
      _compact_log_sync();
    } else {
      _compact_log_async(l);
    }
  }
}

Related issues 2 (0 open2 closed)

Copied to bluestore - Backport #43086: mimic: bluefs: sync_metadata leaks dirty files if log_t is emptyRejectedNathan CutlerActions
Copied to bluestore - Backport #43087: nautilus: bluefs: sync_metadata leaks dirty files if log_t is emptyResolvedShyukri ShyukrievActions
Actions #2

Updated by Nathan Cutler over 4 years ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 30631
Actions #3

Updated by Kefu Chai over 4 years ago

  • Status changed from Fix Under Review to Pending Backport
  • Backport set to mimic, nautilus
Actions #4

Updated by Nathan Cutler over 4 years ago

  • Copied to Backport #43086: mimic: bluefs: sync_metadata leaks dirty files if log_t is empty added
Actions #5

Updated by Nathan Cutler over 4 years ago

  • Copied to Backport #43087: nautilus: bluefs: sync_metadata leaks dirty files if log_t is empty added
Actions #6

Updated by Nathan Cutler about 3 years ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Actions

Also available in: Atom PDF