You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
time_jumps_validator counts a repeated Sync frame as a new valid frame #325
Summary: The time jumps validator treats a re-delivered Sync frame as a new valid frame
Description: The daemon polls the slave's snapshot every cycle. If no new Sync arrives in that time, it gets the same Sync frame again. TimeJumpsValidator counts each delivery as another valid frame, so a time jump flag is cleared after valid_frames_threshold_ (2) deliveries instead of 2 new frames. For example, a jump to the future followed by the same frame delivered twice is cleared, although nothing new has been observed. Found while developing integration tests.
Root cause: In kTimeJumpHandling, SyncFramesHandler runs the jump check against last_sync_frame_ for every delivery (time_jumps_validator.cpp). An identical frame passes the check, because its T2 is not less than the previous T2. valid_frames_cnt_ is then incremented and the jump is cleared once the threshold is reached. Fix by comparing sync_fup_data.sequence_id with that of last_sync_frame_ and ignoring a repeat, so it is neither a valid frame nor a jump. A related gap: while in kIdle and kInitialSyncDebouncing, HandleIdleState and HandleInitialSyncDebouncingState pass upstream jump flags through unchanged (L110). A stale snapshot after a restart could therefore deliver a jump that the validator never validated. The validator should clear those flags in those two states.
Impact: Jump flags are cleared sooner than the requirement intends (two valid frames). Applications may resume trusting the time base while no new data has been verified.
Notification required: Yes. The safety manager, because the debounce of the time jump indication is a verification mechanism of the ASIL_B daemon.
Activity