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