Project

General

Profile

Bug #13443

Ceph-fuse won't start correctly when the option log_max_new in ceph.conf set to zero

Added by Wenjun Huang almost 3 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
10/10/2015
Due date:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
infernalis
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
fs
Component(FS):
Labels (FS):

Description

We found a bug in ceph-fuse when we set log_max_new = 0 in ceph.conf, which will lead ceph-fuse process hang when it is started. We set this option, because we want to minimize the memory used by logging subsystem.
After checking the related code, we found something incorrect in main methods within ceph_fuse.cc.
The suspicious code snippet is below:

  if (childpid == 0) {
    common_init_finish(g_ceph_context);

    //cout << "child, mounting" << std::endl;
    ::close(fd[0]);

    if (restart_log)
      g_ceph_context->_log->start();


The hang event happens when executing common_init_finish(g_ceph_context), and in AdminSocket::init it hits
ldout(m_cct, 5) << "init " << path << dendl;

This will depend on log subsystem working properly. But till then, the Log thread haven't been started in the child process.
So, I think we should start the log thread before the common_init_finish method. As far as I know to fix this issue is to bring g_ceph_context->_log->start(); before common_init_finish(g_ceph_context);


Related issues

Copied to fs - Backport #13593: Ceph-fuse won't start correctly when the option log_max_new in ceph.conf set to zero Resolved

Associated revisions

Revision f2763085 (diff)
Added by wenjunhuang almost 3 years ago

ceph-fuse.cc: While starting ceph-fuse, start the log thread first

http://tracker.ceph.com/issues/13443 Fixes: #13443

Signed-off-by: Wenjun Huang <>

Revision 34d0b692 (diff)
Added by wenjunhuang almost 3 years ago

ceph-fuse.cc: While starting ceph-fuse, start the log thread first

http://tracker.ceph.com/issues/13443 Fixes: #13443

Signed-off-by: Wenjun Huang <>
(cherry picked from commit f2763085754462610730a23bb5652237714abc2a)

History

#1 Updated by Wenjun Huang almost 3 years ago

I have made a pull request here https://github.com/ceph/ceph/pull/6224

#2 Updated by Nathan Cutler almost 3 years ago

  • Status changed from New to Need Review
  • Source changed from other to Community (dev)

#3 Updated by Sage Weil almost 3 years ago

  • Status changed from Need Review to Pending Backport
  • Backport set to infernalis

#4 Updated by Greg Farnum almost 3 years ago

  • Project changed from rgw to fs

#5 Updated by Nathan Cutler almost 3 years ago

  • Copied to Backport #13593: Ceph-fuse won't start correctly when the option log_max_new in ceph.conf set to zero added

#6 Updated by Loic Dachary over 2 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF