xref: /netbsd-src/external/bsd/ntp/dist/html/hints/solaris.xtra.4095849 (revision abb0f93cd77b67f080613360c65701f85e5f5cfe)
1*abb0f93cSkardel Bug Id: 4095849
2*abb0f93cSkardel Category: kernel
3*abb0f93cSkardel Subcategory: syscall
4*abb0f93cSkardel State: evaluated
5*abb0f93cSkardel Synopsis: time_constant value >6 with PLL in use leads to integer divide
6*abb0f93cSkardel           zero trap panic
7*abb0f93cSkardel Description:
8*abb0f93cSkardelIf the time_constant parameter is 7 or higher, and the phase-lock looping model
9*abb0f93cSkardelis in use, the system will take a "integer divide zero trap" panic in
10*abb0f93cSkardelthe clock routine as soon as the time_offset becomes non-zero.
11*abb0f93cSkardel
12*abb0f93cSkardeltime_constant defaults to 0.  The only place it is set is in the ntp_adjtime
13*abb0f93cSkardelsystem call, from the 'constant' element of the timex structure argument.
14*abb0f93cSkardel
15*abb0f93cSkardel Work around:
16*abb0f93cSkardelNever set the constant element of the timex structure passed to ntp_adjtime to
17*abb0f93cSkardela value larger than 6.
18*abb0f93cSkardel
19*abb0f93cSkardelsatish.mynam@Eng 1998-04-30
20*abb0f93cSkardel1. Use Sun's version of NTP software instead of PD version. This problem
21*abb0f93cSkardelis not seen with Sun's NTP version (which is mostly eqivalent to PD NTP 3.4
22*abb0f93cSkardelplus some Sun's local functionality futures).
23*abb0f93cSkardel
24*abb0f93cSkardel2. Workaround for the public domain NTP version  ONLY:
25*abb0f93cSkardel =====================================================
26*abb0f93cSkardelThe workaround for public domain NTP version is to disable the
27*abb0f93cSkardelKERNEL_PLL from the NTP code. This way ntp_Adjtime() system call is
28*abb0f93cSkardeltotally bypassed without sacrificing any of the functionality of the
29*abb0f93cSkardelNTP. The only hit you might see is the way  kernel precision timminig
30*abb0f93cSkardelis done without the PLL algorithm in the kernel.
31*abb0f93cSkardel
32*abb0f93cSkardel    The easiest way to disable ntp_adjtime option is(without changing
33*abb0f93cSkardel    any makefiles or other config files) to disable the KERNEL_PLL
34*abb0f93cSkardel    value in the ./config.h file.
35*abb0f93cSkardel
36*abb0f93cSkardelAfter doing a ./configure for probing for all the necessary tools(compilers,
37*abb0f93cSkardelos version, libraries),  please comment out KERNEL_PLL macro in
38*abb0f93cSkardelthe ./config.h  file.  This will disable the KERNEL_PLL part of the source
39*abb0f93cSkardelcode and the newly obtained xntpd is just similar to the old one but it
40*abb0f93cSkardeldoes not use ntp_adjtime() system call. This prevents it from panic'ng
41*abb0f93cSkardelthe kernel.
42*abb0f93cSkardel
43*abb0f93cSkardel/*#define KERNEL_PLL 1*/
44*abb0f93cSkardel
45*abb0f93cSkardelI complied a new xntpd binary this way and it does nothave any ntp_adjtime()
46*abb0f93cSkardelrelated stuff.
47*abb0f93cSkardel
48*abb0f93cSkardelDefault:
49*abb0f93cSkardel=======
50*abb0f93cSkardel/net/divya/export/home/mynam/public_domain/ntp/xntp3-5.92/xntpd>strings
51*abb0f93cSkardelxntpd |
52*abb0f93cSkardelgrep ntp_adjtime
53*abb0f93cSkardel354:adj_frequency: ntp_adjtime failed: %m
54*abb0f93cSkardel357:loop_config: ntp_adjtime() failed: %m
55*abb0f93cSkardel435:get_kernel_info: ntp_adjtime() failed: %m
56*abb0f93cSkardel
57*abb0f93cSkardelWith KERNEL_PLL disabled in config.h file
58*abb0f93cSkardel-=======================
59*abb0f93cSkardel
60*abb0f93cSkardel/net/divya/export/home/mynam/public_domain/ntp/xntp3-5.92/xntpd>strings
61*abb0f93cSkardelxntpd.nopll | grep ntp_adjtime
62*abb0f93cSkardel
63*abb0f93cSkardel        Integrated in releases:
64*abb0f93cSkardel Duplicate of:
65*abb0f93cSkardel Patch id:
66*abb0f93cSkardel See also: 4133517
67*abb0f93cSkardel Summary:
68*abb0f93cSkardelIf the time_constant parameter is 7 or higher, and the phase-lock looping model
69*abb0f93cSkardelis in use, the system will take a "integer divide zero trap" panic in
70*abb0f93cSkardelthe clock routine as soon as the time_offset becomes non-zero.
71*abb0f93cSkardel
72*abb0f93cSkardeltime_constant defaults to 0.  The only place it is set is in the ntp_adjtime
73*abb0f93cSkardelsystem call, from the 'constant' element of the timex structure argument.
74*abb0f93cSkardel----------------------------------------------------------------------------
75