ci: Run everything in Nulgrind or Valgrind #29900

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2404-Nulgrind,- changing 6 files +12 −10
  1. maflcko commented at 12:39 pm on April 17, 2024: member

    Currently segmentation faults or core dumps do not result in a stacktrace. This is problematic when debugging issues, such as #29889 (comment)

    Fix it by running everything in Nulgrind, which has less overhead than Valgrind, unless Valgrind is already selected.

  2. ci: Run everything in Nulgrind or Valgrind 292e9b8fb8
  3. DrahtBot commented at 12:39 pm on April 17, 2024: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

  4. DrahtBot added the label Tests on Apr 17, 2024
  5. maflcko commented at 12:45 pm on April 17, 2024: member

    I looked into many alternatives, such as gdb --batch --ex ..., or catchsegv, but none of them worked in the CI setting.

    I think the only reasonable alternative would be to implement a signal handler in the C++ code.

    Another alternative would be to wait for C++ (or compilers) to port RUST_BACKTRACE, but that seems unlikely, or at least far out in the feature.

  6. in ci/test/wrap-valgrind.sh:15 in 292e9b8fb8
    11@@ -12,7 +12,11 @@ for b_name in "${BASE_OUTDIR}/bin"/*; do
    12       echo "Wrap $b ..."
    13       mv "$b" "${b}_orig"
    14       echo '#!/usr/bin/env bash' > "$b"
    15-      echo "valgrind --gen-suppressions=all --quiet --error-exitcode=1 --suppressions=${BASE_ROOT_DIR}/contrib/valgrind.supp \"${b}_orig\" \"\$@\"" >> "$b"
    16+      if [ -n "$USE_VALGRIND" ]; then
    


    paplorinc commented at 1:08 pm on April 17, 2024:
    Not sure I fully understand the consequences here, but do we want to replace the files with empty ones when USE_VALGRIND is false? Shouldn’t we execute the old ones in that case?
  7. maflcko commented at 3:40 pm on April 17, 2024: member
    I guess this is too fragile to be useful
  8. maflcko closed this on Apr 17, 2024

  9. maflcko deleted the branch on Apr 17, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-09-28 22:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me