Project

General

Profile

Bug #22296

Librgw shutdown uncorreclty

Added by Tao CHEN over 6 years ago. Updated about 6 years ago.

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

0%

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

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 over 6 years 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 6 years ago

  • Status changed from New to 7

#4 Updated by Yehuda Sadeh about 6 years ago

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

#5 Updated by Nathan Cutler about 6 years ago

#6 Updated by Nathan Cutler about 6 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF