diff options
author | Mohit Agrawal <moagrawa@redhat.com> | 2016-06-13 12:41:15 +0530 |
---|---|---|
committer | Jeff Darcy <jdarcy@redhat.com> | 2016-06-24 06:23:51 -0700 |
commit | 2ee48474be32f6ead2f3834677fee89d88348382 (patch) | |
tree | 42c50ef16d3cc6945507f3b08d97babb5316f6b5 /libglusterfs/src/common-utils.h | |
parent | 7a1c1e2904701496968ed14b6d7479fb706c3188 (diff) |
rpc/socket.c: Modify approach to cleanup threads of socket_poller in socket_spawn.
Problem: Current approach to cleanup threads of socket_poller is not appropriate.
Solution: Enable detach flag at the time of thread creation in socket_spawn.
Fix: Write a new wrapper(gf_create_detach_thread) to create detachable thread
instead of store thread ids in a queue.
Test: Fix is verfied on gluster process, To test the patch followed below procedure
Enable the client.ssl and server.ssl option on the volume
Start the volume and count anon segment in pmap output for glusterd process
pmap -x <glusterd-pid> | grep "\[ anon \]" | wc -l
Stop the volume and check again count of anon segment it should not increase.
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
Change-Id: Ib8f7ec7504ec8f6f74b45ce6719b6fb47f9fdc37
BUG: 1336508
Reviewed-on: http://review.gluster.org/14694
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'libglusterfs/src/common-utils.h')
-rw-r--r-- | libglusterfs/src/common-utils.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h index 09d585ad9c3..4741d430a03 100644 --- a/libglusterfs/src/common-utils.h +++ b/libglusterfs/src/common-utils.h @@ -766,6 +766,9 @@ int gf_set_timestamp (const char *src, const char* dest); int gf_thread_create (pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg); +int gf_thread_create_detached (pthread_t *thread, + void *(*start_routine)(void *), void *arg); + gf_boolean_t gf_is_service_running (char *pidfile, int *pid); int |