From a1ebee3b0a8cf4526ab396ae8cad55634fad17fc Mon Sep 17 00:00:00 2001 From: Jeff Darcy Date: Thu, 18 Jul 2013 09:55:22 -0400 Subject: core: avoid infinite mutual recursion between THIS and gf_log This caused a stack overflow when (for some unknown reason) pthread_setspecific was failing. Therefore __glusterfs_this_location called gf_log which used THIS which wraps __glusterfs_this_location which . . . you get the idea. We have to break the loop somewhere, and we can't reasonably make _gf_log stop using THIS, so we make __glusterfs_this_location stop using _gf_log. Change-Id: I79c3ea40dd7980bb8ac76a52cdbf5c057b2e1c3c Signed-off-by: Jeff Darcy Reviewed-on: http://review.gluster.org/5341 Reviewed-by: Krishnan Parthasarathi Reviewed-by: Raghavendra G Reviewed-by: Raghavendra Bhat Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- libglusterfs/src/globals.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/globals.c b/libglusterfs/src/globals.c index 072b1d52..459291b3 100644 --- a/libglusterfs/src/globals.c +++ b/libglusterfs/src/globals.c @@ -123,8 +123,6 @@ __glusterfs_this_location () ret = pthread_setspecific (this_xlator_key, this_location); if (ret != 0) { - gf_log ("", GF_LOG_WARNING, "pthread setspecific failed"); - FREE (this_location); this_location = NULL; goto out; -- cgit