diff options
author | anand <anekkunt@redhat.com> | 2015-05-22 18:18:11 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2015-06-16 21:15:11 -0700 |
commit | 6724ae3b3becdf6be495e8b4f81f1fba302da69e (patch) | |
tree | 9ec0c335630cea74ba3920f3999271ee3e724146 /xlators/mgmt/glusterd/src/glusterd.c | |
parent | 7bb10782fe10c4c1a5773b526e9c974342da94bd (diff) |
libglusterfs: Enabling the fini() in cleanup_and_exit()
Problem 1 : glusterd was crashing due to race between clean up thread and rpc event thread.
Scenario:
As we can observed, X thread is in the process of exiting the process. It has already
run the exit handlers, which cleanup things that require cleaning up. This includes
liburcu resources. By the time Y thread called rcu_bp_register(), the liburcu resources
have been cleaned up. rcu_bp_register() tries to access these non-existent resources,
which leads to the segmentation fault.
Note1:
Crash happen when the process is almost at the point of stopping(exiting), it doesn't have any
serious impact to functionality apart from creating the core dump file and the log message.
Fix .Do proper clean up before calling exit().
Note2: Other xlator have clean up issues,so only glusterd clean up function invoked.
Note3: This patch also solve the selinux issue.
Problem 2 : glusterd runs as rpm_script_t when it's executed from the rpm scriptlet,files created
in this context are set as rpm_script_t, so glusterd unable to access these files when it runs
in glusterd_t context.
Fix: Fini clean up the files while glusterd exiting, so files are recreated by glusterd while
starting with proper SElinux context label.
Backport of :
>Change-Id: Idcfd087f51c18a729bdf44a146f9d294e2fca5e2
>BUG: 1209461
>Signed-off-by: anand <anekkunt@redhat.com>
>Reviewed-on: http://review.gluster.org/10894
>Tested-by: Gluster Build System <jenkins@build.gluster.com>
>Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
>Tested-by: NetBSD Build System <jenkins@build.gluster.org>
>Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
>Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Change-Id: I59579e675bd73d7a19f7b965bd2c3c0fcd95d241
BUG: 1230026
Signed-off-by: anand <anekkunt@redhat.com>
Reviewed-on: http://review.gluster.org/11155
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.c')
0 files changed, 0 insertions, 0 deletions