github link to the commit:

https://github.com/malahal/ntirpc/commits/nthreads

Regards, Malahal.

Malahal Naineni [mala...@us.ibm.com] wrote:
> Noticed a thread hanging in thrdpool_shutdown(). gdb showed that it is
> waiting with pool->n_threads as 1. Code inspection showed that this is
> decremented without a lock.
> 
> Signed-off-by: Malahal Naineni <mala...@us.ibm.com>
> ---
>  src/thrdpool.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/thrdpool.c b/src/thrdpool.c
> index 8469cf4..a2f6dc3 100644
> --- a/src/thrdpool.c
> +++ b/src/thrdpool.c
> @@ -148,8 +148,8 @@ static void *thrdpool_start_routine(void *arg)
> 
>       /* cleanup thread context */
>       destroy_wait_entry(&thrd->ctx.we);
> -     --(thrd->pool->n_threads);
>       mutex_lock(&pool->we.mtx);
> +     --(thrd->pool->n_threads);
>       cond_signal(&pool->we.cv);
>       mutex_unlock(&pool->we.mtx);
>       mem_free(thrd, 0);
> -- 
> 1.8.3.1
> 


------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel

Reply via email to