CUPS crashes on shutdown when taking down Avahi threaded poll #4213

michaelrsweet opened this Issue Oct 15, 2012 · 2 comments


None yet
1 participant

michaelrsweet commented Oct 15, 2012

Version: 1.6.1 User: till.kamppeter

I have CUPS 1.6.1 on Ubuntu Quantal (12.10), sharing printers via Avahi-based DNS-SD. I am using the patches of STR #4155, STR #4156, STR #4157, STR #4158, and STR #4159 and also the recebt crash fix patches for STR #4183, STR #4192, and STR #4200.

After all this there is still a crash bug in CUPS, occuring on shutdown, according to the stack traces on the Ubuntu bug report and its duplicates when the Avahi threaded poll is shut down.


and the stack traces

The fix is attached and the problem was a wrong sequence of shutting down the Avahi threaded poll. See

function zeroconf_shutdown() in the example code. A avahi_threaded_poll_stop() is needed before calling avahi_client_free(). This is missing in the dnssdStop() function in scheduler/dirsvc.c.

The reporter of the Ubuntu bug confirms that with my patch the crash goes away.

Note that this is not a duplicate of STR #4183 and STR #4192. STR #4180 is the same as this one, not a duplicate of STR #4183.


michaelrsweet commented Oct 17, 2012 User: mike

Till, thanks, committed for the next release.


michaelrsweet commented Oct 17, 2012


--- a/scheduler/dirsvc.c
+++ b/scheduler/dirsvc.c
@@ -2367,6 +2367,7 @@

else /* HAVE_AVAHI */

  • avahi_threaded_poll_stop(DNSSDMaster);
    DNSSDClient = NULL;

@michaelrsweet michaelrsweet added this to the Stable milestone Mar 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment