[colord] Removal of libsane support
Christopher James Halse Rogers
chris at cooperteam.net
Wed Sep 26 19:12:16 PDT 2012
On Mon, 2012-09-17 at 11:26 +0100, Richard Hughes wrote:
> On 12 September 2012 06:32, Christopher James Halse Rogers
> <christopher.halse.rogers at canonical.com> wrote:
> > It goes something like this:
> > *) libdbus is threadsafe iff dbus_threads_init_default() is called.
> > *) GDBus is threadsafely implemented on top of libdbus, but does not
> > require libdbus to be threadsafe, nor does it call
> > dbus_threads_init_default()
> > *) colord-sane uses GDBus, which is fine.
> > *) colord-sane also uses libsane.
> > +) Which links to libavahi
> > -) Which uses libdbus directly, and spawns threads.
>
> That sounds sane, if you pardon the pun.
>
> > Fixing this should be as simple as calling dbus_threads_init_default
> > early in colord-sane's main(). Should be, because I can't reproduce
> > these crashes myself, so I can't test. We see lots of colord 0.1.16
> > crashes here in Ubuntu 12.04, though, and I'm going to upload a colord
> > that calls dbus_threads_init_default() to precise-proposed² and see if
> > these crashes go away.
>
> Good idea.
This still hasn't been pushed into precise-proposed. However, it's seen
some testing in 12.10 (using colord 0.1.21), and it appears to have
eliminated a class of colord-sane problems.
Sadly, that leaves a bunch of other colord-sane problems.
However, I think I've got a handle on another large class of bugs.
sane's API docs are a filthy lie, specifically where they claim that
sane_exit() will free all the sane resources. A number of backends leave
open fds around after sane_exit(), and so on each poll colord-sane gets
closer to exhausting the fd space, until something tries to select on fd
1029 or something else that's not going to work.
I *think* this accounts for the rest of the common colord-sane bugs on
errors.ubuntu.com, most of which are aborts in libc thanks to
FORTIFY_SOURCE.
I'll try rejigging colord-sane so that it's spawned and then killed for
each poll. That should clean up the fd issue, at least.
If, after trying that, I expose *another* set of stupid sane problems,
I'll join you in giving up on it ☺.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/colord/attachments/20120927/baae5b9c/attachment.pgp>
More information about the colord
mailing list