Actions
Bug #15695
closedFileStore: umount hang because sync thread doesn't exit
% Done:
0%
Source:
Community (dev)
Tags:
Backport:
jewel
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
int FileStore::umount()
......
do_force_sync();
lock.Lock();
stop = true;
sync_cond.Signal();
lock.Unlock();
because force_sync flag isn't protect by the same lock acquire, it will sync thread wait two times which isn't expected:
utime_t startwait = ceph_clock_now(g_ceph_context);
if (!force_sync) {
dout(20) << "sync_entry waiting for max_interval " << max_interval << dendl;
sync_cond.WaitInterval(g_ceph_context, lock, max_interval);
} else {
dout(20) << "sync_entry not waiting, force_sync set" << dendl;
}
if (force_sync) {
dout(20) << "sync_entry force_sync set" << dendl;
force_sync = false;
} else {
// wait for at least the min interval
utime_t woke = ceph_clock_now(g_ceph_context);
woke -= startwait;
dout(20) << "sync_entry woke after " << woke << dendl;
if (woke < min_interval) {
utime_t t = min_interval;
t -= woke;
dout(20) << "sync_entry waiting for another " << t
<< " to reach min interval " << min_interval << dendl;
sync_cond.WaitInterval(g_ceph_context, lock, t);
}
}
http://pulpito.ceph.com/haomai-2016-05-01_23:40:37-rados-wip-haomai-testing-distro-basic-smithi/161404/
http://pulpito.ceph.com/haomai-2016-05-01_23:40:37-rados-wip-haomai-testing-distro-basic-smithi/161419
These two jobs all stuck into this case, and WaitInterval for 10hours because of cmd line arguments!:
ceph_test_filestore_idempotent_sequence run-sequence-to 0 b.00 b.00/journal --test-seed 59 --osd-journal-size 100 --log-file b.00.clean --debug-filestore 20 --filestore-min-sync-interval 36000 --filestore-max-sync-interval 36001
Actions