📄 186
字号:
Received: from mail.eecis.udel.edu by whimsy.udel.edu id aa26947; 20 Mar 1998 02:03 ESTReceived: from green.images.com (green.images.com [198.207.178.4]) by orange.images.com (8.8.5/SCO5) with ESMTP id XAA16154 for <stenn@whimsy.udel.edu>; Thu, 19 Mar 1998 23:03:00 -0800 (PST)Received: (from kamal@localhost) by green.images.com (8.8.5/SCO5) id XAA11828; Thu, 19 Mar 1998 23:02:55 -0800 (PST)Message-ID: <19980319230254.52091@green>Date: Thu, 19 Mar 1998 23:02:54 -0800From: Kamal A Mostafa <kamal@images.com>To: stenn@whimsy.udel.eduCc: Kamal A Mostafa <kamal@images.com>Subject: xntp3-5.92 select error logging bugReferences: <19980318231931.26036@green> <22481.890355667@whimsy.udel.edu>Mime-Version: 1.0Content-Type: multipart/mixed; boundary=zhXaljGHf11kAtnfX-Mailer: Mutt 0.89iIn-Reply-To: <22481.890355667@whimsy.udel.edu>; from stenn@whimsy.udel.edu on Thu, Mar 19, 1998 at 08:01:07PM -0500--zhXaljGHf11kAtnfContent-Type: text/plain; charset=us-ascii-----BEGIN PGP SIGNED MESSAGE-----Hi Harlan-I'm now replicating the TIMER_ENQUEUE core dump myself with 5.92 (instead ofrelying on my colleague's reports) but it looks like for some reason 5.92ddoesn't exhibit the bug (even without my TIMER_ENQUEUE fix). Oh Joy. ;-|However, while peeking at 'xntpd -d' output, I found (and fixed) a newbuglet. It seems that on my systems, whenever I use -d, I get an errormessage logged to syslog *once every second*!... select(): nfound=-1, error: Interrupted system call last message repeated 31 times ...Now that's a lotta syslog! ;-}The problem is some badly structured code in worker_thread() in ntpd.c.Essentially, if you do not HAVE_SIGNALED_IO and you have set -d, then youwill log this completely normal event.To make matters worse, somebody's mis-coded attempt to prevent this loggingfor SYS_VXWORKS looks to me like it might break SYS_VWORKS altogether! Havea look at this... else if (debug) #ifndef SYS_VXWORKS msyslog(LOG_DEBUG, "select(): nfound=%d, error: %m", nfound); #endif #else wait_for_signal(); #endif if (alarm_flag) /* alarmed? */ ...Note that if you are SYS_VXWORKS, then you miss the semi-colon at the end ofthe msyslog(), thus never closing the body of the "if (debug)"! Since youwon't be doing the #else clause, you'll only end up trying the"if (alarm_flag)" clause if you're in debug mode!I have removed the offending junk (and added comments to the #else and #endiflines) -- patch attached.BTW, how do you prefer to receive patches? Are the MIME attachements I'vebeen sending okay, or would you prefer uuencode'ings?Okay, now that *that* nastiness is out of the way!... I'm still not surethat 5.92 and 5.92d are working properly for me in broadcastclient mode. Aclient system running 5.92d seems to receive packets from the broadcastingserver also running 5.92d, but it (the client) never appears toclock_filter() or clock_update() or anything... Just lots of this pattern:[Note that the server is broadcasting every 16 seconds, not the default 64(?).] input_handler: fd=7 length 48 from 8493111e 132.147.17.30 input_handler: fd=7 length 48 from 8493111e 132.147.17.30 sendpkt(fd=5 132.147.17.30, 132.147.17.18, ttl=-8, 48) input_handler: fd=5 length 48 from 8493111e 132.147.17.30 input_handler: fd=7 length 48 from 8493111e 132.147.17.30 input_handler: fd=7 length 48 from 8493111e 132.147.17.30 sendpkt(fd=5 132.147.17.30, 132.147.17.18, ttl=-8, 48) ...Even after it's been running awhile, 'xntpdc -p' on the client just says: remote local st poll reach delay offset disp ====================================================================== =kestrel.pdev.sc 132.147.17.255 16 16 0 0.0000 0.000000 16.000It would help me a bunch if I knew what code-path it was *supposed* to betaking... What does a "normal" -d log from an broadcast client look like?Could you send me a sample? What does 'xntpdc -p' say on such a client, forthat matter?Another stupid question... What's up with the sendpkt() lines? I wouldn'tintuitively expect a broadcast client to *ever* send anything back to abroadcasting server, but that -d output above shows that it does appear to besending something back to it's server periodically. Why? What is itsending?On Thu, Mar 19, 1998 at 08:01:07PM -0500, stenn@whimsy.udel.edu wrote:> Kamal,> > Try compiling xntpd with -DTIMERQUEUE_DEBUG, which should enable some> debugging assertions in ntp_timer.c, if I'm not mistaken.> > HarlanThanks much, I'll check it out. Despite the fact that my core dump seemsto have gone away by itself with 5.92d, I really don't like the look ofthat code in TIMER_ENCODE (and we still might want to de-macro-fy it fordebug purposes, anyway). -k-----BEGIN PGP SIGNATURE-----Version: 2.6.2iQCVAwUBNRIUQYrzk78EeS5RAQHa/AQAt46LoFAK4pkSofnQIvVl4z0Moyv4jIMQUp7O/dYe+TuDoBtITuD6fXAjz13tEtzaHGtCUTx3AyjF8wJ7Qq4QXDwus96bzfRVnmpJgHjOpmsZV8j01yQuvBmIaI2xliq93oN+ZTD+OOTpR2H04/7mWo0hBksiWi6al2rRHySNj7o==ZKu0-----END PGP SIGNATURE-------zhXaljGHf11kAtnfContent-Type: text/plain; charset=us-asciiContent-Description: ntpd.c patchContent-Disposition: attachment; filename="ntpd.patch"*** ntpd.c.orig Thu Mar 19 20:47:49 1998--- ntpd.c Thu Mar 19 21:39:42 1998****************** 770,780 **** #endif /* SYS_WINNT */ ) msyslog(LOG_ERR, "select() error: %m");! else if (debug)! #ifndef SYS_VXWORKS! msyslog(LOG_DEBUG, "select(): nfound=%d, error: %m", nfound);! #endif! #else wait_for_signal(); #endif if (alarm_flag) /* alarmed? */--- 770,777 ---- #endif /* SYS_WINNT */ ) msyslog(LOG_ERR, "select() error: %m");! ! #else /* HAVE_SIGNALED_IO */ wait_for_signal(); #endif /* HAVE_SIGNALED_IO */ ****************** 776,782 **** #endif #else wait_for_signal();! #endif if (alarm_flag) /* alarmed? */ { was_alarmed = 1;--- 773,780 ---- #else /* HAVE_SIGNALED_IO */ wait_for_signal();! #endif /* HAVE_SIGNALED_IO */! if (alarm_flag) /* alarmed? */ { was_alarmed = 1;--zhXaljGHf11kAtnf--
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -