Skip to content

Omniprobe wrapper silently masks child-process exit codes #41

Description

@lwitschen

Summary

omniprobe/omniprobe::capture_subprocess_output reads the wrapped
child's stdout/stderr but does not propagate the child's exit code.
Combined with the top-level invocation in the same file, which discards
any return value, every wrapped command exits 0 regardless of how the
child terminated (non-zero exit, SIGABRT, SIGSEGV, etc.).

Evidence

  • omniprobe/omniprobe:115-184 (capture_subprocess_output): the
    comment # Get process return code on line 165 is followed by
    buffer-draining logic only; process.returncode is never read or
    returned.
  • omniprobe/omniprobe:788: capture_subprocess_output(parms.remaining[1:], ...)
    discards any return value; no sys.exit() with the child's status.

Expected behavior

Wrapper exit code mirrors the child's. Signal terminations surface as
128 + signo (or whatever convention the harness chooses).

Impact

  • CI cannot rely on the wrapper exit code to detect instrumented-child
    failures; consumers have to grep stderr for diagnostic strings.
  • Downstream test scripts that gate on omniprobe exit status silently
    pass on instrumentation crashes.

Suggested fix

  1. capture_subprocess_output: return process.returncode (and a
    sensible value for the KeyboardInterrupt path, e.g. 130).
  2. Top-level invocation: sys.exit(capture_subprocess_output(...)).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions