-
-
Notifications
You must be signed in to change notification settings - Fork 248
fix(uring): bound io_uring tests by the shared memlock budget #4167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,6 +96,9 @@ fn a_steered_group_serves_a_shared_port() { | |
| // One stop each: the wakers are per-thread, so a shared slot would let one | ||
| // worker's registration clobber the other's. | ||
| let stops: Vec<Arc<Stop>> = (0..WORKERS).map(|_| Arc::new(Stop::default())).collect(); | ||
| // Each worker reports in once serving, so a setup failure fails here | ||
| // instead of as the dials hashed to it idling out. | ||
| let (ready, started) = std::sync::mpsc::channel(); | ||
|
|
||
| let threads: Vec<_> = members | ||
| .into_iter() | ||
|
|
@@ -105,6 +108,7 @@ fn a_steered_group_serves_a_shared_port() { | |
| let stop = stop.clone(); | ||
| let cert = certs.cert.clone(); | ||
| let key = certs.key.clone(); | ||
| let ready = ready.clone(); | ||
| std::thread::spawn(move || { | ||
| let shard = member.shard(); | ||
| let mut worker = Worker::new(Config::default()).expect("worker"); | ||
|
|
@@ -125,10 +129,15 @@ fn a_steered_group_serves_a_shared_port() { | |
| accepted[usize::from(shard.index())].fetch_add(1, Ordering::AcqRel); | ||
| } | ||
| }); | ||
| ready.send(()).expect("test alive"); | ||
| worker.block_on(stop.wait()).expect("worker loop"); | ||
|
Comment on lines
+132
to
133
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If one helper worker succeeds and the other panics during setup, as can happen under partial memlock exhaustion, the successful thread keeps its cloned AGENTS.md reference: AGENTS.md:L17-L18 Useful? React with 馃憤聽/ 馃憥. |
||
| }) | ||
| }) | ||
| .collect(); | ||
| drop(ready); | ||
| for _ in 0..WORKERS { | ||
| started.recv().expect("a worker thread failed to start"); | ||
| } | ||
|
|
||
| // Dial the shared port repeatedly from one client worker. Every handshake | ||
| // completing is the steering assertion (see the module docs). | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ulimit -lWhen ring setup hits
ENOMEMoutside systemd, the suggestedulimit -lcommand only prints the current soft limit and exits successfully. Bash'shelp ulimitstates that the current value is printed whenLIMITis omitted, so following this recovery instruction changes nothing and the retry encounters the same error. Include an explicit limit or describe this command as inspection rather than remediation. (Written by GPT-5.6 Sol)Useful? React with 馃憤聽/ 馃憥.