libX11: Changes to 'master'

Julien Cristau jcristau at
Tue Feb 17 10:43:58 PST 2009

On Tue, 2008-11-04 at 08:55 -0800, Jamey Sharp wrote:
> commit e6a7b70cdb2ae8b713012839a0a0bbb93817b8ef
> Author: Jamey Sharp <jamey at>
> Date:   Wed Oct 29 14:00:33 2008 -0700
>     Support multiple independent internal sync handlers
>     Xlib has several independent tasks that need to be performed with the
>     display unlocked. It does this by replacing the existing sync handler with
>     one of a variety of internal sync handlers. However, if multiple internal
>     sync handlers need to run, then the last one registering wins and
>     previously registered internal sync handlers are never invoked. This
>     manifested as a bug with DRI applications on Xlib/XCB as that requires
>     both an XID handler after every XID allocation, and the periodic sequence
>     number handler. The XID handler would win, and the sequence number handler
>     would never be invoked.
>     Fix this by unifying the internal sync handler mechanism into a single
>     function that calls all of the known internal sync handlers. They all need
>     to deal with being called when not strictly necessary now.
>     Signed-off-by: Keith Packard <keithp at>
>     Signed-off-by: Jamey Sharp <jamey at>
>     Signed-off-by: Josh Triplett <josh at>


I can reproducibly hit some assertions added in this commit by running
ico -threads 10 (or even 2).
ico: ../../src/XlibInt.c:599: _XPrivSyncFunction: Assertion
`dpy->synchandler == _XPrivSyncFunction' failed.
ico: ../../src/XlibInt.c:600: _XPrivSyncFunction: Assertion `(dpy->flags
& (1L << 3)) != 0' failed.

Reverting this commit makes it work again, so it looks like the
synchandler changes aren't multithread-safe.  Any idea how to fix this?


More information about the xorg mailing list