New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cupsd crashes because it wrongly uses D-Bus from multiple threads #4347
Comments
CUPS.org User: mike I REALLY HATE THIS PATCH. It is far too complicated just to support Avahi and we cannot maintain something like that. In its present form we WILL NOT add it to CUPS. On Linux we need to use DBUS in cupsd for Avahi and colord. Both seem to be getting their own DBUS connections, so this should not be a problem (according to the documentation) unless you are shipping an old version of DBUS (1.4.x or earlier). And if it is a problem then we have a fundamental bug in DBUS that needs fixing there, not worked around with an unmaintainable patch in cupsd. What version of DBUS is being used? |
CUPS.org User: mike and it looks like we should be calling dbus_threads_init in cupsd to enable threading support (!) in DBUS... |
CUPS.org User: mike Back to pending while I apply a simpler 1-line patch to require a recent D-BUS with the dbus_threads_init function. |
CUPS.org User: mike Fixed in Subversion repository. |
"dont-use-dbus-from-two-threads.patch": Description: Don't use D-Bus from two threads
+struct AvahiWatch
+struct AvahiTimeout
+/_
+/*
+/*
+/*
+/*
+/*
+/*
+/*
+/*
+/*
+/*
+/*
+/*
+/*
+/*
+#endif /* HAVE_AVAHI ... from top of file /
+/_
+#ifdef HAVE_AVAHI
+#ifdef HAVE_AVAHI /*
+#ifdef HAVE_AVAHI
@@ -223,7 +223,7 @@
endif /* HAVE_DNSSD */@@ -754,9 +752,7 @@ else /* HAVE_AVAHI */
endif /* HAVE_DNSSD */*srv = NULL; else /* HAVE_AVAHI */- avahi_threaded_poll_lock(DNSSDMaster);if (!_srv) - avahi_threaded_poll_unlock(DNSSDMaster);
@@ -1173,8 +1165,6 @@ }
endif /* HAVE_DNSSD */if (error) else /* HAVE_AVAHI */- avahi_threaded_poll_stop(DNSSDMaster);avahi_client_free(DNSSDClient);
endif /* HAVE_DNSSD */--- a/scheduler/dirsvc.h else /_ HAVE_AVAHI _/-VAR AvahiThreadedPoll *DNSSDMaster VALUE(NULL);
#ifdef HAVE_GETEUID httpInitialize(); +#ifdef HAVE_AVAHI
cupsdStartServer(); /* +#ifdef HAVE_AVAHI
cupsdLogMessage(CUPSD_LOG_DEBUG2, "select_timeout: JobHistoryUpdate=%ld", +#ifdef HAVE_AVAHI
/_
CUPSDOBJS =
+/_
+static int
+/*
+/*
+/*
+/*
+/*
+/*
+#endif /* HAVE_AVAHI ... from top of file /
|
"str4347.patch": Index: config-scripts/cups-common.m4--- config-scripts/cups-common.m4 (revision 11597) dnl Check for DBUS support
AC_ARG_ENABLE(dbus, [ --disable-dbus build without DBUS support]) +DBUSDIR="" @@ -330,7 +325,12 @@
+#ifdef HAVE_DBUS_THREADS_INIT
|
Version: 1.7.1
CUPS.org User: odyx
Hi Michael,
After the report of https://bugzilla.redhat.com/show_bug.cgi?id=979748, Tim Waugh reported the following analysis:
His patch is attached, it would be nice to have this integrated upstream.
The text was updated successfully, but these errors were encountered: