bug-cfengine
[Top][All Lists]
Advanced

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

RE: Definitely a bug in locking.


From: Eric Sorenson
Subject: RE: Definitely a bug in locking.
Date: Mon, 21 Mar 2005 15:01:13 -0800 (PST)

On Mon, 21 Mar 2005, Cole, William wrote:

> GetLock(copy,_var_cfengine_master_etc_sudoers__usr_local_etc_sudoers_sysadm0
> 5_abh_vw_com,time=1111156198), ExpireAfter=60, IfElapsed=1
> > > GetLastLock()
> > > cfengine:asgqd545: Nothing scheduled for copy. (0/1 minutes elapsed) 
> 
> The first and last are generated by lines 212 and 257/258 respectively in
> locks.c, inside the GetLock function. The last line is constructed thus:
> 
>    snprintf(OUTPUT,CF_BUFSIZE*2,"Nothing scheduled for %s.%s (%u/%u minutes
> elapsed\n",operator,operand,elapsedtime,ifelapsed);
> 
> Note that 'operand' seems to have become null!
> 

CanonifyName strikes again!!

> This test was against a version downloaded 3/14/05 calling itself 2.1.14.
> The locks.c appears to be identical to the one in the Subversion repository.
> 
> 
> I have just downloaded the latest snapshot and will try running the cfagent
> from it to see if the same thing happens. 

There is a change in locks.c , to avoid calling CanonifyName twice 
from teh same snprintf. do 'svn diff -r PREV locks.c' to see what 
changed. If the problem still exists, this change did not actually fix 
the problem with static storage. (About which I understand less than I 
thought I did a week or two ago)

-- 
 - Eric Sorenson - N37 17.255 W121 55.738 - http://eric.explosive.net -
 - Personal colo with a professional touch - http://www.explosive.net -




reply via email to

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