Project

General

Profile

Bug #22296

Librgw shutdown uncorreclty

Added by Tao CHEN about 1 year ago. Updated 12 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
Start date:
12/01/2017
Due date:
% Done:

0%

Source:
other
Tags:
librgw
Backport:
luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

Hi,

I'm recently using nfs-ganesha over RGW to do some test. I find that each time when nfs-ganesha shutdown, the librgw socket file still exists. Next time if I rerun nfs-ganesha, a new librgw socket file will be created, the old one is never reused.

Here is my investigation:

  int RGWLib::stop()
  {
    derr << "shutting down" << dendl;

    fe->stop();
    fe->join();

    delete fe;
    delete fec;
    delete ldh;

    rgw_log_usage_finalize();

    delete olog;

    RGWStoreManager::close_storage(store);

    ...
   }

When librgw begins to shutdown, the above code will be invoked. fe->stop() will send SIGUSR1 to frontend thread:

void RGWProcessFrontend::stop()
{
  pprocess->close_fd();
  thread->kill(SIGUSR1);
}

However, SIGUSR1 has default action Term, which will terminate the whole process, as a consequence, the code following fe->stop() will not be executed, so the librgw socket fil is not be deleted.

I think that we can add a signal handler for SIGUSR1 in order to avoid this.


Related issues

Copied to rgw - Backport #22767: luminous: Librgw shutdown uncorreclty Resolved

History

#2 Updated by Matt Benjamin about 1 year ago

@Tao Thanks for your work debugging this. This removes the crash, but I'm not certain whether we should really be sending a signal to a consumer thread in the first place, so possibly we can avoid needing a handler.

#3 Updated by Casey Bodley about 1 year ago

  • Status changed from New to Testing

#4 Updated by Yehuda Sadeh about 1 year ago

  • Status changed from Testing to Pending Backport
  • Backport set to luminous

#5 Updated by Nathan Cutler 12 months ago

#6 Updated by Nathan Cutler 12 months ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF