XMir crashes when running with -rootless

Bug #1472097 reported by Chris Halse Rogers
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
xorg-server (Ubuntu)
Fix Released
High
Daniel van Vugt

Bug Description

Ted has run into problems trying to integrate XMir with Unity8. When he starts an app, XMir aborts in compCopyWindow. (Log attached)

This seems to be because compCopyWindow has been called before compConfigNotify (which in turn call compReallocPixmap, and set cw->oldx to valid values). This might be an initialisation order problem in XMir.

Tags: xmir
Revision history for this message
Chris Halse Rogers (raof) wrote :
tags: added: xmir
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Any more information on how to reproduce? I can run xeyes in XMir without any issues...

Revision history for this message
Chris Halse Rogers (raof) wrote : Re: [Bug 1472097] Failed assertion in compCopyWindow

On Monday, 13 July 2015 9:42:20 AM AEST, Robert Ancell wrote:
> Any more information on how to reproduce? I can run xeyes in XMir
> without any issues...
>
I think you need Ted's Unity8 branch to trigger this; it doesn't occur
under mir_demo_server.

--
Sent using Dekko from my Ubuntu device

Revision history for this message
Ted Gould (ted) wrote : Re: Failed assertion in compCopyWindow

I think the big difference is connecting to Unity8 as the MIr server. So I'm setting XMir as connecting to Unity8 and then the application connecting to XMir. I think that Unity8 is doing "something" that the demo server isn't doing. I'm not sure if that's an XMir issue or a Unity8 one.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

<robert_ancell> tedg, regarding bug 1472097 - What's the unity8 branch RAOF is referring to?
<ubot5> bug 1472097 in xorg-server (Ubuntu) "Failed assertion in compCopyWindow" [Undecided,New] https://launchpad.net/bugs/1472097
<tedg> robert_ancell, I don't think it's actually a u8 branch, it is this one: https://code.launchpad.net/~ted/ubuntu-app-launch/xmir-support
 robert_ancell, I then made a xeyes.desktop that set the XMir flag and then did "ubuntu-app-launch xeyes"
 robert_ancell, Under Unity 8

Revision history for this message
Christopher Townsend (townsend) wrote :

I did some investigating on Ted's u-a-l branch that starts Xmir (https://code.launchpad.net/~ted/ubuntu-app-launch/xmir-support) and removed the '-rootless' option to Xmir and now it works.

I guess it's easy enough to remove "-rootless" from the MP, but I wouldn't think Xmir should be crashing with that set either...

Revision history for this message
Ted Gould (ted) wrote : Re: [Bug 1472097] Re: Failed assertion in compCopyWindow

On Mon, 2015-08-03 at 20:40 +0000, Christopher Townsend wrote:

> I guess it's easy enough to remove "-rootless" from the MP, but I
> wouldn't think Xmir should be crashing with that set either...

I think that, long term, we really want to be running -rootless in
general as well. So, I'd prefer to not drop if this is fixable.

kevin gunn (kgunn72)
Changed in xorg-server (Ubuntu):
assignee: nobody → Robert Ancell (robert-ancell)
importance: Undecided → Critical
importance: Critical → High
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Reproducable by running:
(on VT1)
$ sudo mir_demo_server
(on VT2)
$ sudo chown $USER.$USER /var/run/user/$PID/mir_socket
$ XMir :1 -rootless &
(switch to VT1 then back to VT2)
$ DISPLAY=:1 xeyes
(XMir crashes)

The rootless code is kind of hacky, so I'd definitely use non rootless mode until it's better understood / fixed.

summary: - Failed assertion in compCopyWindow
+ XMir crashes when running with -rootless
Changed in xorg-server (Ubuntu):
status: New → Triaged
Revision history for this message
Robert Ancell (robert-ancell) wrote :

It seems to have been caused by a logic error that was only calling CompositeRedirectSubwindows for windows without a parent. I couldn't see any reason why this should be the case and calling this for all windows seems to fix xeyes.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Hmm, now I try more complex applications (e.g. gedit) it does seem to crash for those still. So this is probably not the complete solution.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xorg-server - 2:1.17.2-1ubuntu4

---------------
xorg-server (2:1.17.2-1ubuntu4) wily; urgency=medium

  * debian/patches/xmir-rootless.patch:
    - Fix crash when running XMir in rootless mode (LP: #1472097)

 -- Robert Ancell <email address hidden> Thu, 20 Aug 2015 16:31:37 +1200

Changed in xorg-server (Ubuntu):
status: Triaged → Fix Released
Changed in xorg-server (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

As far as I can tell "-rootless" mode actually is not implemented yet. I can't make it crash but I can see that it mistakenly maps each X Window (some of which could be menus or even individual widgets like in xedit) to separate Mir surfaces. If we're going to continue on this path then Mir needs full sub-surface (child/embedded surfaces) placement support.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Also, each compositor (including QtMir) would need to be modified to support subsurface placement for rootless to work.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Oh, maybe the intent is to use the X Composite extension in rootless. That might avoid the need for special support in each Mir compositor.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Changed in xorg-server (Ubuntu):
assignee: Robert Ancell (robert-ancell) → Daniel van Vugt (vanvugt)
status: Confirmed → Fix Committed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

xorg-server (2:1.17.3-2ubuntu2) xenial; urgency=medium

Changed in xorg-server (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.