script: de-dupe and update valgrind suppressions #18178

pull jonatack wants to merge 2 commits into bitcoin:master from jonatack:add-valgrind-suppressions changing 1 files +104 −15
  1. jonatack commented at 2:19 PM on February 19, 2020: contributor

    This PR de-dupes the current suppressions, then reduces the additional ones currently generated down to the minimal entries needed to run valgrind 3.16.0 with --exit-on-first-error=yes. Tested on Debian 4.19 x86/64. Feedback welcome.

    These suppressions allow running valgrind without errors on current master for...

    test_bitcoin:

      valgrind --leak-check=full --show-leak-kinds=all --show-reachable=yes \
               --gen-suppressions=all --error-limit=no -s \
               --suppressions=contrib/valgrind.supp \
               src/test/test_bitcoin --log_level=test_suite
    

    bench_bitcoin:

      valgrind --leak-check=full --show-leak-kinds=all --show-reachable=yes \
               --gen-suppressions=all --error-limit=no -s \
               --suppressions=contrib/valgrind.supp \
               src/bench/bench_bitcoin -evals=1
    

    test_bitcoin-qt:

      valgrind --leak-check=full --show-leak-kinds=all --show-reachable=yes \
               --gen-suppressions=all --error-limit=no -s \
               --suppressions=contrib/valgrind.supp \
               src/qt/test/test_bitcoin-qt --log_level=test_suite
    

    and with make check-valgrind in PR #17639 which runs them all.

  2. valgrind: remove duplicate suppressions 5731a80def
  3. valgrind: add suppressions for unit/bench/qt tests
    This commit began with the suppressions generated by valgrind and reduced
    them by ~4x to the minimum necessary so that running valgrind with
    --exit-on-first-error can pass.
    
    All tested with valgrind 3.16.0 on Debian 4.19 x86/64.
    
    These suppressions enable running valgrind on current master for the
    
    unit tests
    
      valgrind --leak-check=full --show-leak-kinds=all --show-reachable=yes \
               --gen-suppressions=all --error-limit=no -s \
               --suppressions=contrib/valgrind.supp \
               src/test/test_bitcoin --log_level=test_suite
    
    bench
    
      valgrind --leak-check=full --show-leak-kinds=all --show-reachable=yes \
               --gen-suppressions=all --error-limit=no -s \
               --suppressions=contrib/valgrind.supp \
               src/bench/bench_bitcoin -evals=1
    
    qt tests
    
      valgrind --leak-check=full --show-leak-kinds=all --show-reachable=yes \
               --gen-suppressions=all --error-limit=no -s \
               --suppressions=contrib/valgrind.supp \
               src/qt/test/test_bitcoin-qt --log_level=test_suite
    
    as well as with `make check-valgrind` in PR 17639
    4dc8b2816f
  4. jonatack cross-referenced this on Feb 19, 2020 from issue tests: Add "make check-valgrind" to run the unit tests under Valgrind by practicalswift
  5. practicalswift commented at 2:26 PM on February 19, 2020: contributor

    @jonatack

    Are you able to reproduce this one reliably?

    {
       Suppress rest_blockhash_by_height Conditional jump or move depends on uninitialised value(s)
       Memcheck:Cond
       fun:_ZL24rest_blockhash_by_heightP11HTTPRequestRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
    }
    

    If so, can you try minimising the test case to find the root cause?

    It looks like the use of an uninitialised value, which would be a very valuable find!

  6. jonatack commented at 2:58 PM on February 19, 2020: contributor

    @practicalswift which test or test suite are you seeing fail without that suppression?

  7. jonatack commented at 3:01 PM on February 19, 2020: contributor

    Lone travis failure in "scheduler_tests/mockforward" is unrelated.

  8. practicalswift commented at 3:59 PM on February 19, 2020: contributor

    @jonatack I haven't seen that failure - I quoted the diff :)

  9. DrahtBot added the label Scripts and tools on Feb 19, 2020
  10. DrahtBot added the label Tests on Feb 19, 2020
  11. jonatack commented at 4:38 PM on February 19, 2020: contributor

    @jonatack I haven't seen that failure - I quoted the diff :)

    Oh ok, that appears to be worth looking into but is unrelated to this PR; that suppression was introduced in 2d23082 by @michiboo. Once this PR is merged it will be easier for me to look into individual errors without seeing a hundred other warnings or maintaining a custom suppressions file.

  12. jonatack renamed this:
    test: update valgrind suppressions
    script: de-dupe and update valgrind suppressions
    on Feb 25, 2020
  13. jonatack commented at 1:33 PM on February 26, 2020: contributor

    No reviews or interest in this, closing.

  14. jonatack closed this on Feb 26, 2020

  15. jonatack deleted the branch on Feb 26, 2020
  16. jonatack cross-referenced this on May 5, 2020 from issue valgrind: remove outdated suppressions by fanquake
  17. bitcoin locked this on Feb 15, 2022

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: 2026-05-20 06:54 UTC