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