-
Notifications
You must be signed in to change notification settings - Fork 37.7k
ci: limit max stack size to 512 KiB #31367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31367. ReviewsSee 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. ConflictsReviewers, this pull request conflicts with the following ones:
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. |
🚧 At least one of the CI tasks failed. HintsTry to run the tests locally, according to the documentation. However, a CI failure may still
Leave a comment here, if you need help tracking down a confusing failure. |
Concept ACK |
Looks like there are some things to fix if we want to do this:
|
It looks like |
Pretty sure this can be ignored, as in this codebase it is not relevant, see c42f/tinyformat#70 (comment) |
Concept ACK. Seems like a good thing to know. |
Looks like this is recursing too recursively while recursively recursing. Exactly the kind of thing this PR is good for pointing out :) |
// NOLINTNEXTLINE(misc-no-recursion)
std::set<Challenge> FindChallenges(const NodeRef& ref) {
...
} Grrr!! Another |
Maybe just enable it for the two GHA macOS tasks, which do not have DEBUG=1 enabled and also do not have sanitizers enabled? |
@dergoegge want to rebase here and make those changes? |
eed67a0
to
d95da76
Compare
Limited the stack size limit to the GHA macos jobs (as per #31367 (comment)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the two tasks are not running in docker, so the change here has no effect
If someone want to pick this up, the correct diff would likely look something like: diff --git a/ci/test/00_setup_env_mac_native.sh b/ci/test/00_setup_env_mac_native.sh
index e01a56895b..ab1b78b14d 100755
--- a/ci/test/00_setup_env_mac_native.sh
+++ b/ci/test/00_setup_env_mac_native.sh
@@ -15,3 +15,4 @@ export BITCOIN_CONFIG="-DBUILD_GUI=ON -DWITH_ZMQ=ON -DREDUCE_EXPORTS=ON"
export CI_OS_NAME="macos"
export NO_DEPENDS=1
export OSX_SDK=""
+export CI_LIMIT_STACK_SIZE=1
diff --git a/ci/test/00_setup_env_mac_native_fuzz.sh b/ci/test/00_setup_env_mac_native_fuzz.sh
index cacf2423ac..d896383f29 100755
--- a/ci/test/00_setup_env_mac_native_fuzz.sh
+++ b/ci/test/00_setup_env_mac_native_fuzz.sh
@@ -15,3 +15,4 @@ export RUN_UNIT_TESTS=false
export RUN_FUNCTIONAL_TESTS=false
export RUN_FUZZ_TESTS=true
export GOAL="all"
+export CI_LIMIT_STACK_SIZE=1
diff --git a/ci/test/03_test_script.sh b/ci/test/03_test_script.sh
index 3dd44807c9..e76264b319 100755
--- a/ci/test/03_test_script.sh
+++ b/ci/test/03_test_script.sh
@@ -13,6 +13,10 @@ export LSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/l
export TSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/tsan:halt_on_error=1:second_deadlock_stack=1"
export UBSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1"
+if [ -n "${CI_LIMIT_STACK_SIZE}" ]; then
+ ulimit ... bla
+fi
+
echo "Number of available processing units: $(nproc)"
if [ "$CI_OS_NAME" == "macos" ]; then
top -l 1 -s 0 | awk ' /PhysMem/ {print}' |
PIcked up in #33079. |
3b23f95 ci: limit max stack size to 512 KiB (dergoegge) 2931a87 ci: limit stack size to 512kb in native macOS jobs (fanquake) Pull request description: Picks up #31367. Closes #29840. Limit adjustment is moved until after compilation, otherwise compilation might not succeed. I've used compilation flags to limit the stack size in the native macOS jobs, because trying to use `ulimit` resulted in: ```bash + '[' -n 1 ']' + ulimit -s 262144 /Users/runner/work/bitcoin/bitcoin/ci/test/03_test_script.sh: line 17: ulimit: stack size: cannot modify limit: Operation not permitted ``` See example failures (`ulimit -s 64`) here: https://github.com/bitcoin/bitcoin/runs/46861548042. ACKs for top commit: dergoegge: utACK 3b23f95 Tree-SHA512: 7e00626f3ca9e860d79a301af2427008ce27c329b618e24f95e7a55b284459a446216d2859c2e63be50abb9d4f0d343c12ff50445231652d354f225477928a35
Closes #29840