mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 12:53:38 +00:00
WIP: [DONTMERGE] Test run with reproducer for forced chunked recv #36751
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!36751
Loading…
Reference in a new issue
No description provided.
Delete branch "2610-net-recv-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 recv.
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 read,
recv()is not called to read all available data, but data is read and returned in smaller chunks. 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).
Similar to #36724 .
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.
🚧 At least one of the CI tasks failed.
Task
macOS native: https://github.com/bitcoin/bitcoin/actions/runs/41794882715/job/126456522377LLM reason (✨ experimental): CI failed because the
sock_testsCTest test failed.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.
🟠 Minor · Forced chunking discards datagram replies and can block shutdown
The reproducer caps UDP and netlink receives as though they were streams, discarding port-mapping replies and potentially preventing shutdown with port mapping enabled on Linux.
Location:
src/util/sock.cpp:82(head).🔵 Suggestion · The receive-loop fix remains tied to the unmerged reproducer
The test's receive loop handles legal TCP short reads independently of the diagnostic shim, so it is worth preserving in a separate PR.
Location:
src/test/sock_tests.cpp:132(head).🔵 Suggestion · Mock-socket unit tests bypass the forced receive chunking
Mock-backed I2P and HTTP unit tests bypass the new limiter, so their results do not measure this run's additional forced chunking.
Location:
src/util/sock.cpp:58(head).Review coverage was incomplete.
Reviewed:
9c516241658b· Full review report · Previous reportspermalink
A socket unit test failed (
sock_tests/send_and_receive), so integration tests were not executed.Including a commit with a fix for the unit test, for a 2nd run.
CI runs timed out, in some cases a log line is created for every read, and the many small chunks slowed down runs considerably. In local runs this didn't cause a problem.
I've changed the reproducer to break up less aggressively: for large streams always read the third of the available data at once. I hope this will make a difference.
CI runs have completed, with some failures (as expected).
Added failed cases to #36726 --
sock_tests/send_and_receiveunit test,interface_http.py,feature_torcontrol.py.Closing this PR (it was not intended for merging, keeping it for reference).