Clock fuzzing bugs
Richard Laager
rlaager at wiktel.com
Mon Nov 25 07:12:23 UTC 2019
On 11/24/19 3:41 AM, Hal Murray via devel wrote:
> rlaager at wiktel.com said:
>> I can build from git or with whatever patches, if needed. If something is
>> wrong with this clock fuzzing code, I'd love to help get to the bottom of it,
>> but this doesn't seem like the sort of thing I can sort out by myself.
>
> I don't have any good ideas.
>
> Can you try running with ntpd locked to a particular CPU?
No change.
> There is another clock toy in ntpsec/attic/clocks.c
rlaager at ntp2:~$ ./a.out
res avg min dups CLOCK
1 31 29 CLOCK_REALTIME
4000000 9 3999945 -4 CLOCK_REALTIME_COARSE
1 30 26 CLOCK_MONOTONIC
1 380 366 CLOCK_MONOTONIC_RAW
1 389 374 CLOCK_BOOTTIME
Found faster: 29 => -3
Histogram: CLOCK_REALTIME, 1 ns per bucket, 1000000 samples.
ns hits
26 49938
27 531902
28 49731
29 117
30 368271
36 1
39 1
51 1
57 1
69 1
36 samples were bigger than 69.
rlaager at ntp2:~$ ./a.out
res avg min dups CLOCK
1 28 26 CLOCK_REALTIME
4000000 8 3999946 -1 CLOCK_REALTIME_COARSE
1 28 24 CLOCK_MONOTONIC
1 380 368 CLOCK_MONOTONIC_RAW
1 390 374 CLOCK_BOOTTIME
Histogram: CLOCK_REALTIME, 1 ns per bucket, 1000000 samples.
ns hits
26 49229
27 523381
28 48989
29 153
30 378207
32 1
33 1
36 3
39 1
56 1
34 samples were bigger than 56.
rlaager at ntp2:~$ ./a.out
res avg min dups CLOCK
1 28 26 CLOCK_REALTIME
4000000 8 3999945 -1 CLOCK_REALTIME_COARSE
1 28 24 CLOCK_MONOTONIC
1 377 366 CLOCK_MONOTONIC_RAW
1 389 377 CLOCK_BOOTTIME
Histogram: CLOCK_REALTIME, 1 ns per bucket, 1000000 samples.
ns hits
26 49233
27 523451
28 48993
29 163
30 378123
33 2
36 1
39 1
42 1
45 1
31 samples were bigger than 45.
--
Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20191125/0f9de7f4/attachment-0001.bin>
More information about the devel
mailing list