Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 493084 - net-misc/openntpd - allow SIGUSR1 as stand-in for SIGINFO
Summary: net-misc/openntpd - allow SIGUSR1 as stand-in for SIGINFO
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Paul B. Henson
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-12-01 22:31 UTC by Paul B. Henson
Modified: 2013-12-10 09:31 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to use SIGUSR1 if no SIGINFO is available (openntpd-20080406-sigusr1.diff,1.08 KB, patch)
2013-12-01 22:31 UTC, Paul B. Henson
Details | Diff
updated ebuild incorporating the patch (openntpd-20080406-r6.ebuild,1.63 KB, text/plain)
2013-12-01 22:32 UTC, Paul B. Henson
Details
patch to use SIGUSR1 if no SIGINFO is available (v2) (openntpd-20080406-sigusr1.patch,1.45 KB, patch)
2013-12-04 23:38 UTC, Paul B. Henson
Details | Diff
updated ebuild incorporating patch (openntpd-20080406-r7.ebuild,2.67 KB, text/plain)
2013-12-04 23:39 UTC, Paul B. Henson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul B. Henson 2013-12-01 22:31:11 UTC
openntpd uses SIGINFO as a mechanism to dump current peer status to the logs, but linux doesn' support SIGINFO. On systems with SIGINFO, use SIGUSR1 instead.

This patch is based on top of the pid file patch in bug 493082 and the attached ebuild is an update of that one too.

Reproducible: Always
Comment 1 Paul B. Henson 2013-12-01 22:31:40 UTC
Created attachment 364398 [details, diff]
patch to use SIGUSR1 if no SIGINFO is available
Comment 2 Paul B. Henson 2013-12-01 22:32:37 UTC
Created attachment 364400 [details]
updated ebuild incorporating the patch
Comment 3 Paul B. Henson 2013-12-01 22:35:57 UTC
(In reply to Paul B. Henson from comment #0)
> logs, but linux doesn' support SIGINFO. On systems with SIGINFO, use SIGUSR1

Arg; s/doesn'/doesn't/, s/with SIGINFO/without SIGINFO/
Comment 4 Thomas Deutschmann (RETIRED) gentoo-dev 2013-12-01 23:28:35 UTC
Thanks for the patch.

Two annotations:
1) It is important to send SIGUSR1 to the child process. If you send the signal to the master, ntpd will terminate.

2) Currently I only see

 Dec  2 00:03:23 web4 ntpd[11311]: 1 out of 1 peers valid

(and dead/invalid peers) in my syslog. Not much information. Would it be possible to add current offset and frequency information so the output would mirror "ntpdc -c loopinfo"?

# ntpdc -c loopinfo
offset:               -0.000143 s
frequency:            -1.938 ppm
poll adjust:          30
watchdog timer:       1012 s
Comment 5 Paul B. Henson 2013-12-04 23:32:42 UTC
(In reply to Thomas D. from comment #4)
> Thanks for the patch.

Hmm, I didn't get an email from bugzilla when you added a comment, not sure why.

> 1) It is important to send SIGUSR1 to the child process. If you send the
> signal to the master, ntpd will terminate.

Yah, I noticed that. You'll only make that mistake once ;).

I suppose it's more user friendly to explicitly ignore USR1 in the parent, I'll attach an updated patch to do so.

> 2) Currently I only see
>
> (and dead/invalid peers) in my syslog. Not much information. Would it be
> possible to add current offset and frequency information so the output would
> mirror "ntpdc -c loopinfo"?

From what I can tell, it dynamically calculates that info each time it tweaks the clock, it's not someplace the current log handler can get to. Adding that additional functionality would take more time than I have to spend on this, sorry...
Comment 6 Paul B. Henson 2013-12-04 23:38:38 UTC
Created attachment 364630 [details, diff]
patch to use SIGUSR1 if no SIGINFO is available (v2)
Comment 7 Paul B. Henson 2013-12-04 23:39:10 UTC
Created attachment 364632 [details]
updated ebuild incorporating patch
Comment 8 Christoph Junghans (RETIRED) gentoo-dev 2013-12-05 00:27:31 UTC
(In reply to Paul B. Henson from comment #6)
> Created attachment 364630 [details, diff] [details, diff]
> patch to use SIGUSR1 if no SIGINFO is available (v2)
Looks good to me. Paul, if you think this is ready to become openntpd-20080406-r7, let me know.
Comment 9 Paul B. Henson 2013-12-05 05:15:05 UTC
I think it's good to go, you might want to combine it with the new bug 493358 though.
Comment 10 Christoph Junghans (RETIRED) gentoo-dev 2013-12-10 09:31:50 UTC
+*openntpd-20080406-r7 (10 Dec 2013)
+
+  10 Dec 2013; Christoph Junghans <ottxor@gentoo.org>
+  +files/openntpd-20080406-dns-timeout.patch,
+  +files/openntpd-20080406-signal.patch, +openntpd-20080406-r7.ebuild,
+  -files/openntpd.logrotate-20080406-r5, -openntpd-20080406-r6.ebuild,
+  metadata.xml:
+  fixed signal on linux (bug #493084), fixed dns-timeout (bug #493358), make
+  Paul maintainer
+