Bug 10997 - Xserver segfaults when Composite used
Summary: Xserver segfaults when Composite used
Status: RESOLVED FIXED
Alias: None
Product: cygwin
Classification: Unclassified
Component: Cygwin/X (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Yaakov Selkowitz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-22 14:30 UTC by Jon Turney
Modified: 2010-02-19 19:20 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
Patch to disable composite extension by default (425 bytes, patch)
2009-11-22 14:55 UTC, Jon Turney
Details | Diff
Don't enable ROOTLESS_WORKAROUND, it breaks Composite (629 bytes, patch)
2010-02-08 21:44 UTC, Jon Turney
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Turney 2009-11-22 14:30:06 UTC
A few reports of Xserver segfaults when using a XDMCP session to Fedora 12
(Constantine) and Ubuntu 9.10 (Karmic)

http://cygwin.com/ml/cygwin-xfree/2009-11/msg00152.html
http://cygwin.com/ml/cygwin-xfree/2009-11/msg00000.html

This seems to be due to a bad interaction between the damage tracking for the
Composite extension and damage tracking for the shadow framebuffer.

Where I have been able to reproduce the problem, disabling the composite
extension with '-extension Composite' works around it.

It's not clear why this hasn't bitten us before: nothing obviously relevant has
changed in Xserver 1.7, but maybe we were just lucky, or it may be that Gnome in
recent linux distros makes more extensive use of composite which tickles the bug.
Comment 1 Jon Turney 2009-11-22 14:31:35 UTC
Possibly relevant upstream report:

http://lists.freedesktop.org/archives/xorg/2005-September/010150.html
Comment 2 Jon Turney 2009-11-22 14:32:24 UTC
A simple way to demonstrate this problem:
- start xserver
- start xcompmgr
- start xterm
- exit xterm
Comment 3 Jon Turney 2009-11-22 14:55:51 UTC
Created attachment 4405 [details]
Patch to disable composite extension by default

This looks like a fairly complex problem to solve, so perhaps as an interim
measure disable compsite by default to stop XDMCP users tripping over this
issue.

We did discuss this back at
http://sourceforge.net/mailarchive/forum.php?thread_name=4908A723.10405%40users.sourceforge.net&forum_name=cygwin-ports-general


Updated patch attached
Comment 4 Yaakov Selkowitz 2009-11-24 02:40:58 UTC
Might this be related?

http://bugs.freedesktop.org/show_bug.cgi?id=25136
Comment 5 Yaakov Selkowitz 2009-12-14 04:11:27 UTC
Confirmed.  Composite was working fine before, so this is clearly a change in the 
server.

I suspect Keith's 6 patches in master (d3e054a..a72c65e) may fix this, but they 
haven't been backported to 1.7 yet.  In the meantime, as this appears to be 
completely broken, I'll just disable the Composite extension entirely in 
configure.
Comment 6 Yaakov Selkowitz 2009-12-21 03:17:51 UTC
Unfortunately the backported fb patch posted to xorg-devel today doesn't help. 
:-(

FWIW, here's a backtrace of the crash:

0x004cfaf0 in damageRegionAppend (pDrawable=0x1919560, pRegion=0x28cb48,
    clip=1, subWindowMode=1)
    at miext/damage/damage.c:290
290             if (pDamage->pDrawable->type == DRAWABLE_WINDOW &&
(gdb) bt
#0  0x004cfaf0 in damageRegionAppend (pDrawable=0x1919560, pRegion=0x28cb48,
    clip=1, subWindowMode=1)
    at miext/damage/damage.c:290
#1  0x004cfd81 in damageDamageBox (pDrawable=0x1919560,
    pBox=<value optimized out>, subWindowMode=<value optimized out>)
    at miext/damage/damage.c:425
#2  0x004d0334 in damageComposite (op=1 '\001', pSrc=0x1dfefb8, pMask=0x0,
    pDst=0x1dfe970, xSrc=0, ySrc=0, xMask=0, yMask=0, xDst=0, yDst=0,
    width=1394, height=992)
    at miext/damage/damage.c:640
#3  0x00466fc1 in ProcRenderComposite (client=0x1db6830)
    at render/render.c:723
#4  0x004f05d6 in Dispatch ()
    at dix/dispatch.c:445
#5  0x004e56aa in main (argc=1, argv=0x18b9ba0, envp=0xffffffff)
    at dix/main.c:285
Comment 7 Jon Turney 2010-02-08 21:44:37 UTC
Created attachment 4580 [details]
Don't enable ROOTLESS_WORKAROUND, it breaks Composite
Comment 8 Yaakov Selkowitz 2010-02-09 20:40:20 UTC
Nice work.  Whether that opens up to http://bugs.freedesktop.org/show_bug.cgi?
id=1168 will have to be seen, but this would only affect WindowsWM, so I'm not 
overly concerned.

Patch in queue for 1.7.4.
Comment 9 Yaakov Selkowitz 2010-02-19 19:20:07 UTC
WFM and at least one other person on the list.  Patch committed and cherry-picked; 
closing.