This repository was archived by the owner on Nov 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 199
This repository was archived by the owner on Nov 1, 2023. It is now read-only.
Not terminating process on timeout in Windows for the coverage task #3513
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Information
- Onefuzz version: 8.8
- OS: Windows 11
Provide detailed reproduction steps (if any)
If this timeout case hits, we never terminate the child process.
onefuzz/src/agent/coverage/src/record.rs
Lines 128 to 148 in c7a9827
| crate::timer::timed(self.timeout, move || { | |
| let mut recorder = | |
| WindowsRecorder::new(&loader, self.module_allowlist, self.cache.as_ref()); | |
| let (mut dbg, child) = Debugger::init(self.cmd, &mut recorder)?; | |
| dbg.run(&mut recorder)?; | |
| // If the debugger callbacks fail, this may return with a spurious clean exit. | |
| let output = child.wait_with_output()?.into(); | |
| // Check if debugging was stopped due to a callback error. | |
| // | |
| // If so, the debugger terminated the target, and the recorded coverage and | |
| // output are both invalid. | |
| if let Some(err) = recorder.stop_error { | |
| return Err(err); | |
| } | |
| let coverage = recorder.coverage; | |
| Ok(Recorded { coverage, output }) | |
| })? |
Expected result
What is the expected result of the above steps?
We should call quit_debugging from the Debugger module as well as kill and/or wait on the returned `Child.
onefuzz/src/agent/debugger/src/debugger.rs
Line 306 in c7a9827
| pub fn quit_debugging(&self) { |
https://doc.rust-lang.org/std/process/struct.Child.html#method.kill
https://doc.rust-lang.org/std/process/struct.Child.html#method.wait
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working