Comment 45 for bug 507062

Revision history for this message
In , Jamey-minilop (jamey-minilop) wrote :

(In reply to comment #9)
> I have a small application that manages to reproduce that crash quite easily on
> ubuntu 10.04, but only when running under valgrind.

Cool, what's the application? Can I get the source somewhere? I see it's using a toolkit (juce) that I hadn't heard of before though, so I'm not sure it's close to a minimal test case yet...

> hellgrind outputs loads of stuff like:
>
> ==2950== Possible data race during write of size 4 at 0x44bd06c by thread #1
> ==2950== at 0x4084764: ??? (in /usr/lib/libX11.so.6.3.0)
> ==2950== by 0x4069352: XGetWindowProperty (in /usr/lib/libX11.so.6.3.0)
> ...
> ==2950== This conflicts with a previous read of size 4 by thread #6
> ==2950== at 0x4082F0C: _XSetPrivSyncFunction (in /usr/lib/libX11.so.6.3.0)
> ==2950== by 0x408BBEF: _XAllocID (in /usr/lib/libX11.so.6.3.0)
> ==2950== by 0x40611A7: XCreatePixmap (in /usr/lib/libX11.so.6.3.0)
> ...
>
> before the failed assertion.

I'm guessing that's the bug we fixed in git commit a6d974dc59f2722b36e2df9d4f07aeee4f83ce43, which is included in libX11 1.3.4 and later. What version of libX11 do you have?

> But that application itself
> behaves quite badly as it calls xlib from different threads using the same
> "Display*" struct for all threads, so I'm not sure if that might be of any use
> for tracking this issue. However I think it calls XInitThreads() on startup, so
> that should allow it to share the same display for all threads, isn't it ?

Yes, that's supposed to be safe. However, I introduced a variety of bugs for multi-threaded apps some time ago, and only got most of them fixed in libX11 1.3.4. You should definitely re-test with that version or later if you don't already have it.