Inspiration

Modern connected vehicles face two distinct moments where guessing state can be catastrophic:

  1. Parked (0 km/h) — Interrupted OTA Updates: If an update worker crashes mid-commit (unknown_outcome), guessing which firmware slot is valid risks bricking an ECU or booting a half-written image.
  2. In Motion — Partitioned Cooperative Driving: If V2X / zone links partition or drop packets at an intersection, guessing a peer vehicle's stale trajectory risks collisions.

PDX Guardian applies one fail-closed engineering principle across both operational states:

When interrupted or partitioned, fail closed—never guess. Verify before activation, fall back deterministically, reconcile after interruption, and preserve cryptographic evidence.


What it does

PDX Guardian keeps heavy Python orchestration off the vehicle RTOS and enforces deterministic C safety gates directly on QNX Neutrino 8.0:

  1. Pillar 1 — Stationary OTA Safety Gate (/dev/pdxguardian, qnx/guardian-gate/guardian_gate.c):

    • Enforces OpenSSL 3 Ed25519 signature verification, SHA-256 payload integrity, monotonic anti-rollback, hardware revision checks (DENY_HW_REV), and a stationary-vehicle interlock (DENY_NOT_STATIONARY whenever speed > 0).
    • Persists every state transition in an fsync-checked hash-chained journal on qnx6 (/data), reconciling SIGKILL process crashes deterministically across 3 commit points (T07/T07B -> RECONCILED_ABORTED, T07C -> RECONCILED_ACTIVATED). (Note: SIGKILL tests user-space process crashes; physical power-cut durability relies on fs-qnx6 semantics and was not physically tested. SLOT_A/SLOT_B are simulated slot directories.)
  2. Pillar 2 — In-Motion Cooperative Driving-Plan Exchange (tests/dsx_air_fleet/qnx_veh_host.c):

    • While vehicles traverse j1 / j2 / j3 intersections in SUMO 1.28+ simulation (60–600 vehicles, STEP_MS = 100 in intent_protocol.py), native QNX qnx_veh_host.elf nodes broadcast pdx.driving_intent.v2 (DrivingIntentV2 in Python, driving_intent.v2 in qnx_veh_host.c) at most every 200 ms (BROADCAST_PERIOD_MS = 200, TTL_MS_DEFAULT = 500) over UDP.
    • Under network partitions or occlusion, stale/expired packets are dropped (stale_dropped) and vehicles fall back to a local physical stopping-distance invariant (v*tau + v^2/(2*a) + margin), followed by two-stage recovery (intent_ready -> coop_recovered).
  3. Same-Guest Coexistence & Off-Vehicle Audit (scripts/run_coexistence_e2e.py, host/):

    • Running both daemons concurrently in the same QNX 8.0 guest demonstrates that in-motion OTA attempts (72 km/h) fail closed (10/10 DENY_NOT_STATIONARY) while steady-state STEP_BATCH median latency stays unchanged (p50 = 443 µs vs post-OTA Baseline 2 443 µs, with slightly higher tail), and parking (0 km/h) unlocks SLOT_B activation.
    • Off-vehicle, pdx-artifact-engine==0.3.0a12 and prodocux==0.3.0rc11 verify receipts and seal tamper-evident prodocux.evidence_bundle audit artifacts.

Where QNX is used

Component QNX 8.0 Technologies & APIs Used Role
OTA Safety Gate (qnx/guardian-gate/guardian_gate.c, gate_submit.c) QNX Resource Manager (dispatch_create, resmgr_attach, iofunc_*, MsgReply serving /dev/pdxguardian via POSIX open/write/read), qnx6 (mount-verified /data, fsync + atomic rename) Core QNX-native admission control, stationary interlock, and crash-safe journal reconciliation
ECU Priority Isolation (qnx/ecu-simulator/jitter_bench.c) SCHED_FIFO (prio 50) vs SCHED_RR (prio 10), ThreadCtl, ClockPeriod() readback, clock_gettime(CLOCK_MONOTONIC) Measures real-time priority isolation and QSTI 1 ms tick quantization
In-Motion Cooperative Host (tests/dsx_air_fleet/qnx_veh_host.c) QNX 8.0 ntox86_64 POSIX & io-sock (pidin-verified, UDP/TCP sockets with -lsocket, pthread, clock_gettime(CLOCK_MONOTONIC), uname) Executes driving_intent.v2 exchange and stopping-distance safety arbitration inside QNX 8.0 guests

(For **Best Use of QNX-specific Technologies, our primary QNX-native depth lies in the /dev/pdxguardian Resource Manager, qnx6 journal durability, and SCHED_FIFO/SCHED_RR isolation.)


Measured Results (Verified in evidence/ & tests/dsx_air_fleet/)

  • OTA Gate & Crash Fault Injection (T01–T10, QNX 8.0 QEMU): 10 / 10 cases passed, including signature/hash/rollback/hardware/speed rejections, SIGKILL recovery at all 3 commit points, uncertain lock (T09), and tampered journal blocking (T10), with raw serial transcripts in evidence/week3/qnx_serial_transcript.log.
  • In-Motion Fleet Safety (SUMO 1.28+ + QNX 8.0, 60 -> 600 vehicles):
    • Across Single-Guest TCG, 3-Guest, Cross-Host ~1000 km WAN (TCP RTT 88.44–91.47 ms), and OCI Intra-Region KVM (0.22 ms LAN), all 21 QNX runs recorded 0 collisions, 0 unsafe commands, all injected stale replay packets dropped (gw_replay_pids.issubset(rx_stale_pids), 20–200 stale_dropped_total), and 100% 2-stage recovery (8/8 to 17/17 vehicles).
    • On OCI KVM (out_oci_lan/qnx_oci_lan_results.json, 60 -> 600 vehicles), dedicated qnx-zone-c scaled from p99 = 1.83 ms to 8.79 ms, while shared 1-OCPU qnx-zone-a / b reached 85.27 ms / 84.12 ms at 600 vehicles due to host CPU contention.
  • Host-Side Python Reference Negative Control (run_negative_control_sumo.py, 10 seeds 42–51):
    • Because SUMO's default car-following baseline (sumo_baseline_results.json) also records 0 collisions, we evaluated the host-side Python reference model (InProcessVehicleNode in intent_protocol.py, 60 vehicles, speedMode=7, 5.5–7.5 s partition + 20 replay packets) across 3 arms: cooperative (0 / 10 seeds collided, 11,800 stale_dropped), accept_stale_only (0 / 10 seeds collided, keeping stopping-distance fallback), and trust_stale_no_fallback (2 / 10 seeds collided, 2 total collisions; 11,800 stale deliveries accepted by construction across 10 × 20 × 59 peer deliveries). That accept_stale_only stays at 0 / 10 shows the local stopping-distance invariant—not stale-packet filtering alone—prevented collisions in this scenario; 2 / 10 vs. 0 / 10 is a directional result (two-tailed Fisher's exact p ≈ 0.47), not a statistically significant proof.
  • Same-Guest Dual-Pillar Coexistence (evidence/coexistence/qnx_coexistence_results.json, QNX 8.0 QEMU TCG, single run n = 600 iters):
    • Captures clean mount (/dev/hd0t179 on /data type qnx6) and pidin (io-sock PID 81931, qnx_veh_host.elf PID 2248734).
    • While qnx_veh_host.elf (150-veh equiv, 17,500 UDP packets across the run) overlapped 10 signed OTA attempts at --speed 72 (ota_dispatch=1795075149.903..1795075161.758 spanning STEP_BATCH=1795075150.093..1795075161.741), 10 / 10 OTA attempts returned DENY_NOT_STATIONARY (SLOT_A v10, chain_valid=true). Compared against post-OTA steady-state Baseline 2, median STEP_BATCH latency was unchanged (p50 = 443 µs vs 443 µs), while tail latency was higher (p99 = 1,103 µs vs 854 µs, max = 15,741 µs vs 1,434 µs — < 16% of the 100 ms budget; pre-settle Baseline 1 p50 = 4,311 µs overlapped post-boot TCG initialization). Parking (--speed 0) admitted v11 (ALLOW, SLOT_B, chain_valid=true).
  • Honest Virtualization Diagnostics (Jitter & KVM-vs-KVM A/B):
    • In jitter_bench.c (30,000 samples/arm), both QEMU TCG and 1-OCPU nested /dev/kvm failed our pre-frozen bare-metal thresholds (p99 <= 250 µs); ClockPeriod() probing returned ENOTSUP below 1 ms, consistent with 1 ms QSTI tick-phase quantization (--phase-offset-us) and 1-OCPU SMT fsync contention.
    • In fair KVM-vs-KVM STEP_BATCH A/B (OP 'B', 200 -> 20 veh/zone, compiled with qcc/SDP vs gcc), QEMU SLIRP TCP RTT was lower on Ubuntu 24.04 (1.80 ms vs 10.55 ms p50 at 200/zone); in-guest compute_p50 was lower on QNX 8.0.0 across all 4 scales (9.0–131.0 µs vs 13.0–187.0 µs), while at 200/zone compute_p99 was 78.7 ms on QNX vs 61.4 ms on Ubuntu.

Provenance, AI Disclosure & Known Limitations

  • Built New for QNX Global Hackathon 2026: qnx/, portable/, host/fleet-controller/, scripts/, tests/qnx_dual_host/, tests/dsx_air_fleet/, and docs/hackathon_dashboard.html.
  • Pre-Existing Host Libraries: pdx-artifact-engine==0.3.0a12 and prodocux==0.3.0rc11 (strictly off-vehicle on the host plane; see docs/ENGINE_BOUNDARY.md).
  • AI Disclosure: AI coding assistants were used during development; any future AI audit summarization remains strictly off-vehicle and never participates in /dev/pdxguardian admission decisions.
  • Known Limitations: Virtualized QEMU/KVM evaluation only (no physical ECU hardware, TPM/HSM, or physical power-cut rig); simulated A/B slot directories; host-side Python negative-control model is not cross-validated against a C trust_stale build; not a formal ISO 26262 ASIL or UNECE R155/R156 certification.

Judge Quickstart

  • Zero-setup interactive dashboard: Open docs/hackathon_dashboard.html directly in any browser.
  • Technical evidence matrix: See docs/QNX_EVIDENCE.md and docs/DEPLOYMENT.md.
  • 30-minute hands-on tutorial: See docs/CODELAB.md.

Built With

  • c
  • cpp
  • docker
  • ed25519
  • html5
  • javascript
  • kvm
  • openssl
  • ota
  • pdx-artifact-engine
  • posix
  • prodocux
  • python
  • qemu
  • qnx
  • qnx-neutrino-8.0
  • real-time-os
  • sched-fifo
  • sha256
  • sumo
  • svg
  • tcp-ip
  • traci
  • v2x
Share this project:

Updates

Submission history