[ntp:questions] Clock jumps when refclock used

A C agcarver+ntp at acarver.net
Tue Apr 17 20:01:27 UTC 2012


On 4/17/2012 03:05, Dave Hart wrote:
> On Mon, Apr 16, 2012 at 03:08, A C<agcarver+ntp at acarver.net>  wrote:
>> Also, using a default mindist makes the system more prone to just jumping
>> randomly.  I did not have a clock jump with the mindist set to 0.001 for the
>> many days that it was running.  However, today after I restarted to use a
>> default mindist, my clock went crazy.  The servers were continually
>> reachable so it wasn't a loss of the source time.
>
> I suspect bad floating point results as the cause.  In looking at:
>
> http://www.sparc.org/standards/V8.pdf

I'll need to look there for the V7 since that's what I have.  V8 is the 
later edition for SparcStation 10's and 20's.  The IPX and IPC are V7 
designs.

>
> =========
> The software must be capable of simulating the entire FPU to properly handle the
> unimplemented_FPop, unfinished_FPop, and IEEE_754_exception
> floating-point traps. Thus, a
> user application program always “sees” an FSR that is fully compliant
> with ANSI/IEEE Standard
> 754-1985.
> =========
>
> I'm not sure if that literally means the entire logic of the FPU
> hardware must be simulated in the trap handlers, but in context it's
> clear a lot of IEEE corner cases were partially handled in such
> software by SPARCv8 designs.
>
> It's just a hunch and I hope I'm wrong, but you might want to spend
> some time torture-testing your floating-point capability to see if it
> holds up.  I saw mention of a paranoia.c that might do the job on:
>
> http://www.math.utah.edu/~beebe/software/ieee/
>
> You can download the overall collection tarball to get paranoia.c
> paranoia.h and a Makefile and try "make paranoia".  If it builds,
> invoke ./paranoia and see if any problems are mentioned in the output.

I'll try that out and see what happens.  Maybe it'll at least provide a 
clue to the NetBSD people.


>
>> And the rawstats for that period (the failure occured near 5300 seconds
>> according to loopstats):
>> 56033  5152.783 169.229.70.201 10.0.0.21 3543528352.739929283
>> 3543528352.764031522 3543528352.764062804 3543528352.780930586
>> 56033  5209.835 64.73.32.134 10.0.0.21 3543528409.734505651
>> 3543528409.787201881 3543528409.787210941 3543528409.832910031
>> 56033  5368.802 130.207.165.28 10.0.0.21 3543528568.720955152
>> 3543528568.771177725 3543528568.771267000 3543528568.799973991
>> 56033  5378.830 131.144.4.10 10.0.0.21 3543528578.730018656
>> 3543528578.780499937 3543528578.780506681 3543528578.827933375
>> 56033  5389.767 69.64.72.238 10.0.0.21 3543528589.729599959
>> 3543528589.754235978 3543528589.754279960 3543528589.764874756
>>
>> The matching loopstats:
>> 56033  4865.842  0.005117423 -77.438  0.000384023  0.015663 8
>> 56033  5380.827  0.002828855 -77.432  0.000885287  0.014776 8
>> 56033  5909.823  0.005407926 -77.421  0.001231754  0.014326 8
>
> I'm not seeing anything unusual around 5300 seconds in either file.
> Please enlighten me.

Somewhere around this time the clock simply stepped without a step 
message being emitted in the log file.  Within a polling cycle or two it 
was out of sync with the world by tens of seconds.

In fact it just happened again today.  Shortly after a few fuzz messages 
the whole thing was out of sync by over 40 seconds later becoming over 
200 (ntpd had to make 128 second steps twice).

This time it happened around 37320 seconds into the log.  Rawstats for 
that period:

> 56034 35145.873 216.144.229.211 10.0.0.21 3543644745.844234321 3543644745.857851910 3543644745.857879468 3543644745.870494284
> 56034 35193.960 108.61.73.244 10.0.0.21 3543644793.845352352 3543644793.903935959 3543644793.903969154 3543644793.958156786
> 56034 35215.929 130.207.165.28 10.0.0.21 3543644815.847868318 3543644815.893806034 3543644815.893849000 3543644815.926828800
> 56034 35348.918 204.9.54.119 10.0.0.21 3543644948.838787081 3543644948.879217399 3543644948.880699000 3543644948.916031130
> 56034 35390.940 131.144.4.10 10.0.0.21 3543644990.839980128 3543644990.885565893 3543644990.885572655 3543644990.937839955
> 56034 35403.869 216.144.229.211 10.0.0.21 3543645003.840184346 3543645003.853920179 3543645003.853951199 3543645003.866471967
> 56034 35453.958 108.61.73.244 10.0.0.21 3543645053.843408054 3543645053.901769969 3543645053.901794436 3543645053.955792439
> 56034 35484.927 130.207.165.28 10.0.0.21 3543645084.846375809 3543645084.891998171 3543645084.892059000 3543645084.924646907
> 56034 35612.924 204.9.54.119 10.0.0.21 3543645212.845165331 3543645212.885843100 3543645212.886708000 3543645212.921735660
> 56034 35654.948 131.144.4.10 10.0.0.21 3543645254.847272394 3543645254.892993845 3543645254.893001685 3543645254.945760494
> 56034 35668.906 216.144.229.211 10.0.0.21 3543645268.838941362 3543645268.853027313 3543645268.853055469 3543645268.865765272
> 56034 35712.965 108.61.73.244 10.0.0.21 3543645312.849462152 3543645312.908008945 3543645312.908034573 3543645312.962002477
> 56034 35752.931 130.207.165.28 10.0.0.21 3543645352.848511846 3543645352.894539473 3543645352.894582001 3543645352.929113639
> 56034 35874.922 204.9.54.119 10.0.0.21 3543645474.843421566 3543645474.883474941 3543645474.884646000 3543645474.919742882
> 56034 35919.942 131.144.4.10 10.0.0.21 3543645519.842446596 3543645519.887869871 3543645519.887876534 3543645519.940066707
> 56034 35936.873 216.144.229.211 10.0.0.21 3543645536.844817375 3543645536.858011624 3543645536.858040429 3543645536.870901261
> 56034 35982.960 108.61.73.244 10.0.0.21 3543645582.845020835 3543645582.902994997 3543645582.903026802 3543645582.957611911
> 56034 36009.929 130.207.165.28 10.0.0.21 3543645609.847021779 3543645609.892987346 3543645609.893110000 3543645609.926523462
> 56034 36138.926 204.9.54.119 10.0.0.21 3543645738.847615716 3543645738.887895594 3543645738.888861001 3543645738.924086494
> 56034 36188.948 131.144.4.10 10.0.0.21 3543645788.848811432 3543645788.894379674 3543645788.894386833 3543645788.946216210
> 56034 36207.868 216.144.229.211 10.0.0.21 3543645807.839340164 3543645807.853080481 3543645807.853105501 3543645807.865720700
> 56034 36250.955 108.61.73.244 10.0.0.21 3543645850.840281792 3543645850.898383994 3543645850.898412426 3543645850.953004204
> 56034 36280.916 130.207.165.28 10.0.0.21 3543645880.835213141 3543645880.881109390 3543645880.881172001 3543645880.914079712
> 56034 36666.934 204.9.54.119 10.0.0.21 3543646266.852382057 3543646268.723068584 3543646268.723909000 3543646266.929885181
> 56034 36717.939 131.144.4.10 10.0.0.21 3543646317.839060306 3543646319.967438763 3543646319.967446701 3543646317.936588169
> 56034 36724.863 216.144.229.211 10.0.0.21 3543646324.834584554 3543646326.965318532 3543646326.965346134 3543646324.861189822
> 56034 36764.952 108.61.73.244 10.0.0.21 3543646364.837561266 3543646367.210819976 3543646367.210846396 3543646364.949952188
> 56034 36794.920 130.207.165.28 10.0.0.21 3543646394.839706847 3543646397.348442052 3543646397.348532001 3543646394.918058231
> 56034 37192.930 204.9.54.119 10.0.0.21 3543646792.839972519 3543646797.312494581 3543646797.324534000 3543646792.927979859
> 56034 37231.940 131.144.4.10 10.0.0.21 3543646831.837847796 3543646836.509173951 3543646836.509181757 3543646831.935140529
> 56034 37241.930 216.144.229.211 10.0.0.21 3543646841.901628722 3543646846.590767821 3543646846.590795601 3543646841.928121213
> 56034 37280.954 108.61.73.244 10.0.0.21 3543646880.838525717 3543646885.764844968 3543646885.764879948 3543646880.950681792
> 56034 37336.921 130.207.165.28 10.0.0.21 3543646936.840709439 3543646942.031715597 3543646942.031781001 3543646936.919223358
> 56034 37706.919 204.9.54.119 10.0.0.21 3543647306.838667523 3543647313.855171656 3543647313.856044000 3543647306.916557243
> 56034 37750.948 131.144.4.10 10.0.0.21 3543647350.841790181 3543647358.080751858 3543647358.080759880 3543647350.939105127
> 56034 37762.871 216.144.229.211 10.0.0.21 3543647362.842835626 3543647370.109711086 3543647370.109757301 3543647362.869412630
> 56034 37800.965 108.61.73.244 10.0.0.21 3543647400.850786583 3543647408.349823988 3543647408.349861347 3543647400.963093178
> 56034 37853.960 130.207.165.28 10.0.0.21 3543647453.878928080 3543647461.628184466 3543647461.628253000 3543647453.957406952
> 56034 38236.042 204.9.54.119 10.0.0.21 3543647835.962022020 3543647845.596153439 3543647845.597058001 3543647836.039590361
> 56034 38265.949 131.144.4.10 10.0.0.21 3543647865.850636159 3543647875.637429671 3543647875.637437964 3543647865.947355866
> 56034 38286.866 216.144.229.211 10.0.0.21 3543647886.833811556 3543647896.692572829 3543647896.692608700 3543647886.859811517
> 56034 38316.957 108.61.73.244 10.0.0.21 3543647916.842399823 3543647926.894540946 3543647926.894578298 3543647916.954529895
> 56034 38388.921 130.207.165.28 10.0.0.21 3543647988.840054099 3543647999.236292333 3543647999.236341001 3543647988.918653859
> 56034 38748.917 204.9.54.119 10.0.0.21 3543648348.837249196 3543648361.009110666 3543648361.010257000 3543648348.914859404
> 56034 38792.936 131.144.4.10 10.0.0.21 3543648392.836322328 3543648405.231142628 3543648405.231148611 3543648392.933644574
> 56034 38816.871 216.144.229.211 10.0.0.21 3543648416.842331575 3543648429.323735290 3543648429.323763331 3543648416.868504915
> 56034 38829.955 108.61.73.244 10.0.0.21 3543648429.838240204 3543648442.428446942 3543648442.428482280 3543648429.950432780
> 56034 38931.917 130.207.165.28 10.0.0.21 3543648531.836027479 3543648544.918933657 3543648544.919049001 3543648531.914952453
> 56034 39260.950 204.9.54.119 10.0.0.21 3543648860.871460938 3543648875.576458640 3543648875.577334000 3543648860.947364696
> 56034 39307.934 131.144.4.10 10.0.0.21 3543648907.834218919 3543648922.776904888 3543648922.776913887 3543648907.932065065
> 56034 39347.866 216.144.229.211 10.0.0.21 3543648947.837370448 3543648962.946503805 3543648962.946527786 3543648947.864222938
> 56034 39355.953 108.61.73.244 10.0.0.21 3543648955.837998565 3543648971.031020975 3543648971.031046724 3543648955.950440074
> 56034 39471.918 130.207.165.28 10.0.0.21 3543649071.836663429 3543649087.590838696 3543649087.590912001 3543649071.915345348
> 56034 39790.923 204.9.54.119 10.0.0.21 3543649390.835977479 3543649408.163701639 3543649408.171711000 3543649390.920977502
> 56034 39820.940 131.144.4.10 10.0.0.21 3543649420.838214284 3543649438.319368858 3543649438.319377696 3543649420.935400439
> 56034 39875.867 216.144.229.211 10.0.0.21 3543649475.838559840 3543649493.559786640 3543649493.559811189 3543649475.864790275
> 56034 39890.958 108.61.73.244 10.0.0.21 3543649490.843292799 3543649508.683198949 3543649508.683233296 3543649490.955569582
> 56034 40007.919 130.207.165.28 10.0.0.21 3543649607.837154183 3543649626.243606101 3543649626.243666000 3543649607.917178729
> 56034 40324.914 204.9.54.119 10.0.0.21 3543649924.836184060 3543649944.805445027 3543649944.806297001 3543649924.912314805
> 56034 40334.936 131.144.4.10 10.0.0.21 3543649934.836775438 3543649954.860678921 3543649954.860686607 3543649934.933484521
> 56034 40402.871 216.144.229.211 10.0.0.21 3543650002.841946116 3543650023.170629081 3543650023.170656029 3543650002.868391220
> 56034 40417.957 108.61.73.244 10.0.0.21 3543650017.840086471 3543650038.287437978 3543650038.287472989 3543650017.952314775
> 56034 40528.925 130.207.165.28 10.0.0.21 3543650128.843160258 3543650149.827526037 3543650149.827589001 3543650128.922644930
> 56034 40859.924 204.9.54.119 10.0.0.21 3543650459.844596088 3543650482.461569748 3543650482.462522000 3543650459.921597552

Here's the same period from the peers log, you can see the increase in 
offset from the ATOM refclock over two polling intervals (16 seconds) 
happens at 36294 through 36326.

> 56034 36006.845 127.127.22.0    9014  0.001425925  0.000000000  0.000353156  0.000122070
> 56034 36022.845 127.127.22.0    9014  0.001420611  0.000000000  0.000353156  0.000122070
> 56034 36038.846 127.127.22.0    9014  0.001416694  0.000000000  0.000353156  0.000122070
> 56034 36052.847 127.127.28.0    9014  0.012957472  0.000000000  0.001200793  0.004027696
> 56034 36054.847 127.127.22.0    9014  0.001413169  0.000000000  0.000353156  0.000122070
> 56034 36070.847 127.127.22.0    9014  0.001407558  0.000000000  0.000353156  0.000122070
> 56034 36086.847 127.127.22.0    9014  0.001404641  0.000000000  0.000353156  0.000122070
> 56034 36102.831 127.127.22.0    9014  0.001401007  0.000000000  0.000353156  0.000122070
> 56034 36116.848 127.127.28.0    9014  0.015425250  0.000000000  0.001124318  0.004173496
> 56034 36118.849 127.127.22.0    9014  0.001396796  0.000000000  0.000353156  0.000122070
> 56034 36134.841 127.127.22.0    9014  0.001392478  0.000000000  0.000353156  0.000122070
> 56034 36150.849 127.127.22.0    9014  0.001386464  0.000000000  0.000353156  0.000122070
> 56034 36166.849 127.127.22.0    9014  0.001384242  0.000000000  0.000353156  0.000122070
> 56034 36180.873 127.127.28.0    9014  0.019378805  0.000000000  0.001085678  0.005838572
> 56034 36182.849 127.127.22.0    9014  0.001381012  0.000000000  0.000353156  0.000122070
> 56034 36188.979 131.144.4.10    9314 -0.002979981  0.097316785  0.016531246  0.000461022
> 56034 36198.842 127.127.22.0    9014  0.001374415  0.000000000  0.000353156  0.000122070
> 56034 36214.842 127.127.22.0    9014  0.001372177  0.000000000  0.000353156  0.000122070
> 56034 36230.842 127.127.22.0    9014  0.001368249  0.000000000  0.000353156  0.000122070
> 56034 36244.842 127.127.28.0    9014  0.012822361  0.000000000  0.001322228  0.003632253
> 56034 36246.842 127.127.22.0    9014  0.001362435  0.000000000  0.000353156  0.000122070
> 56034 36262.822 127.127.22.0    9014  0.001359414  0.000000000  0.000353156  0.000122070
> 56034 36278.833 127.127.22.0    9014  0.001355386  0.000000000  0.000353156  0.000122070
> 56034 36294.847 127.127.22.0    9014  0.001350175  0.000000000  0.000353156  0.000122070
> 56034 36308.848 127.127.28.0    9014  0.015783694  0.000000000  0.001251144  0.002644527
> 56034 36310.846 127.127.22.0    9014  0.015117501  0.000000000  0.002350802  0.013754325
> 56034 36326.837 127.127.22.0    9014  0.112106099  0.000000000  0.003625973  0.108886076
> 56034 36342.836 127.127.22.0    9014  0.204665837  0.000000000  0.004628151  0.189421661
> 56034 36358.838 127.127.22.0    9014  0.274585710  0.000000000  0.004765066  0.238216048
> 56034 36372.839 127.127.28.0    9014  0.240380444  0.000000000  0.004190128  0.224582505
> 56034 36374.841 127.127.22.0    9014  0.348439473  0.000000000  0.004833523  0.281446557
> 56034 36390.840 127.127.22.0    9014  0.441989649  0.000000000  0.004867855  0.332192498
> 56034 36406.841 127.127.22.0    9014 -0.382192330  0.000000000  0.149001641  0.602156785
> 56034 36422.842 127.127.22.0    9014 -0.405385961  0.000000000  0.076951767  0.605449304
> 56034 36436.961 127.127.28.0    9014  0.563029889  0.000000000  0.005449576  0.521070346
> 56034 36438.952 127.127.22.0    9014 -0.326605185  0.000000000  0.040918965  0.519871774
> 56034 36454.879 127.127.22.0    9014 -0.247828687  0.000000000  0.022901380  0.440476490
> 56034 36470.838 127.127.22.0    9014 -0.173979401  0.000000000  0.013891385  0.374012982
> 56034 36486.837 127.127.22.0    9014 -0.090276686  0.000000000  0.009387642  0.326883084
> 56034 36500.844 127.127.28.0    9014  0.928229882  0.000000000  0.006170991  0.825831444
> 56034 36502.840 127.127.22.0    9014 -0.016423221  0.000000000  0.007135880  0.310589540
> 56034 36518.840 127.127.22.0    9014  0.067276907  0.000000000  0.006010204  0.331641129
> 56034 36534.842 127.127.22.0    9014  0.146046340  0.000000000  0.004884155  0.353246295
> 56034 36550.847 127.127.22.0    9014  0.234677463  0.000000000  0.004884510  0.362407821
> 56034 36564.846 127.127.28.0    9014  1.226126472  0.000000000  0.006217061  1.025336779
> 56034 36566.843 127.127.22.0    9014  0.313457542  0.000000000  0.004884308  0.362392322
> 56034 36582.840 127.127.22.0    9014  0.377457676  0.000000000  0.004884273  0.348926101
> 56034 36598.835 127.127.22.0    9014  0.471010737  0.000000000  0.004884347  0.360687221
> 56034 36614.837 127.127.22.0    9014 -0.450213660  0.000000000  0.004884646  0.696671721
> 56034 36628.838 127.127.28.0    9014  1.444693083  0.000000000  0.006205309  1.112639148
> 56034 36630.839 127.127.22.0    9014 -0.371437461  0.000000000  0.004884274  0.606333811
> 56034 36646.928 127.127.22.0    9014 -0.302506135  0.000000000  0.004884242  0.528667458
> 56034 36662.869 127.127.22.0    9014 -0.213881480  0.000000000  0.004884226  0.445065330
> 56034 36678.842 127.127.22.0    9014 -0.140032692  0.000000000  0.004883761  0.383300593


More information about the questions mailing list