After leaving ping(8) running for several hours, I get the following statistics: 50199 packets transmitted, 50194 packets received, +5 duplicates, 0.0% packet loss round-trip min/avg/max/stddev = -1120352444249.007/-111591111.331/237.479/11180738897.087 ms Looks like some variables overflow.
Hi, I've been trying to recreate this, and can't - despite leaving ping running for several days I have not managed to get anything to overflow. Are you using a 32- or 64-bit host? Is it possible that the system time may have stepped back whilst the ping was running? Thanks, Gavin
(In reply to Gavin Atkinson from comment #1) > Hi, > > I've been trying to recreate this, and can't - despite leaving ping running > for several days I have not managed to get anything to overflow. Are you > using a 32- or 64-bit host? This is amd64 (as stated in bug report). > > Is it possible that the system time may have stepped back whilst the ping > was running? > Hard to tell now, I have ntpd running.
I've now had a ping running for five months, and haven't managed to produce any sort of overflow or similar that would produce the issue you saw. However, I can't find any other way of explaining it, either. -1120352444249 ms is ~35 years, it seems likely that you'd notice a jump of that size :)
Well, I observed this after about 1 day or running (+-), so may be you are right and ntpd stepped time back a bit? If this is a possible cause, then it is probably wise to close this PR. I never encountered the same after that.
I have created: https://reviews.freebsd.org/D38480 , which attempt to fix the current behavior.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=ea6d16926666a717e2c0a898b954d1477ac34804 commit ea6d16926666a717e2c0a898b954d1477ac34804 Author: Jose Luis Duran <jlduran@gmail.com> AuthorDate: 2023-02-09 23:38:54 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2023-03-19 16:24:06 +0000 ping: Avoid reporting negative time statistics Display a warning when the time goes back. PR: 192417 Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D38480 sbin/ping/ping.c | 8 +++++++- sbin/ping/tests/test_ping.py | 30 +++++++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-)