From: Patrick Caulfield Date: Tue, 9 Aug 2005 10:39:57 +0000 (+0000) Subject: Don't send a signal to kill threads that are idling nicely as it upsets them. X-Git-Tag: v2_02_91~4790 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=4bb7474e8a146499dbbbc9c0509bca15bcd51882;p=lvm2.git Don't send a signal to kill threads that are idling nicely as it upsets them. This seems to cure bz#159727 on SMP systems. Alasdair, can you include this patch in the lvm2-cluster package please ? --- diff --git a/daemons/clvmd/clvmd.c b/daemons/clvmd/clvmd.c index 0e2b5a409..b9e2c8718 100644 --- a/daemons/clvmd/clvmd.c +++ b/daemons/clvmd/clvmd.c @@ -747,6 +747,7 @@ static int read_from_local_sock(struct local_client *thisfd) /* If the client went away in mid command then tidy up */ if (thisfd->bits.localsock.in_progress) { + pthread_kill(thisfd->bits.localsock.threadid, SIGUSR2); pthread_mutex_lock(&thisfd->bits.localsock.mutex); thisfd->bits.localsock.state = POST_COMMAND; pthread_cond_signal(&thisfd->bits.localsock.cond); @@ -763,7 +764,6 @@ static int read_from_local_sock(struct local_client *thisfd) thisfd->bits.localsock.state = PRE_COMMAND; pthread_cond_signal(&thisfd->bits.localsock.cond); pthread_mutex_unlock(&thisfd->bits.localsock.mutex); - pthread_kill(thisfd->bits.localsock.threadid, SIGUSR2); jstat = pthread_join(thisfd->bits.localsock.threadid,