Actions
Bug #22296
closedLibrgw shutdown uncorreclty
% 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.
Actions