help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hung cfservd


From: Mark Burgess
Subject: Re: hung cfservd
Date: Thu, 30 Jan 2003 08:49:35 +0100 (MET)

  Excellent! Good work! This is now fixed in the sources.

Mark



On 29 Jan, Wipf, Stefan wrote:
> I tried to prevent the clients from hanging by introducing
> an ExpireAfter but without success.
> 
> However, I have found the bug in cfservd.c:
> 
> at line 2040:  AuthenticationDialogue returns without releasing
> the mutex &MUTEX_SYSCALL if RSA_private_decrypt fails (as is
> the case when the client has a bad public key).  This will cause
> the next pthread_mutex_lock(&MUTEX_SYSCALL) to block forever.
> 
> 
> diff cfservd.c.fix  cfservd.c.original 
> 2040,2046d2039
> < /* release the lock on mutex SYSCALL */
> < /* prevents cfservd from freezing up when client connects with bad
> public key */
> < #if defined HAVE_PTHREAD_H && (defined HAVE_LIBPTHREAD || defined
> BUILDTIN_GCC_THREAD)
> < if (pthread_mutex_unlock(&MUTEX_SYSCALL) != 0) {
> <    CfLog(cferror,"pthread_mutex_unlock failed","lock");
> < }
> < #endif
> 
> 
> address@hidden wrote:
>>
>> On 29 Jan, Wipf, Stefan wrote:
>> > - by 'bouncing' cfservd I mean killing it and restarting it.
>> > - it's a Ultra-60 with 1 cpu
>> 
>> Ok - so this is something that I have never seen before.
>> Those of you that are having the problem need to figure out
>> what is going on. Try running both ends with  -d2 and see
>> if you get any clue.
>> 
>> Please check carefully that all versions are in synch, i.e.
>> client and server are the same version and the right version
>> of openssl is getting loaded if it's shared libs.
>> 
>> M
>> 
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> Work: +47 22453272            Email:  address@hidden
>> Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 

-- 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  address@hidden
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





reply via email to

[Prev in Thread] Current Thread [Next in Thread]