ci: limit max stack size to 512 KiB #31367
pull dergoegge wants to merge 1 commits into bitcoin:master from dergoegge:2024-11-ci-ulimit-s changing 1 files +1 −0-
dergoegge commented at 4:37 pm on November 25, 2024: memberCloses #29840
-
ci: limit max stack size to 512 KiB eed67a0bea
-
DrahtBot commented at 4:37 pm on November 25, 2024: contributor
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Code Coverage & Benchmarks
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31367.
Reviews
See the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #31428 (ci: Allow build dir on CI host by maflcko)
- #31176 (ci: Test cross-built Windows executables on Windows natively by hebasto)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
-
DrahtBot added the label Tests on Nov 25, 2024
-
dergoegge marked this as a draft on Nov 25, 2024
-
DrahtBot added the label CI failed on Nov 25, 2024
-
DrahtBot commented at 5:14 pm on November 25, 2024: contributor
🚧 At least one of the CI tasks failed. Debug: https://github.com/bitcoin/bitcoin/runs/33490765972
Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:
-
Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.
-
A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.
-
An intermittent issue.
Leave a comment here, if you need help tracking down a confusing failure.
-
-
theStack commented at 10:48 pm on November 25, 2024: contributorConcept ACK
-
dergoegge commented at 10:00 am on November 26, 2024: member
Looks like there are some things to fix if we want to do this:
0[11:46:11.067] Run str_printf with args ['/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/fuzz', '-runs=1', PosixPath('/ci_container_base/ci/scratch/qa-assets/fuzz_corpora/str_printf')]INFO: Running with entropic power schedule (0xFF, 100). 1[11:46:11.067] INFO: Seed: 2972386372 2[11:46:11.067] INFO: Loaded 1 modules (627947 inline 8-bit counters): 627947 [0x55cf2473c058, 0x55cf247d5543), 3[11:46:11.067] INFO: Loaded 1 PC tables (627947 PCs): 627947 [0x55cf247d5548,0x55cf2516a3f8), 4[11:46:11.067] INFO: 743 files found in /ci_container_base/ci/scratch/qa-assets/fuzz_corpora/str_printf 5[11:46:11.067] INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes 6[11:46:11.067] INFO: seed corpus: files: 743 min: 1b max: 3095b total: 27153b rss: 96Mb 7[11:46:11.067] AddressSanitizer:DEADLYSIGNAL 8[11:46:11.067] ================================================================= 9[11:46:11.067] ==4423==ERROR: AddressSanitizer: stack-overflow on address 0x7ffe4ba3f598 (pc 0x7f7f85f7cf4f bp 0x7ffe4babd6a0 sp 0x7ffe4ba3e5a0 T0) 10[11:46:11.067] [#0](/bitcoin-bitcoin/0/) 0x7f7f85f7cf4f in std::ostreambuf_iterator<char, std::char_traits<char>> std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char>>>::_M_insert_float<double>(std::ostreambuf_iterator<char, std::char_traits<char>>, std::ios_base&, char, char, double) const (/lib/x86_64-linux-gnu/libstdc++.so.6+0x145f4f) (BuildId: ca77dae775ec87540acd7218fa990c40d1c94ab1) 11[11:46:11.067] [#1](/bitcoin-bitcoin/1/) 0x7f7f85f8f166 in std::ostream& std::ostream::_M_insert<double>(double) (/lib/x86_64-linux-gnu/libstdc++.so.6+0x158166) (BuildId: ca77dae775ec87540acd7218fa990c40d1c94ab1) 12[11:46:11.067] [#2](/bitcoin-bitcoin/2/) 0x55cf214d4231 in tinyformat::detail::formatImpl(std::ostream&, char const*, tinyformat::detail::FormatArg const*, int) /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/./tinyformat.h:916:17 13[11:46:11.067] [#3](/bitcoin-bitcoin/3/) 0x55cf21841a23 in tinyformat::vformat(std::ostream&, char const*, tinyformat::FormatList const&) /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/./tinyformat.h:1064:5 14[11:46:11.067] [#4](/bitcoin-bitcoin/4/) 0x55cf21841a23 in void tinyformat::format<float>(std::ostream&, tinyformat::FormatStringCheck<sizeof...(float)>, float const&) /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/./tinyformat.h:1074:5 15[11:46:11.067] [#5](/bitcoin-bitcoin/5/) 0x55cf21841a23 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> tinyformat::format<float>(tinyformat::FormatStringCheck<sizeof...(float)>, float const&) /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/./tinyformat.h:1083:5 16[11:46:11.067] [#6](/bitcoin-bitcoin/6/) 0x55cf2183b2ac in str_printf_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_6::operator()() const /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/./test/fuzz/strprintf.cpp:101:23 17[11:46:11.067] [#7](/bitcoin-bitcoin/7/) 0x55cf2183b2ac in unsigned long CallOneOf<str_printf_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_6, str_printf_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_7, str_printf_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_8, str_printf_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_9, str_printf_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_10, str_printf_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_11, str_printf_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_12, str_printf_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_13>(FuzzedDataProvider&, str_printf_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_6, str_printf_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_7, str_printf_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_8, str_printf_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_9, str_printf_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_10, str_printf_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_11, str_printf_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_12, str_printf_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_13) /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/./test/fuzz/util.h:42:27 18[11:46:11.067] [#8](/bitcoin-bitcoin/8/) 0x55cf2183b2ac in str_printf_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>) /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/./test/fuzz/strprintf.cpp:98:9 19[11:46:11.067] [#9](/bitcoin-bitcoin/9/) 0x55cf21a76a2d in std::function<void (std::span<unsigned char const, 18446744073709551615ul>)>::operator()(std::span<unsigned char const, 18446744073709551615ul>) const /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_function.h:591:9 20[11:46:11.067] [#10](/bitcoin-bitcoin/10/) 0x55cf21a76a2d in LLVMFuzzerTestOneInput /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/util/./test/fuzz/fuzz.cpp:214:5 21[11:46:11.067] [#11](/bitcoin-bitcoin/11/) 0x55cf210f590a in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) (/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/fuzz+0x1c9d90a) (BuildId: 3ecb881f784192cf8768771f3d86b7059d8f4a9d) 22[11:46:11.067] [#12](/bitcoin-bitcoin/12/) 0x55cf210f4f19 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) (/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/fuzz+0x1c9cf19) (BuildId: 3ecb881f784192cf8768771f3d86b7059d8f4a9d) 23[11:46:11.067] [#13](/bitcoin-bitcoin/13/) 0x55cf210f6cd2 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::vector<fuzzer::SizedFile, std::allocator<fuzzer::SizedFile>>&) (/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/fuzz+0x1c9ecd2) (BuildId: 3ecb881f784192cf8768771f3d86b7059d8f4a9d) 24[11:46:11.067] [#14](/bitcoin-bitcoin/14/) 0x55cf210f71f0 in fuzzer::Fuzzer::Loop(std::vector<fuzzer::SizedFile, std::allocator<fuzzer::SizedFile>>&) (/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/fuzz+0x1c9f1f0) (BuildId: 3ecb881f784192cf8768771f3d86b7059d8f4a9d) 25[11:46:11.067] [#15](/bitcoin-bitcoin/15/) 0x55cf210e38b5 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) (/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/fuzz+0x1c8b8b5) (BuildId: 3ecb881f784192cf8768771f3d86b7059d8f4a9d) 26[11:46:11.067] [#16](/bitcoin-bitcoin/16/) 0x55cf2110fd36 in main (/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/fuzz+0x1cb7d36) (BuildId: 3ecb881f784192cf8768771f3d86b7059d8f4a9d) 27[11:46:11.067] [#17](/bitcoin-bitcoin/17/) 0x7f7f8590b1c9 (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 6d64b17fbac799e68da7ebd9985ddf9b5cb375e6) 28[11:46:11.067] [#18](/bitcoin-bitcoin/18/) 0x7f7f8590b28a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 6d64b17fbac799e68da7ebd9985ddf9b5cb375e6) 29[11:46:11.067] [#19](/bitcoin-bitcoin/19/) 0x55cf210d7d34 in _start (/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/fuzz+0x1c7fd34) (BuildId: 3ecb881f784192cf8768771f3d86b7059d8f4a9d) 30[11:46:11.067] 31[11:46:11.067] SUMMARY: AddressSanitizer: stack-overflow (/lib/x86_64-linux-gnu/libstdc++.so.6+0x145f4f) (BuildId: ca77dae775ec87540acd7218fa990c40d1c94ab1) in std::ostreambuf_iterator<char, std::char_traits<char>> std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char>>>::_M_insert_float<double>(std::ostreambuf_iterator<char, std::char_traits<char>>, std::ios_base&, char, char, double) const 32[11:46:11.067] ==4423==ABORTING 33[11:46:11.067] MS: 0 ; base unit: 0000000000000000000000000000000000000000 34[11:46:11.067] 0x25,0x38,0x37,0x33,0x37,0x38,0x39,0x25, 35[11:46:11.067] %873789% 36[11:46:11.067] artifact_prefix='./'; Test unit written to ./crash-105d61022c3f25b20d002b172b45b3becdb2600f 37[11:46:11.067] Base64: JTg3Mzc4OSU=
0[16:39:05.754] test/miniscript_tests.cpp(499): Entering test suite "miniscript_tests" 1[16:39:05.754] MemorySanitizer:DEADLYSIGNAL 2[16:39:05.754] ==5172==ERROR: MemorySanitizer: stack-overflow on address 0x7fff0d074df0 (pc 0x561157c53f78 bp 0x7fff0d075610 sp 0x7fff0d074df0 T5172) 3[16:39:05.754] [#0](/bitcoin-bitcoin/0/) 0x561157c53f78 in StackTrace /msan/llvm-project/compiler-rt/lib/msan/../sanitizer_common/sanitizer_stacktrace.h:53:45 4[16:39:05.754] [#1](/bitcoin-bitcoin/1/) 0x561157c53f78 in BufferedStackTrace /msan/llvm-project/compiler-rt/lib/msan/../sanitizer_common/sanitizer_stacktrace.h:113:26 5[16:39:05.754] [#2](/bitcoin-bitcoin/2/) 0x561157c53f78 in operator new(unsigned long) /msan/llvm-project/compiler-rt/lib/msan/msan_new_delete.cpp:51:35 6[16:39:05.754] [#3](/bitcoin-bitcoin/3/) 0x5611587eb34a in void* std::__1::__libcpp_operator_new[abi:de190100]<unsigned long>(unsigned long) /msan/cxx_build/include/c++/v1/new:265:10 7[16:39:05.754] [#4](/bitcoin-bitcoin/4/) 0x5611587eb34a in std::__1::__libcpp_allocate[abi:de190100](unsigned long, unsigned long) /msan/cxx_build/include/c++/v1/new:289:10 8[16:39:05.754] [#5](/bitcoin-bitcoin/5/) 0x5611587eb34a in std::__1::allocator<std::__1::__tree_node<std::__1::pair<(anonymous namespace)::ChallengeType, unsigned int>, void*>>::allocate[abi:de190100](unsigned long) /msan/cxx_build/include/c++/v1/__memory/allocator.h:118:32 9[16:39:05.754] [#6](/bitcoin-bitcoin/6/) 0x5611587eb34a in std::__1::allocator_traits<std::__1::allocator<std::__1::__tree_node<std::__1::pair<(anonymous namespace)::ChallengeType, unsigned int>, void*>>>::allocate[abi:de190100](std::__1::allocator<std::__1::__tree_node<std::__1::pair<(anonymous namespace)::ChallengeType, unsigned int>, void*>>&, unsigned long) /msan/cxx_build/include/c++/v1/__memory/allocator_traits.h:280:16 10[16:39:05.754] [#7](/bitcoin-bitcoin/7/) 0x5611587eb34a in std::__1::unique_ptr<std::__1::__tree_node<std::__1::pair<(anonymous namespace)::ChallengeType, unsigned int>, void*>, std::__1::__tree_node_destructor<std::__1::allocator<std::__1::__tree_node<std::__1::pair<(anonymous namespace)::ChallengeType, unsigned int>, void*>>>> std::__1::__tree<std::__1::pair<(anonymous namespace)::ChallengeType, unsigned int>, std::__1::less<std::__1::pair<(anonymous namespace)::ChallengeType, unsigned int>>, std::__1::allocator<std::__1::pair<(anonymous namespace)::ChallengeType, unsigned int>>>::__construct_node<(anonymous namespace)::ChallengeType, unsigned int const&>((anonymous namespace)::ChallengeType&&, unsigned int const&) /msan/cxx_build/include/c++/v1/__tree:1812:21 11[16:39:05.754] [#8](/bitcoin-bitcoin/8/) 0x5611587eb34a in std::__1::pair<std::__1::__tree_iterator<std::__1::pair<(anonymous namespace)::ChallengeType, unsigned int>, std::__1::__tree_node<std::__1::pair<(anonymous namespace)::ChallengeType, unsigned int>, void*>*, long>, bool> std::__1::__tree<std::__1::pair<(anonymous namespace)::ChallengeType, unsigned int>, std::__1::less<std::__1::pair<(anonymous namespace)::ChallengeType, unsigned int>>, std::__1::allocator<std::__1::pair<(anonymous namespace)::ChallengeType, unsigned int>>>::__emplace_unique_impl<(anonymous namespace)::ChallengeType, unsigned int const&>((anonymous namespace)::ChallengeType&&, unsigned int const&) /msan/cxx_build/include/c++/v1/__tree:1822:23 12[16:39:05.754] [#9](/bitcoin-bitcoin/9/) 0x5611587eb34a in std::__1::pair<std::__1::__tree_iterator<std::__1::pair<(anonymous namespace)::ChallengeType, unsigned int>, std::__1::__tree_node<std::__1::pair<(anonymous namespace)::ChallengeType, unsigned int>, void*>*, long>, bool> std::__1::__tree<std::__1::pair<(anonymous namespace)::ChallengeType, unsigned int>, std::__1::less<std::__1::pair<(anonymous namespace)::ChallengeType, unsigned int>>, std::__1::allocator<std::__1::pair<(anonymous namespace)::ChallengeType, unsigned int>>>::__emplace_unique[abi:de190100]<(anonymous namespace)::ChallengeType, unsigned int const&>((anonymous namespace)::ChallengeType&&, unsigned int const&) /msan/cxx_build/include/c++/v1/__tree:1044:12 13[16:39:05.754] [#10](/bitcoin-bitcoin/10/) 0x5611587eb34a in std::__1::pair<std::__1::__tree_const_iterator<std::__1::pair<(anonymous namespace)::ChallengeType, unsigned int>, std::__1::__tree_node<std::__1::pair<(anonymous namespace)::ChallengeType, unsigned int>, void*>*, long>, bool> std::__1::set<std::__1::pair<(anonymous namespace)::ChallengeType, unsigned int>, std::__1::less<std::__1::pair<(anonymous namespace)::ChallengeType, unsigned int>>, std::__1::allocator<std::__1::pair<(anonymous namespace)::ChallengeType, unsigned int>>>::emplace[abi:de190100]<(anonymous namespace)::ChallengeType, unsigned int const&>((anonymous namespace)::ChallengeType&&, unsigned int const&) /msan/cxx_build/include/c++/v1/set:724:20 14[16:39:05.754] [#11](/bitcoin-bitcoin/11/) 0x5611587e5121 in (anonymous namespace)::FindChallenges(std::__1::shared_ptr<miniscript::Node<CPubKey> const> const&) /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/./test/miniscript_tests.cpp:307:14 15[16:39:05.754] [#12](/bitcoin-bitcoin/12/) 0x5611587e55d1 in (anonymous namespace)::FindChallenges(std::__1::shared_ptr<miniscript::Node<CPubKey> const> const&) /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/./test/miniscript_tests.cpp:320:25 16[16:39:05.754] [#13](/bitcoin-bitcoin/13/) 0x5611587e55d1 in (anonymous namespace)::FindChallenges(std::__1::shared_ptr<miniscript::Node<CPubKey> const> const&) / 17... 18[16:39:05.754] [#257](/bitcoin-bitcoin/257/) 0x5611587e55d1 in (anonymous namespace)::FindChallenges(std::__1::shared_ptr<miniscript::Node<CPubKey> const> const&) /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/./test/miniscript_tests.cpp:320:25 19[16:39:05.754] 20[16:39:05.754] SUMMARY: MemorySanitizer: stack-overflow /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/./test/miniscript_tests.cpp:307:14 in (anonymous namespace)::FindChallenges(std::__1::shared_ptr<miniscript::Node<CPubKey> const> const&) 21[16:39:05.754] ==5172==ABORTING
-
maflcko commented at 10:07 am on November 26, 2024: memberIt looks like
DEBUG=1
has an effect on this? -
maflcko commented at 10:09 am on November 26, 2024: member
tinyformat
Pretty sure this can be ignored, as in this codebase it is not relevant, see https://github.com/c42f/tinyformat/issues/70#issuecomment-579391305
-
theuni commented at 9:19 pm on December 6, 2024: memberConcept ACK. Seems like a good thing to know.
-
theuni commented at 9:24 pm on December 6, 2024: member
0 1> [16:39:05.754] [#11](/bitcoin-bitcoin/11/) 0x5611587e5121 in (anonymous namespace)::FindChallenges(std::__1::shared_ptr<miniscript::Node<CPubKey> const> const&) /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/./test/miniscript_tests.cpp:307:14 2> [16:39:05.754] [#12](/bitcoin-bitcoin/12/) 0x5611587e55d1 in (anonymous namespace)::FindChallenges(std::__1::shared_ptr<miniscript::Node<CPubKey> const> const&) /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/./test/miniscript_tests.cpp:320:25
Looks like this is recursing too recursively while recursively recursing. Exactly the kind of thing this PR is good for pointing out :)
-
theuni commented at 9:29 pm on December 6, 2024: member
Looks like this is recursing too recursively while recursively recursing. Exactly the kind of thing this PR is good for pointing out :)
0// NOLINTNEXTLINE(misc-no-recursion) 1std::set<Challenge> FindChallenges(const NodeRef& ref) { 2 ... 3}
Grrr!! Another
NOLINTNEXTLINE
suppression covering up a real(ish) bug :(. Thankfully it’s just a test.
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-12-21 15:12 UTC
More mirrored repositories can be found on mirror.b10c.me