-
-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2528 from jimklimov/issue-2523
Implement parallel IPMI scanning in `nut-scanner`, and address some `valgrind` complaints
- Loading branch information
Showing
25 changed files
with
1,194 additions
and
324 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
{ | ||
<socketcall_sendto> | ||
Memcheck:Param | ||
socketcall.send(msg) | ||
fun:send | ||
... | ||
} | ||
{ | ||
<glibc_freeres> | ||
Memcheck:Free | ||
fun:free | ||
... | ||
fun:__libc_freeres | ||
... | ||
} | ||
{ | ||
<glibc_eh_alloc__see_bug_66339> | ||
Memcheck:Leak | ||
match-leak-kinds: reachable | ||
fun:malloc | ||
fun:pool | ||
fun:__static_initialization_and_destruction_0 | ||
fun:_GLOBAL__sub_I_eh_alloc.cc | ||
... | ||
} | ||
{ | ||
<libgcrypt_init> | ||
Memcheck:Leak | ||
match-leak-kinds: reachable | ||
fun:malloc | ||
... | ||
fun:_gcry_mpi_init | ||
fun:global_init | ||
... | ||
} | ||
{ | ||
<libssl_init_CRYPTO> | ||
Memcheck:Leak | ||
... | ||
fun:CRYPTO_* | ||
... | ||
} | ||
{ | ||
<libssl_init_SSL_CTX> | ||
Memcheck:Leak | ||
... | ||
fun:SSL_CTX_* | ||
... | ||
} | ||
{ | ||
<libssl_init_OPENSSL> | ||
Memcheck:Leak | ||
... | ||
fun:OPENSSL_* | ||
... | ||
} | ||
{ | ||
<ltdl_init> | ||
Memcheck:Leak | ||
fun:*alloc | ||
... | ||
fun:_dl_init | ||
... | ||
} | ||
{ | ||
<ltdl_init> | ||
Memcheck:Leak | ||
fun:*alloc | ||
... | ||
fun:_dl_new_object | ||
... | ||
} | ||
{ | ||
<ltdl_init> | ||
Memcheck:Leak | ||
fun:*alloc | ||
... | ||
fun:elf_machine_rela | ||
... | ||
} | ||
{ | ||
<ltdl_init> | ||
Memcheck:Leak | ||
fun:*alloc | ||
... | ||
fun:dl_open_worker | ||
... | ||
} | ||
{ | ||
<ltdl_init> | ||
Memcheck:Leak | ||
fun:*alloc | ||
... | ||
fun:_dlerror_run | ||
... | ||
} | ||
{ | ||
<nut-scanner-snmp-libinit> | ||
Memcheck:Leak | ||
... | ||
fun:init_snmp_once | ||
... | ||
} | ||
{ | ||
<nut-scanner-snmp-sess_open> | ||
Memcheck:Leak | ||
fun:*alloc | ||
... | ||
fun:wrap_nut_snmp_sess_open | ||
... | ||
} | ||
{ | ||
<nut-scanner-ipmi-ctxinit> | ||
Memcheck:Leak | ||
... | ||
fun:wrap_nut_ipmi_ctx_create | ||
... | ||
} | ||
{ | ||
<nut-scanner-avahi-clientinit> | ||
Memcheck:Leak | ||
... | ||
fun:wrap_nut_avahi_client_new | ||
... | ||
} | ||
{ | ||
# https://forums.freebsd.org/threads/named-semaphore-uninitialized-bytes.84850/ | ||
<glibc-sem_open> | ||
Memcheck:Cond | ||
... | ||
fun:sem_open | ||
... | ||
} | ||
{ | ||
<glibc-sem_trywait> | ||
Memcheck:Cond | ||
... | ||
fun:sem_trywait* | ||
... | ||
fun:start_thread | ||
... | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
VALGRIND resources | ||
================== | ||
|
||
Helper script and suppression file to analyze NUT binaries. | ||
|
||
Example use-case: | ||
---- | ||
:; make -ks -j && LD_LIBRARY_PATH=`pwd`/clients/.libs \ | ||
./scripts/valgrind/valgrind.sh ./tools/nut-scanner/nut-scanner -DDDDDD -m auto | ||
---- | ||
|
||
See also: | ||
|
||
* link:https://wiki.wxwidgets.org/Valgrind_Suppression_File_Howto[Valgrind Suppression File How-to] | ||
- Notably, add `--gen-suppressions=all --error-limit=no` to `valgrind` | ||
program options to generate suppression snippets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
|
||
# Copyright (C) 2024 by Jim Klimov <[email protected]> | ||
|
||
SCRIPTDIR="`dirname "$0"`" | ||
SCRIPTDIR="`cd "$SCRIPTDIR" && pwd`" | ||
|
||
LTEXEC="" | ||
[ -n "${LIBTOOL-}" ] || LIBTOOL="`command -v libtool`" 2>/dev/null | ||
[ -z "${LIBTOOL}" ] || LTEXEC="${LIBTOOL} --mode=execute " | ||
|
||
# TODO: Also wrap tool=callgrind e.g. via $0 symlink name? | ||
|
||
exec ${LTEXEC} \ | ||
valgrind \ | ||
--tool=memcheck --verbose \ | ||
--leak-check=full --show-reachable=yes --error-exitcode=1 --show-error-list=yes \ | ||
--trace-children=yes --track-fds=yes --show-leak-kinds=all --track-origins=yes \ | ||
--suppressions="${SCRIPTDIR}/.valgrind.supp" \ | ||
${VALGRIND_OPTIONS-} \ | ||
"$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.