RE: Corrected gettimeofday() test code

From: Don Bowman (don_at_sandvine.com)
Date: 11/30/03

  • Next message: Marc G. Fournier: "RE: Corrected gettimeofday() test code"
    To: 'Kris Kennaway' <kris@obsecurity.org>, stable@FreeBSD.org
    Date: Sat, 29 Nov 2003 18:28:00 -0500
    
    
    

    From: Kris Kennaway [mailto:kris@obsecurity.org]
    >
    > I forwarded the reports of timecounter problems to phk, and he asked
    > that people who are seeing timecounter problems provide FULL details
    > of their system configuration, including:
    >
    > * dmesg
    >
    > * kernel configuration
    >
    > * compiler options
    >
    > * time-related system configuration (whether ntpd/timed/ntpdate is
    > running, and if so whether it's correcting for a seriously drifting
    > clock)
    >
    > * The kernel timecounter configuration, e.g. the
    > kern.timecounter.method and kern.timecounter.hardware sysctls, and
    > whether changing them has any effect.
    >
    > * The exact output of the corrected test program below (the original
    > would give spurious errors if it didn't run at least once a second,
    > which may have been confusing some people if their systems were
    > sufficiently loaded).
    >
    > * The system status when the problem is observed (i.e. does it only
    > occur under load; what else is running at the time)
    >

    For this config (below), kern.timecounter.method=0 reproduces the
    problem, kern.timecounter.method=1 does not.

    Output in 'error' case:
    1070147643.248866 1070147651.028646 1070147643.248866 1070147651.028646
    1070147656.287818 1070147664.067692 1070147656.287818 1070147664.067692
    1070147659.326429 1070147667.106238 1070147659.326429 1070147667.106238
    1070147668.370071 1070147676.149884 1070147668.370071 1070147676.149884
    1070147681.433111 1070147689.212926 1070147681.433111 1070147689.212926
    1070147683.418743 1070147691.198632 1070147683.418743 1070147691.198632

    problem shows up within ~30s of starting the test program, and the messages
    will come out about once per 1-5s period after that, not regularly.

    kern.timecounter.hardware: TSC

    on this machine, i have others which are i8254 which do it too.

    hw.ncpu=1

    compiler flags:
    COPTFLAGS= -O2 -pipe -malign-loops=4 -malign-jumps=4 -malign-functions=4
    -mcpu=i686 -march=i686 -fno-gcse -g

    machine is running 4.7-RELEASE-p2.

    dmesg, kernel config attached.

    Intel-specific functions:
    Version 00000673:
    Type 0 - Original OEM
    Family 6 - Pentium Pro
    Model 7 - Pentium III/Pentium III Xeon - external L2 cache
    Stepping 3
    Reserved 0

    from cpuid.

    ntpd -p /var/run/ntpd.pid -b -g -A
    runs.

    Clock does not drift much, less than 2s/day. Clock is
    stepped when system boots. There is a chimer on our router
    which broadcasts ntp time every minute. ntpd is not
    observed to step clock.

    On the 8254 machine [a dual 0f27 xeon, 533 FSB with HTT enabled]
    1070147645.119531 1070148340.497729 1070148339.-693880469 1070148340.497729

    both systems were unloaded. This was with the corrected program
    you included.

    --don

    
    
    
    

    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"




  • Next message: Marc G. Fournier: "RE: Corrected gettimeofday() test code"