FS#41593 - [ntp] ./../lib/isc/unix/ifiter_getifaddrs.c:96: unexpected error:
Attached to Project:
Arch Linux
Opened by Ruben Kelevra (RubenKelevra) - Sunday, 17 August 2014, 19:01 GMT
Last edited by Gaetan Bisson (vesath) - Saturday, 30 August 2014, 02:23 GMT
Opened by Ruben Kelevra (RubenKelevra) - Sunday, 17 August 2014, 19:01 GMT
Last edited by Gaetan Bisson (vesath) - Saturday, 30 August 2014, 02:23 GMT
|
Details
Description:
NTP outputs following log-messages: Aug 17 20:51:09 bragi.wk.freifunk.net ntpd[1455]: getting interface addresses: getifaddrs: Resource temporarily unavailable Aug 17 20:51:15 bragi.wk.freifunk.net ntpd[1455]: ./../lib/isc/unix/ifiter_getifaddrs.c:96: unexpected error: Aug 17 20:51:15 bragi.wk.freifunk.net ntpd[1455]: getting interface addresses: getifaddrs: Resource temporarily unavailable Aug 17 20:51:43 bragi.wk.freifunk.net ntpd[1455]: ./../lib/isc/unix/ifiter_getifaddrs.c:96: unexpected error: Aug 17 20:51:43 bragi.wk.freifunk.net ntpd[1455]: getting interface addresses: getifaddrs: Resource temporarily unavailable Aug 17 20:51:53 bragi.wk.freifunk.net ntpd[1455]: ./../lib/isc/unix/ifiter_getifaddrs.c:96: unexpected error: Aug 17 20:51:53 bragi.wk.freifunk.net ntpd[1455]: getting interface addresses: getifaddrs: Resource temporarily unavailable Aug 17 20:52:08 bragi.wk.freifunk.net ntpd[1455]: ./../lib/isc/unix/ifiter_getifaddrs.c:96: unexpected error: Aug 17 20:52:08 bragi.wk.freifunk.net ntpd[1455]: getting interface addresses: getifaddrs: Resource temporarily unavailable Config file: server 0.pool.ntp.org server 1.pool.ntp.org server 2.pool.ntp.org # Only allow read-only access from localhost restrict default noquery nopeer restrict 127.0.0.1 restrict ::1 # Location of drift file driftfile /var/lib/ntp/ntp.drift Version: Name : ntp Version : 4.2.7.p446-1 Beschreibung : Network Time Protocol reference implementation Architektur : x86_64 URL : http://www.ntp.org/ Lizenzen : custom Gruppen : Nichts Stellt bereit : Nichts Hängt ab von : openssl libcap libedit Optionale Abhängigkeiten: Nichts Benötigt von : rk-server-basic Optional für: Nichts Konflikt mit : Nichts Ersetzt : Nichts Installationsgröße: 4004,00 KiB Packer : Gaetan Bisson <bisson@archlinux.org> Erstellt am : So 29 Jun 2014 18:42:31 CEST Installiert am : Sa 05 Jul 2014 07:49:07 CEST Installationsgrund : Installiert als Abhängigkeit für ein anderes Paket Installations-Skript : Ja Verifiziert durch: Signatur |
This task depends upon
Closed by Gaetan Bisson (vesath)
Saturday, 30 August 2014, 02:23 GMT
Reason for closing: No response
Saturday, 30 August 2014, 02:23 GMT
Reason for closing: No response
Issue was solved after I've replaced hostnames with IPs in ntpd.conf or if nscd was started before ntpd.
Still digging to find how it supposed to work though.
blocking_getaddrinfo given node ntp.ix.ru serv ntp fam 0 flags 0
blocking_getaddrinfo given node ntp2.vniiftri.ru serv ntp fam 0 flags 0
intres: EAI_SYSTEM errno 11 (Resource temporarily unavailable) means try again, right?
intres: resolver returned: System error (-11), retrying
blocking_getaddrinfo given node ntp.aas.ru serv ntp fam 0 flags 0
intres: EAI_SYSTEM errno 11 (Resource temporarily unavailable) means try again, right?
intres: resolver returned: System error (-11), retrying
sleep until 16:58:27 scheduled at 16:58:19 (>= 03:00:00)
intres: EAI_SYSTEM errno 11 (Resource temporarily unavailable) means try again, right?
intres: resolver returned: System error (-11), retrying
Looks like resolving issue is just a coincidence in my case. So there is theory #2.
If ntpd is started with `-n` (no fork), log looks like:
26 Aug 20:24:01 ntpd[18758]: Listening on routing socket on fd #31 for interface updates
26 Aug 20:24:32 ntpd[18758]: ./../lib/isc/unix/ifiter_getifaddrs.c:103: unexpected error:
26 Aug 20:24:32 ntpd[18758]: getting interface addresses: getifaddrs: Resource temporarily unavailable
26 Aug 20:24:34 ntpd[18758]: fatal out of memory (4048 bytes)
and crash is the error handling done wrong.
Routing socket (fd #41) is opened as (./ntpd/ntp_io.c):
int fd = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
but cap_net_raw is not enabled, so we can't use SOCK_RAW socket.
Ruben, can you try the attached patch? I doesn't remove the warning here, but ntpd no longer crashes.
Sorry for hijacking this bug, just needed to discuss it with someone ._.