[cairo] assertion - locking problem in multithreaded app

Carl Worth cworth at cworth.org
Sat Jan 20 01:15:39 PST 2007


On Tue, 16 Jan 2007 22:26:16 +0100, Jan Slupski wrote:
> Recently I've been testing an application with cairo underlying
> and hit assertions that seems to be locking problems described
> here https://bugs.freedesktop.org/show_bug.cgi?id=8801 and
> here http://lists.freedesktop.org/archives/cairo/2006-December/008945.html

Yes, I'm rather embarrassed that those bugs have been outstanding for
so long.

Part of it is that I'd like to clean up the reference-counting fix to
be implemented with new cairo functions for atomic
increment/decrement, (we had some discussion of this on the list and
even pointed to some existing code, but nobody has done a patch
yet). I wouldn't even mind if the initial version just used a mutex,
(which would give us instant portability with our existing CAIRO_MUTEX
stuff), and then later, more efficient platform-specific atomic
increment/decrement stuff could be added.

> I have tried the patch that is attached to the bugzilla report and it helped
> much (after fixing it a bit - see my comment on the bottom of bugzilla),

Thanks for the fixup. I caught that part, but I think I screwed
something else up. When I applied the patches I started getting hangs
with "make test". Maybe I broke things when trying to apply the
patches, (they're not perfectly clean in bugzilla). If somebody would
post a known-good and ready-to-apply patch that would be helpful.

> I guess this may be related to Behdad suggestion 'This bug suggests that
> the same is happening in cairo_ft_scaled_font_lock/unlock'.
>
> Are there any works done to fix this. Is there anything I could do
> to help?

One thing that would be nice to have is a test case suitable for the
cairo/test that exercises these bugs as well as possible. Care to work
up something like that?

Anyway, I was hoping to have all this fixed for the imminent 1.3.12
snapshot, but it looks like we're going to have another snapshot with
these locking bugs still present (sorry, Monty!). But I've added this
bug to the ROADMAP for 1.3.14 so hopefully this will be the last
snapshot with this bug in it.

Thanks for your attention,

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20070120/4f8512e0/attachment.pgp


More information about the cairo mailing list