[Pacemaker] cib still leaks in pacemaker-1.0.3

Andrew Beekhof andrew at beekhof.net
Wed May 13 18:51:21 UTC 2009


On Wed, May 13, 2009 at 7:41 PM, Dejan Muhamedagic <dejanmm at fastmail.fm> wrote:
> Hi,
>
> On Wed, May 13, 2009 at 05:36:40PM +0200, Nikola Ciprich wrote:
>> > holy <redacted>!
>> yes! exactly! :)
>>
>> > sure
>> > in theory you can just add "crm valgrind" instead of "crm yes" in ha.cf
>>
>> hmm, i tried that now, but all I got is:
>> May 13 16:46:16 faxb heartbeat: [1655]: ERROR: Heartbeat was not compiled with --enable-libc-malloc, "crm valgrind" is therefor not supported.
>>
>> So I wanted to compile myself, but I see this option neither in
>> pacemaker's configure, nor in heartbeat's.  But I noticed
>> --enable-valgrind option for heartbeat configure,
>> but enabling it and recompiling the heartbeat didn't help.  so
>> maybe this part needs some updating?
>
> Looks like it. Just pushed a patch for that. Can you try again
> with the new tarball:
>
> http://hg.linux-ha.org/dev/archive/6467be4d4cb7.tar.bz2

Thanks Dejan!

Nikola, I also suggest the following two patches

diff -r 4038c4644964 configure.in
--- a/configure.in	Wed May 13 17:07:22 2009 +0200
+++ b/configure.in	Wed May 13 20:48:05 2009 +0200
@@ -2799,17 +2799,14 @@ AC_ARG_WITH(valgrind-suppress,
     [ VALGRIND_SUPP="/dev/null" ])

 if test "x" = "x$VALGRIND_LOG"; then
-    VALGRIND_LOG="--log-socket=127.0.0.1:1234"
-    AC_MSG_NOTICE(Set default Valgrind options to: $VALGRIND_OPTS)
-    AC_MSG_NOTICE(Remember to start a receiver on localhost:1234)
+    VALGRIND_LOG="--log-file=/tmp/crm-%p.valgrind"
 fi

-AC_PATH_PROG(VALGRIND_BIN, valgrind)
 if test "xyes" = "x$enable_valgrind" -a "x$VALGRIND_BIN" != "x"; then
    enable_libc_malloc=yes
 fi

-AC_DEFINE_UNQUOTED(VALGRIND_BIN, "$VALGRIND_BIN", Valgrind command)
+AC_DEFINE_UNQUOTED(VALGRIND_BIN, "valgrind", Valgrind command)
 AC_DEFINE_UNQUOTED(VALGRIND_LOG, "$VALGRIND_LOG", Valgrind logging options)
 AC_DEFINE_UNQUOTED(VALGRIND_SUPP, "$VALGRIND_SUPP", Name of a
suppression file to pass to Valgrind)

diff -r 4038c4644964 crm/crmd/subsystems.c
--- a/crm/crmd/subsystems.c	Wed May 13 17:07:22 2009 +0200
+++ b/crm/crmd/subsystems.c	Wed May 13 20:48:05 2009 +0200
@@ -148,6 +148,7 @@ start_subsystem(struct crm_subsystem_s*	
 	unsigned int	j;
 	struct rlimit	oflimits;
 	const char 	*devnull = "/dev/null";
+	const char	*grind = getenv("HA_VALGRIND_ENABLED");

 	crm_info("Starting sub-system \"%s\"", the_subsystem->name);
 	set_bit_inplace(fsa_input_register, the_subsystem->flag_required);
@@ -211,7 +212,8 @@ start_subsystem(struct crm_subsystem_s*	
 	(void)open(devnull, O_WRONLY);	/* Stdout: fd 1 */
 	(void)open(devnull, O_WRONLY);	/* Stderr: fd 2 */
 	
-	if(getenv("HA_VALGRIND_ENABLED") != NULL) {
+	if(grind != NULL
+	   && (crm_is_true(grind) || strstr(grind, the_subsystem->name))) {
 		char *opts[] = { crm_strdup(VALGRIND_BIN),
  				 crm_strdup("--show-reachable=yes"),
 				 crm_strdup("--leak-check=full"),




More information about the Pacemaker mailing list