Project

General

Profile

Bug #37766

rados_shutdown hang forever in ~objecter()

Added by peng wang 6 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Performance/Resource Usage
Target version:
-
Start date:
12/27/2018
Due date:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
luminous,mimic
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
rbd
Component(RADOS):
Objecter
Pull request ID:

Description

we use tbd todo some test over, and shutdown our client, then it hang for a long time, and did't go on ever.

it looks like code has some question :
src/common/ceph_timer.h

void timer_thread() {
...
l.unlock();
e.f();
l.lock();

...
if (schedule.empty())
cond.wait(l);
else
cond.wait_until(l, schedule.begin()->t);
...
}
~timer() {
suspend();
cancel_all_events();
}
// Suspend operation of the timer (and let its thread die).
void suspend() {
unique_lock l(lock);
if (suspended)
return;
suspended = true;
cond.notify_one();
l.unlock();
thread.join();
}

once called suspend ,but thread is in e.f(),
and schedule is empty, it will hang forever.
shutdown will not go on.

bug.jpg View (369 KB) peng wang, 12/27/2018 08:40 AM


Related issues

Copied to RADOS - Backport #38398: mimic: rados_shutdown hang forever in ~objecter() Resolved
Copied to RADOS - Backport #38400: luminous: rados_shutdown hang forever in ~objecter() Resolved

History

#1 Updated by Kefu Chai 6 months ago

  • Status changed from New to Need Review
  • Target version deleted (v10.2.11)
  • Backport set to luminous,mimic

#2 Updated by Kefu Chai 4 months ago

  • Pull request ID set to 26469

#3 Updated by Kefu Chai 4 months ago

  • Status changed from Need Review to Pending Backport

#4 Updated by Nathan Cutler 4 months ago

  • Copied to Backport #38398: mimic: rados_shutdown hang forever in ~objecter() added

#5 Updated by Nathan Cutler 4 months ago

  • Copied to Backport #38400: luminous: rados_shutdown hang forever in ~objecter() added

#6 Updated by Nathan Cutler 3 months ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF