[packagekit] pk_backend_finished race issue

Richard Hughes hughsient at gmail.com
Mon Sep 17 05:52:40 PDT 2007


On 17/09/2007, Richard Hughes <hughsient at gmail.com> wrote:
> On 17/09/2007, Tom Parker <palfrey at tevp.net> wrote:
> > Richard Hughes wrote:
> > > On 14/09/2007, Tom Parker <palfrey at tevp.net> wrote:
> > >> The second, I'm not
> > >> sure how to fix, and it happens every time. See test.log for the full
> > >> log, but the "GThread-ERROR **: file
> > >> /tmp/buildd/glib2.0-2.14.0/gthread/gthread-posix.c: line 385 (): error
> > >> 'Resource deadlock avoided' during 'pthread_join (*(pthread_t*)thread,
> > >> &ignore)'" at the bottom is not a healthy thing.
> > >
> > > This sort of thing needs to be added to a test-case and tested in make
> > > check as it's very difficult to get right. I'll have some time on
> > > Sunday to look at this, but until then I'll hold off committing.
> >
> > I've attached a modified version of pk-self-test.c that causes the same
> > problem, without requiring the apt backend, so everyone else can test
> > regardless of what backend they're using (and something that can
> > eventually be bludgeoned into being a "make check" test).
>
> Quality, I think I've found the issue. We have a nice race on thread
> exit and completion, and so the obvious thing to do is to do the
> finished (and then wait for threads) in the main thread and then just
> do the data in the second thread, i.e.

I've pushed all my threading changes to the server (which is back up
now) and I've probably broken some backends. Please pull, fix and test
and hopefully everything should work 100%. I'll push to anon fd.o
tonight.

Hopefully. ;-)

Richard.



More information about the PackageKit mailing list