Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 307199 - net-misc/ntp-4.2.4p7-r1 switches syslog facility
Summary: net-misc/ntp-4.2.4p7-r1 switches syslog facility
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-28 16:00 UTC by Łukasz Stelmach
Modified: 2010-04-07 13:44 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Łukasz Stelmach 2010-02-28 16:00:31 UTC
After logging few messages to LOG_DAEMON ntpd starts logging to LOG_USER. It looks like it might be avahi library that reopens syslog.

Reproducible: Always

Steps to Reproduce:
1. compile ntp with `zeroconf' flag
2. start it
Actual Results:  

6005  connect(3, {sa_family=AF_FILE, path="/dev/log"}, 110) = 0
6005  sendto(3, "<29>Feb 28 16:45:43 ntpd[6005]: ntpd 4.2.4p7@1.1607-o Sun Feb 28 15:19:52 UTC 2010 (1)", 86, MSG_NOSIGNAL, NULL, 0) = 86
6005  sendto(3, "<30>Feb 28 16:45:43 ntpd[6005]: Attemping to register mDNS", 58, MSG_NOSIGNAL, NULL, 0) = 58
6005  write(2, "*** WARNING *** The program 'ntpd' uses the Apple Bonjour compatibility layer of Avahi.\n", 88) = 88
6005  sendto(3, "<12>Feb 28 16:45:43 ntpd[6005]: *** WARNING *** The program 'ntpd' uses the Apple Bonjour compatibility layer of Avahi.", 119, MSG_NOSIGNAL, NULL, 0) = 119
6005  write(2, "*** WARNING *** Please fix your application to use the native API of Avahi!\n", 76) = 76
6005  connect(3, {sa_family=AF_FILE, path="/dev/log"}, 110) = 0
6005  sendto(3, "<12>Feb 28 16:45:43 ntpd[6005]: *** WARNING *** Please fix your application to use the native API of Avahi!", 107, MSG_NOSIGNAL, NULL, 0) = 107
6005  write(2, "*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=ntpd>\n", 94) = 94
6005  connect(3, {sa_family=AF_FILE, path="/dev/log"}, 110) = 0
6005  sendto(3, "<12>Feb 28 16:45:43 ntpd[6005]: *** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=ntpd>", 125, MSG_NOSIGNAL, NULL, 0) = 125

Expected Results:  
connect(3, {sa_family=AF_FILE, path="/dev/log"}, 110) = 0
sendto(3, "<29>Feb 28 16:57:58 ntpd[27854]: ntpd 4.2.4p7@1.1607-o Sun Feb 28 15:51:40 UTC 2010 (1)", 87, MSG_NOSIGNAL, NULL, 0) = 87
sendto(3, "<30>Feb 28 16:57:58 ntpd[27854]: precision = 1.000 usec", 55, MSG_NOSIGNAL, NULL, 0) = 55
sendto(3, "<30>Feb 28 16:57:58 ntpd[27854]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled", 89, MSG_NOSIGNAL, NULL, 0) = 89
sendto(3, "<30>Feb 28 16:57:58 ntpd[27854]: Listening on interface #1 wildcard, ::#123 Disabled", 84, MSG_NOSIGNAL, NULL, 0) = 84
sendto(3, "<30>Feb 28 16:57:58 ntpd[27854]: Listening on interface #2 lo, ::1#123 Enabled", 78, MSG_NOSIGNAL, NULL, 0) = 78
sendto(3, "<30>Feb 28 16:57:58 ntpd[27854]: Listening on interface #3 eth0, 2001:6a0:1a0:1:21e:8cff:feb5:197e#123 Enabled", 110, MSG_NOSIGNAL, NULL, 0) = 110
sendto(3, "<30>Feb 28 16:57:58 ntpd[27854]: Listening on interface #4 eth0, fe80::21e:8cff:feb5:197e#123 Enabled", 101, MSG_NOSIGNAL, NULL, 0) = 101
sendto(3, "<30>Feb 28 16:57:58 ntpd[27854]: Listening on interface #5 lo, 127.0.0.1#123 Enabled", 84, MSG_NOSIGNAL, NULL, 0) = 84
sendto(3, "<30>Feb 28 16:57:58 ntpd[27854]: Listening on interface #6 eth0, 192.168.1.4#123 Enabled", 88, MSG_NOSIGNAL, NULL, 0) = 88
sendto(3, "<30>Feb 28 16:57:58 ntpd[27854]: kernel time sync status 2040", 61, MSG_NOSIGNAL, NULL, 0) = 61
Comment 1 Doktor Notor 2010-02-28 16:49:45 UTC
That compatibility blurb comes from avahi; stick AVAHI_COMPAT_NOWARN="1" before the start-stop-daemon call to make it shut up.
Comment 2 Łukasz Stelmach 2010-02-28 17:03:49 UTC
The blurb is not a problem at all. Take a closer look at sendto() calls. Before the blurb the priority > 24 (LOG_DAEMON) then just after the first avahi warning the syslog messages goes as LOG_USER.
Comment 3 Doktor Notor 2010-02-28 17:17:52 UTC
Yes, I understand - I'm suggesting that stopping the blurb from getting spit out in the first place could make avahi shut up and thus could work around the syslog switching.
Comment 4 Łukasz Stelmach 2010-02-28 18:32:58 UTC
Indeed it does help. However it seems like bug anyway.
Comment 5 SpanKY gentoo-dev 2010-03-07 00:13:45 UTC
does it only happen when using USE=zeroconf ?
Comment 6 Łukasz Stelmach 2010-03-07 20:26:57 UTC
I don't know. It does happen when I USE=zeroconf and it doesn't when I don't. However, I haven't investigated it more deeply, it seems to be quite obvious that libavahi reopens syslog with different facility.