Flowtable thread sanitizer + fuzzer#1578
Open
sergeymatov wants to merge 4 commits into
Open
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Sergey Matov <sergey.matov@githedgehog.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Sergey Matov <sergey.matov@githedgehog.com>
Signed-off-by: Sergey Matov <sergey.matov@githedgehog.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds bolero-driven concurrent fuzz coverage for FlowTable, intended to surface data races under ThreadSanitizer and to explore interleavings under the shuttle concurrency backend. It also adds small test/fuzz-only hooks in net to support generating varied initial FlowStatus values.
Changes:
- Add
FlowInfo::new_with_status(test/bolero-only) plus a boleroTypeGeneratorforFlowStatusindataplane-net. - Add a new
flow-entryunit-test module implementing concurrent fuzz tests forFlowTable(std/TSAN and shuttle variants). - Wire the new test module into
flow-entry’sflow_tablemodule undercfg(test).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| net/src/flows/flow_info.rs | Adds bolero/test-only constructor for explicit FlowStatus seeding and a bolero generator for FlowStatus. |
| flow-entry/src/flow_table/mod.rs | Includes the new concurrent fuzz test module in test builds. |
| flow-entry/src/flow_table/concurrent_fuzz.rs | Introduces concurrent fuzz tests for FlowTable (TSAN-oriented std mode + shuttle interleaving exploration). |
0c49a51 to
90b752b
Compare
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Sergey Matov <sergey.matov@githedgehog.com>
90b752b to
fbbe47b
Compare
Comment on lines
+419
to
+429
| pub fn new_with_status(flowkey: FlowKey, expires_at: Instant, status: FlowStatus) -> Self { | ||
| Self { | ||
| expires_at: AtomicInstant::new(expires_at), | ||
| flowkey, | ||
| genid: AtomicI64::new(0), | ||
| status: AtomicFlowStatus::from(status), | ||
| locked: RwLock::new(FlowInfoLocked::default()), | ||
| related: None, | ||
| token: CancellationToken::new(), | ||
| } | ||
| } |
Contributor
Author
There was a problem hiding this comment.
It's done on purpose - creation of the flow with new() will install flow to the DashMap and mark it as active. We want to play around with it's status a little
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.