
The day my ping took countermeasures
7/11/2023
This post details the author's investigation into 'ping' utility's 'taking countermeasures' message, triggered by a system clock rollback before NTP synchronization. It explains how 'ping' handles negative RTT measurements by resetting them to 0ms. The post also explores the challenges of tracing time-related system calls (gettimeofday) due to the use of VDSO, and demonstrates how to overcome this by using LD_PRELOAD to force fallback to slower syscalls. Finally, it showcases how strace's fault injection feature can be used to reliably trigger the 'taking countermeasures' message by manipulating the gettimeofday return value.




