mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 12:29:37 +00:00
WIP: [DONTMERGE] Test run with reproducer for forced chunked send #36724
No reviewers
Labels
No labels
Android
Backport
Block storage
Brainstorming
Bug
Build system
CI failed
Consensus
Data corruption
Descriptors
Docs
DrahtBot Guix build requested
Feature
Fuzzing
GUI
Good First Review
IPC
Insufficient Review
Kernel
Linux/Unix
Mempool
Mining
Needs Backport (31.x)
Needs Backport (32.x)
Needs Benchmark
Needs Conceptual Review
Needs backport (30.x)
Needs rebase
Needs release note
Net
P2P
PSBT
Privacy
Private Broadcast
Questions and Help
RPC/REST/ZMQ
Refactoring
Resource usage
Review club
Scripts and tools
Settings
TX fees and policy
Tests
Tracking Issue
UTXO Db and Indexes
Up for grabs
Upstream
Utils/log/libs
Validation
Waiting for author
Wallet
Windows
good first issue
interfaces
macOS
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin/bitcoin!36724
Loading…
Reference in a new issue
No description provided.
Delete branch "2610-net-send-chunks-reproducer"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
WARNING: NOT INTENDED FOR MERGING!
Performing a test run with forced chunked send.
All networking code using sockets must not make assumption about the chunking of the incoming/outgoing data, and should be resilient against any chunking. Normally, the chunking of the sends of the writer dictate the chunking of the receives at the reader, but this is not guaranteed by IP/TCP, intermediate networking elements may change the packet structure.
This branch contains a stress test reproducer. For every socket send, sending is changed to break up data in small chunks. This forcedly changes chunking of the data stream. The goal is to test code for robustness in face of unexpected chunking of the data.
This PR will be closed once the test runs complete, and kept for reference (some tests are expected to fail).
WARNING: NOT INTENDED FOR MERGING!
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
External sites
Reviews
See the guideline and AI policy for information on the review process.
A summary of reviews will appear here.
LLM Linter (✨ experimental)
Possible places where comparison-specific test macros should replace generic comparisons:
test/functional/interface_http.py:assert res.index(b"HTTP/1.1 200") < res.index(b"HTTP/1.1 400")→ Preferassert_greater_than(res.index(b"HTTP/1.1 400"), res.index(b"HTTP/1.1 200")).2026-11-13 06:38:27
1 additional verified finding in the Review report.
🟠 Minor · Forced chunking changes datagram message boundaries
With port mapping enabled, this DONTMERGE build sends malformed UDP and netlink requests; a possible netlink shutdown hang additionally depends on unverified kernel behavior.
Location:
src/util/sock.cpp:61(head).🔵 Suggestion · The v2 setban exclusion lacks a failure explanation
The exclusion lacks a failure log or cause, leaving the source-inferred early-close explanation unconfirmed and preventing readers from distinguishing reproducer effects from a robustness bug.
Location:
test/functional/test_runner.py:251(base).🔵 Suggestion · Forwarded MSG_MORE works against forced fragmentation
On Linux, retaining
MSG_MOREencourages coalescing of the forced v1 header chunks, reducing opportunities to exercise split-header parsing; the actual packetization in this run was not measured.Location:
src/util/sock.cpp:64(head).🔵 Suggestion · Python-to-node traffic bypasses the chunking hook
The hook leaves general Python-to-node writes unfragmented, limiting receive-side stress in Python-driven tests even though node-to-node traffic and selected explicit split-input cases still exercise node readers.
Location:
src/util/sock.cpp:72(head).🔵 Suggestion · Split-handshake fixes lack deterministic regression coverage
The Python responder fixes depend on uncommon random inputs and read boundaries that no checked-in test forces, so regressions can escape CI after the reproducer is removed.
Location:
test/functional/test_framework/v2_p2p.py:142(head).🔵 Suggestion · The slow-read drain retains every large response body
check_slow_read_throttlenow retains and copies tens of MiB of response bodies merely to count responses, increasing functional-test memory pressure; no resource failure or peak-memory measurement was observed.Location:
test/functional/interface_http.py:117(head).Review coverage was incomplete.
Reviewed:
b45fa0069d5c· Review report · Previous reportspermalink
🚧 At least one of the CI tasks failed.
Task
iwyu: https://github.com/bitcoin/bitcoin/actions/runs/41417100283/job/125183540072LLM reason (✨ experimental): CI failed because IWYU required adding
<thread>tosrc/util/sock.cpp, leaving a diff that the include-check rejects.Hints
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.
CI runs have completed, with some failures (that was expected).
An issue has been raised to document the failed tests -- #36726 .
Closing this PR (it was not intended for merging, keeping it for reference).
New test run, with candidate test fixed on top of the reproducer.
The branch now includes:
b37819f86dinterface_http.pyfix --f89bd7f5a5and568d8f23edfrom #36729rpc_setban.py --v2transport-- ba709b5db5491ff03a5f6a89b8cc34b56397f4d0 from https://github.com/optout21/bitcoin/tree/2611-dontmerge-ignore-setban-ftestp2p_v2_encrypted.pyfix --b54ef805e8from #36730Result: some failures:
p2p_v2_misbehaving.py: failed, due to similar reason asrpc_setban.py(new failure, failed in several runs)New test run, with candidate test fixed on top of the reproducer.
The branch (
04af897395) now includes:ab198d7d9cinterface_http.pyfix --f89bd7f5a5and568d8f23edfrom #36729rpc_setban.py --v2transport-- ba709b5db5491ff03a5f6a89b8cc34b56397f4d0 from https://github.com/optout21/bitcoin/tree/2611-dontmerge-ignore-setban-ftestp2p_v2_encrypted.py&p2p_v2_misbehaving.py--be35cbb0b1andbe88a3b926from #36730Results: previous errors resolved (
p2p_v2_misbehaving.pyand IWYU), failures:p2p_handshake.py --v2transporttest ancestor commitsfailed, this is due to inconsistent intermediary state, normal.New test run, with candidate test fixed on top of the reproducer.
The branch now (
b45fa0069d) includes:ab198d7d9cinterface_http.pyfix --f89bd7f5a5and568d8f23edfrom #36729rpc_setban.py --v2transport-- ba709b5db5491ff03a5f6a89b8cc34b56397f4d0 from https://github.com/optout21/bitcoin/tree/2611-dontmerge-ignore-setban-ftestp2p_v2_encrypted.py&p2p_v2_misbehaving.pyfixes -- 4 commits from #36730 (be35cbb,be788a9,baafaf8,ba7dde0)Result: all tests passed, except "test ancestor commit" (as expected, due to the fact that incomplete-commit states fail due to the reproducer).
Closing.