Page MenuHomeClusterLabs Projects

Running under callgrind doesn't work
Closed (Merged)Public

Description

If you enable callgrind in /etc/sysconfig/pacemaker, the cluster daemons fail to start in a way that's not especially helpful:

Jun 04 14:53:35.763 rhel9-scratch-1 pacemakerd          [1904] (pcmk_child_exit@pcmkd_subdaemons.c:296)         error: pacemaker-based[1905] exited with status 1 (Error occurred)

There's no indication of a core dump or any other failure, and the exec call that spawns the process doesn't return any error code. It's also very difficult to get stdout/stderr here to see what callgrind might be having a problem with. Note that running under just valgrind still works.

Event Timeline

clumens created this task.
clumens created this object with edit policy "Pacemaker (Project)".

If you capture stdout and stderr in start_child just before calling execlp, you'll see the following:

valgrind: Unknown option: --leak-check=full
valgrind: Use --help for more information or consult the user manual.

In other words, the callgrind tool doesn't support this memcheck-specific option. These values come from VALGRIND_OPTS in /etc/sysconfig/pacemaker. So, our defaults do not work for callgrind. I think probably the best way to fix this is just to document it since callgrind is a less well known and less frequently used tool.