The Watchdog That Kept Petting a Dead Sidelink Stack

The most expensive watchdog bug on a V2X node is a heartbeat that proves the wrong thing. The pet comes from a high-priority housekeeping thread that never depends on the sidelink pipeline. That thread keeps running when the receive and transmit path freezes, so the hardware timer never expires. The node stays up, looks healthy on every dashboard, and keeps broadcasting a vehicle position that stopped updating some time ago.

Why review approves it

Every line of the configuration is valid on its own. The watchdog partition gets its own core or a guaranteed scheduling window, which is exactly what a reviewer trained on temporal isolation wants to see, and the timeout matches the value in the safety concept. Nobody asks what the heartbeat actually depends on, because that is a data dependency, not a scheduling property, and the manifest does not express it. Functional safety standards such as ISO 26262 ask you to show the monitor is independent of the thing it supervises. Teams often stretch that requirement into making the heartbeat independent of the supervised work as well, which gives you a monitor that cannot see the failure it exists to catch.

Isolation is not the same as supervision

A partitioned microkernel does its job well here: when the sidelink stack deadlocks on a mutex or spins in a decoder, spatial and temporal partitioning keep that fault from spreading into the monitor. That containment is what lets the rest of the node survive one part failing, but it also hides the failure from a monitor that only checks whether it is still being scheduled. Survival depends on a second link, where the monitor turns evidence of progress into an action. The fix is to make the stage that matters advance a sequence counter, such as the point where a decoded message reaches the application or where a fresh position enters the transmit queue, and to pet the watchdog only if that counter moved since the last check. The pet thread can stay isolated and high priority, because now it reports a fact about the pipeline instead of a fact about itself.

A detection step you can run today

On a test node, find the process or partition that runs sidelink receive and decode, suspend it while leaving everything else running (send SIGSTOP on a Linux host, or use the kernel debug suspend on a microkernel target), then run wdctl in a loop and watch the Timeleft field. If Timeleft keeps refilling while the pipeline is frozen, your watchdog is supervising its own pet thread, and you have reproduced the incident without waiting for production to do it for you. Do the same for the transmit path, and check on the air or in the radio driver counters whether broadcasts continue with an unchanged position. In our experience, a rough estimate, most nodes that fail this test fail on both paths, because the same housekeeping thread serves both.

The rule to put in the manifest

With a typical hardware watchdog timeout of 100 ms, set the budget so that watchdog timeout plus the time to reach the degraded state, which means radio transmit muted or flagged as stale, stays below the age at which a broadcast position becomes misleading for the receivers' use case, and refuse any heartbeat source that cannot prove the pipeline advanced during that window. The tradeoff is real. Progress-gated heartbeats reset the node on legitimate quiet periods, such as an empty channel with no messages to decode, so the receive counter has to count completed scheduling cycles of the decoder rather than decoded messages, and someone has to decide whether a node that is alive but not hearing anyone should stay silent or keep transmitting. That decision belongs in the safety concept, not in a code review comment.

Should the watchdog just reset the whole node when the pipeline stalls?

Usually not as the first action. Muting or flagging sidelink transmission within the budget is what protects other vehicles, and a full reset costs boot and resynchronisation time during which the node is blind. Keep the hardware reset as the backstop for the case where the degrade path itself does not run.

Back to V2XKernel · Domains

← Back to V2XKernel
Engineering & Architecture Brief

The Watchdog That Kept Petting a Dead Sidelink Stack

The most expensive watchdog bug on a V2X node is a heartbeat that proves the wrong thing. The pet comes from a high-priority housekeeping thread that never depends on the sidelink pipeline. That thread keeps running when the receive and transmit path freezes, so the hardware timer never expires. The node stays up, looks healthy on every dashboard, and keeps broadcasting a vehicle position that stopped updating some time ago.

Why review approves it

Every line of the configuration is valid on its own. The watchdog partition gets its own core or a guaranteed scheduling window, which is exactly what a reviewer trained on temporal isolation wants to see, and the timeout matches the value in the safety concept. Nobody asks what the heartbeat actually depends on, because that is a data dependency, not a scheduling property, and the manifest does not express it. Functional safety standards such as ISO 26262 ask you to show the monitor is independent of the thing it supervises. Teams often stretch that requirement into making the heartbeat independent of the supervised work as well, which gives you a monitor that cannot see the failure it exists to catch.

Isolation is not the same as supervision

A partitioned microkernel does its job well here: when the sidelink stack deadlocks on a mutex or spins in a decoder, spatial and temporal partitioning keep that fault from spreading into the monitor. That containment is what lets the rest of the node survive one part failing, but it also hides the failure from a monitor that only checks whether it is still being scheduled. Survival depends on a second link, where the monitor turns evidence of progress into an action. The fix is to make the stage that matters advance a sequence counter, such as the point where a decoded message reaches the application or where a fresh position enters the transmit queue, and to pet the watchdog only if that counter moved since the last check. The pet thread can stay isolated and high priority, because now it reports a fact about the pipeline instead of a fact about itself.

A detection step you can run today

On a test node, find the process or partition that runs sidelink receive and decode, suspend it while leaving everything else running (send SIGSTOP on a Linux host, or use the kernel debug suspend on a microkernel target), then run wdctl in a loop and watch the Timeleft field. If Timeleft keeps refilling while the pipeline is frozen, your watchdog is supervising its own pet thread, and you have reproduced the incident without waiting for production to do it for you. Do the same for the transmit path, and check on the air or in the radio driver counters whether broadcasts continue with an unchanged position. In our experience, a rough estimate, most nodes that fail this test fail on both paths, because the same housekeeping thread serves both.

The rule to put in the manifest

With a typical hardware watchdog timeout of 100 ms, set the budget so that watchdog timeout plus the time to reach the degraded state, which means radio transmit muted or flagged as stale, stays below the age at which a broadcast position becomes misleading for the receivers' use case, and refuse any heartbeat source that cannot prove the pipeline advanced during that window. The tradeoff is real. Progress-gated heartbeats reset the node on legitimate quiet periods, such as an empty channel with no messages to decode, so the receive counter has to count completed scheduling cycles of the decoder rather than decoded messages, and someone has to decide whether a node that is alive but not hearing anyone should stay silent or keep transmitting. That decision belongs in the safety concept, not in a code review comment.

Technical FAQ: Should the watchdog just reset the whole node when the pipeline stalls?

Usually not as the first action. Muting or flagging sidelink transmission within the budget is what protects other vehicles, and a full reset costs boot and resynchronisation time during which the node is blind. Keep the hardware reset as the backstop for the case where the degrade path itself does not run.

Related Architecture Specifications (AUTOMOTIVEV2X): v2xstation.com · v2xconnectivity.com · 3dv2x.com

More Technical Articles on v2xkernel.com

Evaluating Inter-Process Communication (IPC) Throughput in Multi-Core Automotive Microkernels →Deterministic Dynamic Memory Allocation: Eliminating Heap Fragmentation in V2X Routers →Catching Sporadic Server Budget Mismatches in Sidelink Microkernels Before Deployment →