monit-dev
[Top][All Lists]
Advanced

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

Re: [monit-dev] Assertion failure in 4.10.1


From: Martin Pala
Subject: Re: [monit-dev] Assertion failure in 4.10.1
Date: Tue, 25 Mar 2008 22:23:34 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.12) Gecko/20080129 Iceape/1.1.8 (Debian-1.1.8-4)

Hi,

the problem is fixed in CVS ... it was triggered by the combination of the "if changed checksum" test and "restart" action which freed the checksum before xstrdup was called.


Thanks for report and great description/details :)

Martin


Brian Candler wrote:
Finally: the crash goes away with this patch, which was the only thing I
could think of trying without digging further into the code to find out why
s->inf->cs_sum was null at that point (and why this problem affects me and
not anyone else):

--- validate.c.orig     2008-03-25 16:17:44.000000000 +0000
+++ validate.c  2008-03-25 16:18:03.000000000 +0000
@@ -985,11 +985,11 @@

       /* if we are testing for changes only, the value is variable */
       if(cs->test_changes) {
-        Event_post(s, EVENT_CHANGED, STATE_FAILED, cs->action,
-          "checksum was changed for %s", s->path);
         /* reset expected value for next cycle */
         FREE(cs->hash);
         cs->hash= xstrdup(s->inf->cs_sum);
+        Event_post(s, EVENT_CHANGED, STATE_FAILED, cs->action,
+          "checksum was changed for %s", s->path);
       } else {
         /* we are testing constant value for failed or passed state */
         Event_post(s, EVENT_CHECKSUM, STATE_FAILED, cs->action,

Unfortunately this isn't a solution, as the file monitoring status changes
to "not monitored" after one change to the file, and any further changes to
the file do not cause the daemon to be restarted. This of course could just
be user error, and maybe there's a correct way to do what I'm trying to do.

Regards,

Brian.


_______________________________________________
monit-dev mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/monit-dev




reply via email to

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