KWin option of auto-suspending for fullscreen windows often causes X to crash in libdrm_intel

Bug #974041 reported by Roman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libdrm (Ubuntu)
Invalid
Undecided
Unassigned
xorg-server (Ubuntu)
Invalid
Undecided
Unassigned
xserver-xorg-video-intel (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Ubuntu release: KUbuntu 12.04 (beta)
libdrm-intel1 2.4.32, xserver-xorg-core 1.11.4

In the Ubuntu 12.04 with the KWin option "suspend desktop effects for fullscreen windows"
enabled, I often get X crashes. This usually occures when I just exit from a fullscreen application,
before the usual KDE desktop should show up. Such thing usually happens with applications running
under wine, but recently I got a similar crash with the usual KDE screensaver. X server just restarts
and all unsaved work in my KDE session gets lost.

In the Xorg.0.log.old I find some stack backtrace, which may differ from case to case, but it always
ends in libdrm_intel. I attach a few examples below. I realize that these logs are possibly not very useful
(there are only raw addresses), but I have no idea how to make X to dump more detailed backtrace,
with full debug info. These crashes are rather well reproducible, and if someone explains how to get
more detailed information, I will gladly do this.

Tags: kubuntu
Revision history for this message
Roman (m01brv) wrote :
Revision history for this message
Roman (m01brv) wrote :
Revision history for this message
Roman (m01brv) wrote :
Revision history for this message
Roman (m01brv) wrote :

And I forgot to say that all this happens with the following graphics card:
Mobile Intel GL960/GM965 Chipset.

bugbot (bugbot)
tags: added: kubuntu
Revision history for this message
Roman (m01brv) wrote :

A minor addition. I find that X server often crashes when using smplayer in the fullscreen mode (also with enabled option of auto-suspeding the KWin compositing). It may happen when I am alt-tabbing to another window or when I call the context menu or when I try to return to the windowed mode or even when I just exit from smplayer. After this X server restarts and in Xorg.0.log.old I see something very similar to what I have already uploaded here.

Revision history for this message
Roman (m01brv) wrote :

I have eventually found a way to obtain detailed debug info when X server crashing.
I am executing the following command from a text console:
sudo gdb -p $(pidof X) -batch -ex 'handle all nostop' -ex 'handle all pass' -ex 'handle 11 stop' -ex 'cont' -ex 'bt full' -ex 'cont' > ~/Xcrash.txt
Then I return back to the graphical session and try to trigger the crash.
I have collected already a few of such backtraces, and I am a bit surprised that apparently they ALL are VERY different.
In general, it seems as if KWin erases some important stuff that is further dereferenced in libdrm functions, and it is rather random which function will trigger the crash.

Revision history for this message
Roman (m01brv) wrote :
Revision history for this message
Roman (m01brv) wrote :
Revision history for this message
Roman (m01brv) wrote :
Revision history for this message
Roman (m01brv) wrote :

I have installed all updates accumulated for Precise during the last week, the bug still persists, no apparent changes.
After that I've done full upgrade from the current xorg-edgers ppa, and these crashes dissappeared (although some other minor problems emerged, but not so disruptive).
It seems that the fix for this bug probably already exists, it just needs to be backported in the official Precise packages...

Revision history for this message
Roman (m01brv) wrote :

X still crashes in the final release of KUbuntu 12.04, as previously.
Upgrading from xorg-edgers eliminates the problem too.

However, I performed a more detailed investigation, and I find that upgrading of only the package libdrm-intel1 (with a few other required by dependencies, including libdrm2, libkms1) does not cure the problem. This means that the problem is not in libdrm, as I originally assumed (although the backtraces always end in libdrm_intel.so). It now seems that the problem is in xserver-xorg-video-intel or in X server itself (they can be upgraded only simultaneously, due to the package dependencies).

Revision history for this message
Roman (m01brv) wrote :

Recheked this with all current Ubuntu updates. The bug still persists. Upgrading xserver-xorg-core with all depending packages from xorg-edgers eliminates the problem as previously.

Revision history for this message
Roman (m01brv) wrote :

The bug is alive, no changes. Upgrading the X server and intel video driver from xorg-edgers removes the issue. However, now the intel driver from xorg-edgers is based on SNA acceleration, which is still buggy, so it is no longer a good solution.
After upgrade the intel driver from x-updates (to version 2.19) the crashes do not happen, but in place of the crash the screen starts to blink crazily, showing various screen images that no longer exist.

I believe the issue is caused by the bug
bugs.freedesktop.org/show_bug.cgi?id=43146
which was fixed in X server 1.12.
That is why upgrading X to 1.12 always solved the problem.

Revision history for this message
Roman (m01brv) wrote :

I have upgraded my system to Ubuntu 12.10, where this bug is not present, so I cannot track its state here any more.

Revision history for this message
Chris Wilson (ickle) wrote :

A mixture of bugs, though I recognise them as also being fixed in UXA.

Changed in libdrm (Ubuntu):
status: New → Invalid
Changed in xorg-server (Ubuntu):
status: New → Invalid
Changed in xserver-xorg-video-intel (Ubuntu):
status: New → 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.