Inspiration
Modern connected vehicles face two distinct moments where guessing state can be catastrophic:
- 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. - 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:
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_STATIONARYwheneverspeed > 0). - Persists every state transition in an
fsync-checked hash-chained journal onqnx6(/data), reconcilingSIGKILLprocess crashes deterministically across 3 commit points (T07/T07B -> RECONCILED_ABORTED,T07C -> RECONCILED_ACTIVATED). (Note:SIGKILLtests user-space process crashes; physical power-cut durability relies onfs-qnx6semantics and was not physically tested.SLOT_A/SLOT_Bare simulated slot directories.)
- Enforces OpenSSL 3 Ed25519 signature verification, SHA-256 payload integrity, monotonic anti-rollback, hardware revision checks (
Pillar 2 — In-Motion Cooperative Driving-Plan Exchange (
tests/dsx_air_fleet/qnx_veh_host.c):- While vehicles traverse
j1 / j2 / j3intersections in SUMO 1.28+ simulation (60–600vehicles,STEP_MS = 100inintent_protocol.py), native QNXqnx_veh_host.elfnodes broadcastpdx.driving_intent.v2(DrivingIntentV2in Python,driving_intent.v2inqnx_veh_host.c) at most every200 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).
- While vehicles traverse
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-stateSTEP_BATCHmedian latency stays unchanged (p50 = 443 µsvs post-OTABaseline 2443 µs, with slightly higher tail), and parking (0 km/h) unlocksSLOT_Bactivation. - Off-vehicle,
pdx-artifact-engine==0.3.0a12andprodocux==0.3.0rc11verify receipts and seal tamper-evidentprodocux.evidence_bundleaudit artifacts.
- Running both daemons concurrently in the same QNX 8.0 guest demonstrates that in-motion OTA attempts (
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 / 10cases passed, including signature/hash/rollback/hardware/speed rejections,SIGKILLrecovery at all 3 commit points, uncertain lock (T09), and tampered journal blocking (T10), with raw serial transcripts inevidence/week3/qnx_serial_transcript.log. - In-Motion Fleet Safety (SUMO 1.28+ + QNX 8.0,
60 -> 600vehicles):- Across Single-Guest TCG, 3-Guest, Cross-Host
~1000 kmWAN (TCP RTT 88.44–91.47 ms), and OCI Intra-Region KVM (0.22 msLAN), all 21 QNX runs recorded 0 collisions, 0 unsafe commands, all injected stale replay packets dropped (gw_replay_pids.issubset(rx_stale_pids),20–200stale_dropped_total), and 100% 2-stage recovery (8/8to17/17vehicles). - On OCI KVM (
out_oci_lan/qnx_oci_lan_results.json,60 -> 600vehicles), dedicatedqnx-zone-cscaled fromp99 = 1.83 msto8.79 ms, while shared1-OCPUqnx-zone-a / breached85.27 ms/84.12 msat600vehicles due to host CPU contention.
- Across Single-Guest TCG, 3-Guest, Cross-Host
- Host-Side Python Reference Negative Control (
run_negative_control_sumo.py, 10 seeds42–51):- Because SUMO's default car-following baseline (
sumo_baseline_results.json) also records0collisions, we evaluated the host-side Python reference model (InProcessVehicleNodeinintent_protocol.py,60vehicles,speedMode=7,5.5–7.5 spartition +20replay packets) across 3 arms:cooperative(0 / 10seeds collided,11,800stale_dropped),accept_stale_only(0 / 10seeds collided, keeping stopping-distance fallback), andtrust_stale_no_fallback(2 / 10seeds collided,2total collisions;11,800stale deliveries accepted by construction across10 × 20 × 59peer deliveries). Thataccept_stale_onlystays at0 / 10shows the local stopping-distance invariant—not stale-packet filtering alone—prevented collisions in this scenario;2 / 10vs.0 / 10is a directional result (two-tailed Fisher's exactp ≈ 0.47), not a statistically significant proof.
- Because SUMO's default car-following baseline (
- Same-Guest Dual-Pillar Coexistence (
evidence/coexistence/qnx_coexistence_results.json, QNX 8.0 QEMU TCG, single runn = 600iters):- Captures clean
mount(/dev/hd0t179 on /data type qnx6) andpidin(io-sockPID81931,qnx_veh_host.elfPID2248734). - While
qnx_veh_host.elf(150-veh equiv,17,500UDP packets across the run) overlapped 10 signed OTA attempts at--speed 72(ota_dispatch=1795075149.903..1795075161.758spanningSTEP_BATCH=1795075150.093..1795075161.741), 10 / 10 OTA attempts returnedDENY_NOT_STATIONARY(SLOT_A v10,chain_valid=true). Compared against post-OTA steady-stateBaseline 2, medianSTEP_BATCHlatency was unchanged (p50 = 443 µsvs443 µs), while tail latency was higher (p99 = 1,103 µsvs854 µs,max = 15,741 µsvs1,434 µs—< 16%of the100 msbudget; pre-settleBaseline 1p50 = 4,311 µsoverlapped post-boot TCG initialization). Parking (--speed 0) admittedv11(ALLOW,SLOT_B,chain_valid=true).
- Captures clean
- Honest Virtualization Diagnostics (Jitter & KVM-vs-KVM A/B):
- In
jitter_bench.c(30,000samples/arm), both QEMU TCG and 1-OCPU nested/dev/kvmfailed our pre-frozen bare-metal thresholds (p99 <= 250 µs);ClockPeriod()probing returnedENOTSUPbelow1 ms, consistent with1 msQSTI tick-phase quantization (--phase-offset-us) and 1-OCPU SMTfsynccontention. - In fair KVM-vs-KVM
STEP_BATCHA/B (OP 'B',200 -> 20veh/zone, compiled withqcc/SDP vsgcc), QEMU SLIRP TCP RTT was lower on Ubuntu 24.04 (1.80 msvs10.55 msp50at200/zone); in-guestcompute_p50was lower on QNX 8.0.0 across all 4 scales (9.0–131.0 µsvs13.0–187.0 µs), while at200/zonecompute_p99was78.7 mson QNX vs61.4 mson Ubuntu.
- In
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/, anddocs/hackathon_dashboard.html. - Pre-Existing Host Libraries:
pdx-artifact-engine==0.3.0a12andprodocux==0.3.0rc11(strictly off-vehicle on the host plane; seedocs/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/pdxguardianadmission 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_stalebuild; not a formal ISO 26262 ASIL or UNECE R155/R156 certification.
Judge Quickstart
- Zero-setup interactive dashboard: Open
docs/hackathon_dashboard.htmldirectly in any browser. - Technical evidence matrix: See
docs/QNX_EVIDENCE.mdanddocs/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