summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusant Palai <spalai@redhat.com>2019-04-22 21:18:30 +0530
committerSusant Palai <spalai@redhat.com>2019-04-22 21:26:49 +0530
commit132f03a0b77980b25a8b499ad1fe1e4ab2aee40e (patch)
treec4d51afe5f3d50ab5ebf980c7eafca7dd0eb831f
parenta0814b96828505441fbb7f1801e751d98f5a1cc0 (diff)
core: fix hang issue in __gf_free
Currently GF_ASSERT is done under mem_accounting lock at some places. On a GF_ASSERT failure, gf_msg_callingfn is called which calls gf_malloc internally and it takes the same mem_accounting lock leading to deadlock. This is a temporary fix to avoid any hang issue in master. https://review.gluster.org/#/c/glusterfs/+/22589/ is being worked on in the mean while so that GF_ASSERT can be used under mem_accounting lock. Change-Id: I6d67f23979e7edd2695bdc6aab2997dae4a4060a updates: bz#1700865 Signed-off-by: Susant Palai <spalai@redhat.com>
-rw-r--r--libglusterfs/src/mem-pool.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/libglusterfs/src/mem-pool.c b/libglusterfs/src/mem-pool.c
index d717e9ffab9..9b4ea520b84 100644
--- a/libglusterfs/src/mem-pool.c
+++ b/libglusterfs/src/mem-pool.c
@@ -327,7 +327,6 @@ __gf_free(void *free_ptr)
LOCK(&mem_acct->rec[header->type].lock);
{
- GF_ASSERT(mem_acct->rec[header->type].size >= header->size);
mem_acct->rec[header->type].size -= header->size;
mem_acct->rec[header->type].num_allocs--;
/* If all the instances are freed up then ensure typestr is set