Depending on the host machine, a default par value can spawn up to 15 script verification threads for each node. Running the functional test suite with default par can exhaust file descriptors or hit other resource limits when many threads are spawned. These threads are mostly idle and the same code paths are executed with a value of par=2. Limit this to 2 for functional tests that do not override the default option.
test: set par=2 in default config for functional test framework #33485
pull andrewtoth wants to merge 1 commits into bitcoin:master from andrewtoth:par-test changing 1 files +1 −0-
andrewtoth commented at 4:09 PM on September 27, 2025: contributor
- DrahtBot added the label Tests on Sep 27, 2025
-
DrahtBot commented at 4:09 PM on September 27, 2025: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
Code Coverage & Benchmarks
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33485.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
Type Reviewers ACK pablomartin4btc, l0rinc, maflcko, theStack If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
-
in test/functional/test_framework/util.py:477 in 164a1fe956
473 | @@ -474,6 +474,7 @@ def write_config(config_path, *, n, chain, extra_config="", disable_autoconnect= 474 | # min_required_fds = MIN_CORE_FDS + MAX_ADDNODE_CONNECTIONS + nBind = 151 + 8 + 3 = 162; 475 | # nMaxConnections = available_fds - min_required_fds = 256 - 161 = 94; 476 | f.write("maxconnections=94\n") 477 | + f.write("par=2\n")
furszy commented at 7:12 PM on September 27, 2025:What about
min(2, os.cpu_count())to avoid forcing a second thread when only one core is available.
andrewtoth commented at 7:16 PM on September 27, 2025:Is there a realistic case where only one core is available?
furszy commented at 8:05 PM on September 27, 2025:Only the rpi zero comes to mind. It seems like a simple change anyway. I wouldn’t overthink it too much.
l0rinc commented at 8:16 PM on September 27, 2025:Or maybe a dockerized container
andrewtoth commented at 8:31 PM on September 27, 2025:Done!
dda5228e02test: set par=2 in default config for functional test framework
Depending on the host machine, a default `par` value can spawn up to 15 script verification threads for each node. Running the functional test suite with default `par` can exhaust file descriptors or hit other resource limits when many threads are spawned. These threads are mostly idle and the same code paths are executed with a value of `par=2`. Limit this to 2 for functional tests that do not override the default option. Co-authored-by: maflcko <6399679+maflcko@users.noreply.github.com>
andrewtoth force-pushed on Sep 27, 2025pablomartin4btc commented at 9:08 PM on September 27, 2025: memberACK dda5228e02ca6a839bf87ae7dbd133547563816a
I thought some of the top longest tests would require a diff (>)
par=, but it looks alright.l0rinc approvedl0rinc commented at 12:33 AM on September 28, 2025: contributorCode review ACK dda5228e02ca6a839bf87ae7dbd133547563816a
Q: does this affect the
"-par=1"cases in https://github.com/bitcoin/bitcoin/blob/9a04635432183c437829339dbf10e7d702581010/test/functional/p2p_segwit.py#L221 and https://github.com/bitcoin/bitcoin/blob/6980852416040bdddf111df3cea3ec50639f010a/test/functional/feature_proxy.py#L385?andrewtoth commented at 12:40 PM on September 28, 2025: contributorQ: does this affect the "-par=1" cases
No, extra args override args in the configuration file.
maflcko commented at 6:30 AM on September 29, 2025: memberlgtm ACK dda5228e02ca6a839bf87ae7dbd133547563816a
theStack approvedtheStack commented at 5:36 PM on September 29, 2025: contributorACK dda5228e02ca6a839bf87ae7dbd133547563816a
fanquake merged this on Oct 3, 2025fanquake closed this on Oct 3, 2025TheCharlatan referenced this in commit 3f14dd4b2a on Oct 7, 2025TheCharlatan referenced this in commit 5f9d179b8d on Oct 8, 2025TheCharlatan referenced this in commit 845b93d99e on Oct 8, 2025yuvicc referenced this in commit ccce70c31a on Oct 8, 2025TheCharlatan referenced this in commit 3b1e26d5d3 on Oct 10, 2025TheCharlatan referenced this in commit 0fa2fdaca0 on Oct 11, 2025stringintech referenced this in commit f74b275ffc on Oct 14, 2025andrewtoth deleted the branch on Oct 16, 2025Labels
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-04-28 03:12 UTC
More mirrored repositories can be found on mirror.b10c.me