Skip to content

Fail fast in conformance E2E when stale emulator processes are alive (cross-talk hang) #62

Description

@JakeMG-INL

Context

Surfaced by the /audit-issue review of #52. Not a defect in #52's diff — an environment/test-infra hazard exposed while running the conformance E2E during that audit.

What happened

Two orphaned --auto-rearm emulator processes (run_secc.py / run_evcc.py), left over from a manual live-verify run, were still cycling SLAC/SDP on the shared virtual interface. The conformance E2E (tests/conformance/e2e) spins up its own run_secc/run_evcc subprocess pairs, which communicate over the same link-local multicast. The orphans and the E2E's pairs heard each other's frames, so every handshake collided and retried until timeout. A suite that normally finishes in ~60s sat stuck on a single scenario for 12+ minutes with no diagnostic.

Root cause is the shared virtual interface coupling plus the fact that an --auto-rearm process never self-exits (ADR-0005: only q quits), so a backgrounded one is immortal until killed.

What to build (in priority order)

  1. Fail-fast pre-flight in the E2E fixture (core, fully specified). In tests/conformance/e2e/conftest.py, assert at session start that no run_secc.py/run_evcc.py processes are already alive (e.g. pgrep -f). If any are, fail immediately with a clear message listing the stale PIDs, instead of silently degrading into multi-minute timeouts.
  2. Per-test wall-clock bound (defense-in-depth). Add a pytest-timeout cap (~30-60s/test) so a contended handshake aborts with a traceback rather than hanging indefinitely.

Optional / heavier follow-up (design decision — triage before doing)

  1. Per-run transport isolation. Run each E2E pair in its own network namespace / unique veth pair or multicast group so orphans on the default interface can't be heard at all. Removes the failure mode entirely rather than detecting it; larger lift — split into its own issue if pursued.

Acceptance criteria

  • Running the E2E with a stale run_secc.py/run_evcc.py process alive fails within seconds with a message naming the offending PID(s), instead of timing out.
  • A clean E2E run is unaffected (still ~60s, 14 passed).
  • (If Make AcCCS usable with different hardware setups #2 done) a hung scenario aborts at the per-test timeout with a traceback.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions