help-cfengine
[Top][All Lists]
Advanced

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

Re: cfservd under load - db crash, MaxConnections


From: Eric Sorenson
Subject: Re: cfservd under load - db crash, MaxConnections
Date: Wed, 8 Dec 2004 12:51:47 -0800 (PST)

On Wed, 8 Dec 2004 address@hidden wrote:

Just a note -- I have been and heard of people experiencing crashes
due to berkeley libraries that are incorrectly compiled. There are
so many versions now that it is easy to mix up header files and
libraries, leading to core dumps.

I have also seen this happen, but it's not what is happening here.  Normal db
access is not problematic, I strongly suspect it was just that the 'dynamic' db
file got corrupted from an earlier problem and subsequent accesses to it would
puke & die.  I have seen this happen with the berkdb files on Cyrus sometimes.

This report is mostly a suggestion for other people who have been seeing 
crashes.
There's nothing (AFAICT) to be lost by letting cfservd re-create dynamic.

I hope to be able to look into some recent bug reports in the next
few days. The end of semester (exams) is rather demanding at the
moment.

The other bug report's root cause was confirmed by Jim Wight. His mail
set me off on tracking this down, and here's the problem:

Running 'cfexecd -F' now invokes

snprintf(cfcom,CF_BUFSIZE-1,"%s/bin/cfagent -Q 
smtpserver,sysadm,fqhost,ipaddress,EmailMaxLines,EmailFrom,EmailTo -D 
fro$m_cfexecd",CFWORKDIR);

Which is intended to gather those variables from the parsed cfagent.conf
configs and return them on stdout, much like 'cfagent -z' returns the schedule.
However '-Q' does not short-circuit update.conf execution, but DOES ignore
splaytime! So it results in an immediate check of the inputs directory right
as 'cfexecd -F' gets triggered from cron. The attached patch should fix it:

diff -Naur cfengine-2.1.11/src/cfagent.c cfengine-2.1.11-eric/src/cfagent.c --- cfengine-2.1.11/src/cfagent.c 2004-10-26 00:44:31.000000000 -0700
+++ cfengine-2.1.11-eric/src/cfagent.c  2004-12-08 12:44:05.000000000 -0800
@@ -1734,6 +1734,7 @@
              }

           IGNORELOCK = true;
+          PARSEONLY = true;
           NOSPLAY = true;
           QUERYVARS = SplitStringAsItemList(optarg,',');
           break;



--

 - Eric Sorenson - Explosive Networking - http://eric.explosive.net -




reply via email to

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