From 46edd697b2564d2cf1269fe9059ed2198a47a946 Mon Sep 17 00:00:00 2001 From: Susant Palai Date: Mon, 22 Apr 2019 21:18:30 +0530 Subject: 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. Backport of: > Change-Id: I6d67f23979e7edd2695bdc6aab2997dae4a4060a > BUG: 1700865 > Signed-off-by: Susant Palai Change-Id: I6d67f23979e7edd2695bdc6aab2997dae4a4060a Updates: bz#1724210 Signed-off-by: Susant Palai --- libglusterfs/src/mem-pool.c | 1 - 1 file changed, 1 deletion(-) (limited to 'libglusterfs/src') 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 -- cgit