Repository navigation
Conversation
Easy to review using the following: ``` git diff --color-moved=dimmed-zebra --color-moved-ws=allow-indentation-change ```
Since `-ipcbind` reserves one listening socket plus `ipc::DEFAULT_MAX_CONNECTIONS` (16) client slots in `min_required_fds`, the framework's `-maxconnections=76` no longer fits the 256 file descriptor budget on NetBSD, and every `interface_ipc*.py` node starts with "Warning: Reducing -maxconnections ...", which the framework treats as a failure. Lower `-maxconnections` by that reservation on IPC-enabled nodes only, so the rest of the suite keeps its P2P connection slots.
On select()-based platforms such as NetBSD, `bitcoind` can use at most `FD_SETSIZE` (256) file descriptors, so the functional test framework pins `-maxconnections` to that budget. Any change that grows `min_required_fds` then makes every node print "Warning: Reducing -maxconnections ...", which the framework treats as a failure. Such regressions are currently caught only by nightly NetBSD CI (see bitcoin#31537, Add a `CI_LIMIT_FD_COUNT` knob that runs functional test node processes through a wrapper capping `RLIMIT_NOFILE`, and enable it for the macOS native job with NetBSD's value of 256.
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. External sites
ReviewsSee the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste 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. |
interface_ipc*.py on NetBSD and prevent rinterface_ipc*.py on NetBSD and prevent future regressions
|
NetBSD test logs are available here: https://github.com/hebasto/bitcoin-core-nightly/actions/runs/39563835829. |
All four NetBSD nightly jobs fail because `interface_ipc.py`, `interface_ipc_cli.py`, `interface_ipc_init.py` and `interface_ipc_mining.py` do not expect the "Reducing -maxconnections ... because of system limitations" warning that bitcoind prints on NetBSD. The proper fix is bitcoin/bitcoin#36587. Exclude these tests until it is merged. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01TyGMUZrBWNjnUxbpmu16D9
Nodes started with `-ipcbind` reserve 17 more file descriptors than the `maxconnections=76` budget in the functional test framework accounts for. On NetBSD (FD_SETSIZE = 256) bitcoind therefore prints the "Reducing -maxconnections ..." warning on stderr and the `interface_ipc*` tests fail. Apply a minimal version of bitcoin/bitcoin#36587 to the fetched source tree: lower `-maxconnections` for `-ipcbind` nodes. This keeps the tests running on NetBSD until the upstream fix is merged. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01TyGMUZrBWNjnUxbpmu16D9
|
Concept ACK But We could run diff --git a/ci/test/03_test_script.sh b/ci/test/03_test_script.sh
index d5981147f4..1468638690 100755
--- a/ci/test/03_test_script.sh
+++ b/ci/test/03_test_script.sh
@@ -161,5 +161,6 @@ if [ -n "${CI_LIMIT_FD_COUNT}" ]; then
# Only the node processes are capped (via BITCOIN_CMD), not the Python
# test runner, which needs more descriptors when running jobs in parallel.
- export BITCOIN_CMD="${BASE_ROOT_DIR}/ci/test/wrap-fd-limit.sh ${BITCOIN_CMD:-bitcoin}"
+ BITCOIN_CMD_UNCAPPED="${BITCOIN_CMD:-bitcoin}"
+ export BITCOIN_CMD="${BASE_ROOT_DIR}/ci/test/wrap-fd-limit.sh ${BITCOIN_CMD_UNCAPPED}"
fi
@@ -208,4 +209,20 @@ if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then
--quiet \
--failfast
+
+ if [ -n "${CI_LIMIT_FD_COUNT}" ]; then
+ # The capped suite also runs feature_init.py, but the wrapper overrides the
+ # RLIM_INFINITY and above-INT_MAX limits it tests. Repeat it without the cap.
+ BITCOIN_CMD="${BITCOIN_CMD_UNCAPPED}" \
+ LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" \
+ "${BASE_BUILD_DIR}/test/functional/test_runner.py" \
+ "${MAKEJOBS}" \
+ --tmpdirprefix "${BASE_SCRATCH_DIR}/test_runner_uncapped/" \
+ --ansi \
+ --combinedlogslen=99999999 \
+ --timeout-factor="${TEST_RUNNER_TIMEOUT_FACTOR}" \
+ --quiet \
+ --failfast \
+ feature_init.py
+ fi
fiAlternatively we could drop that test. |
| # caught by this job instead of only on NetBSD. | ||
|
|
||
| export LC_ALL=C.UTF-8 | ||
| set -o errexit |
There was a problem hiding this comment.
missing pipefail and nounset? I guess the script may fail anyway when nounset is hit, but can't hurt to be explicit here
Approach NACK. Rather than hijacking tests we already have, to emulate the constraints of other operating systems, we should add proper tests for things we are claiming/trying to support i.e #36147. |
I would agree with this in an ideal world. However, a native NetBSD CI job seems to be a hard goal for this project. |
Shouldn't that problem be solved at a different layer? If the problem is infrastructure, introduce more caching, or prebuilt/reusable container images, rather than trying to push complexity into unrelated tests. |
Would dropping the last commit from this PR change your mind? |
|
It seems plausible that a user is running the tests with a fd limit on any select based OS. If we want to support that, it seems fine to add it to the CI. Using any CI config for that seems fine, given that such a user may be on any of those OS's. |
It's not clear we do (#36761). We may move away from If we do still want to do this, it seems like it should be in it's own, isolated test, which will not interfere with any |

This PR fixes the
interface_ipc*.pytests, which have been failing on NetBSD since #35037.As file descriptor budget regressions of this kind recur (see #31537 and #36078), the macOS CI job now models NetBSD's limit so they are caught before merging rather than by nightly NetBSD CI afterwards.
See the commit messages for details.