[net/avahi-app] avahi-daemon exists with poll(): Invalid argument
Felix J. Ogris
fjo at ogris.de
Mon Nov 11 09:01:05 UTC 2013
I run avahi 0.6.31 on FreeBSD 8.4-RELEASE-p3 amd64 inside a VMware VM with vendor supplied tools installed (i.e. no emulators/open-vm-tools). Within a few hours up to a few days after restarting, avahi-daemon exists with "poll(): Invalid argument". I added some syslog() calls to avahi-common/simple-watch.c. Turns out that avahi_simple_poll_prepare(), line 506 can run into an integer wrap around when usec > 0x7fffffff. From my debug output:
avahi-daemon: avahi_simple_poll_prepare: t:-2147308239 usec:6442626352642 ntsec:1390524436 ntusec:348696 nowsec:1384081809 nowusec:996054
(where ntsec/ntusec are next_timeout->expiry, and nowsec/nowusec are now)
Fixing this might be trivial (insert 'if (timeout < 0) timeout = 0;' at line 513), although I don't know why next_timeout occasionally is about 74 days in the future (no adjkerntz when avahi-daemon exists, no time leaps, vm behaves normally besides that avahi strangeness).
Anyone..? I can add additional debug statements to avahi and provide more data if asked for.
More information about the freebsd-gnome