Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.
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

Closed
@tevoinea

Description

@tevoinea

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.

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.

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

AB#166281

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions