I have some CI tests that run some tests under valgrind, and fail if there are any errors (as reported in valgrind's ERROR SUMMARY
).
On certain Linux distros, I get that there was 1 error from 1 context
, but no error is shown anywhere. Further puzzling is that it says suppressed: 3 from 3
, and I can't find in the documentation how that relates to the errors (how can 3 errors have been suppressed if there was only 1? Or does this mean 3 errors were suppressed, and 1 was not? In which case, what's the error that wasn't suppressed?).
I've been using valgrind for many years, and I've never seen this before. Normally, valgrind is very verbose and will show any kind of error (with a few flags), but it doesn't seem to be in this case.
Comparing with other builds that don't cause this, this seems like it might be specific to newer versions of valgrind, but I'm not positive about that.
I'm currently calling valgrind as valgrind --show-error-list=yes --keep-debuginfo=yes --leak-check=full --track-fds=yes --track-origins=yes --show-leak-kinds=all --suppressions=../valgrind.supp --log-file=LOGFILE --tool=memcheck
I also tried adding the -v
option, but that didn't add anything useful to the output, just a bunch of noise.
Is there some way I can see what the 1 error is that it's warning about?
==2393== Memcheck, a memory error detector
==2393== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al.
==2393== Using Valgrind-3.24.0 and LibVEX; rerun with -h for copyright info
==2393== Command: REDACTED
==2393== Parent PID: 2390
==2393==
==2393==
==2393== FILE DESCRIPTORS: 3 open (2 std) at exit.
==2393== Open file descriptor 4:
==2393== <inherited from parent>
==2393==
==2393==
==2393== HEAP SUMMARY:
==2393== in use at exit: 483,343 bytes in 547 blocks
==2393== total heap usage: 249,108 allocs, 248,561 frees, 157,975,718 bytes allocated
==2393==
==2393== LEAK SUMMARY:
==2393== definitely lost: 0 bytes in 0 blocks
==2393== indirectly lost: 0 bytes in 0 blocks
==2393== possibly lost: 0 bytes in 0 blocks
==2393== still reachable: 0 bytes in 0 blocks
==2393== suppressed: 481,327 bytes in 526 blocks
==2393==
==2393== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 3 from 3)
--2393--
--2393-- used_suppression: 3 BACKTRACE_libbfd_bfd_elf_find_nearest_line ../valgrind.supp:138 suppressed: 408,073 bytes in 5 blocks
--2393-- used_suppression: 35 DLOPEN ../valgrind.supp:49 suppressed: 23,772 bytes in 35 blocks
--2393-- used_suppression: 139 DLOPEN ../valgrind.supp:781 suppressed: 24,016 bytes in 152 blocks
--2393-- used_suppression: 242 GMIME_INIT ../valgrind.supp:617 suppressed: 16,984 bytes in 242 blocks
--2393-- used_suppression: 6 GOBJECT_init ../valgrind.supp:397 suppressed: 5,120 bytes in 6 blocks
--2393-- used_suppression: 5 DLOPEN ../valgrind.supp:39 suppressed: 1,462 bytes in 19 blocks
--2393-- used_suppression: 3 dtv-addr-init /usr/libexec/valgrind/default.supp:1575 suppressed: 308 bytes in 3 blocks
--2393-- used_suppression: 29 GOBJECT_init ../valgrind.supp:357 suppressed: 616 bytes in 29 blocks
--2393-- used_suppression: 2 DLCLOSE ../valgrind.supp:833 suppressed: 224 bytes in 6 blocks
--2393-- used_suppression: 23 DLOPEN ../valgrind.supp:755 suppressed: 504 bytes in 23 blocks
--2393-- used_suppression: 1 GLIB_GOBJECT ../valgrind.supp:287 suppressed: 56 bytes in 1 blocks
--2393-- used_suppression: 4 GLIB ../valgrind.supp:277 suppressed: 152 bytes in 4 blocks
--2393-- used_suppression: 1 GOBJECT ../valgrind.supp:200 suppressed: 40 bytes in 1 blocks
==2393==
==2393== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 3 from 3)