Bug 322773 - kwin-4.10.4: crashes after unlocking session when locked for 8-10 hours and foss radeon driver is used
Summary: kwin-4.10.4: crashes after unlocking session when locked for 8-10 hours and f...
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 4.10.4
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL: https://bugs.gentoo.org/show_bug.cgi?...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-24 15:35 UTC by Nikoli
Modified: 2015-01-09 08:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
kwin gdb (9.33 KB, text/plain)
2013-07-24 15:35 UTC, Nikoli
Details
qdbus org.kde.kwin /KWin supportInformation (3.84 KB, text/plain)
2013-07-24 16:40 UTC, Nikoli
Details
/var/log/Xorg.0.log.old (created during crash) (75.51 KB, text/plain)
2013-07-24 16:46 UTC, Nikoli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikoli 2013-07-24 15:35:09 UTC
kde bug #315089 is marked as fixed for kde >=4.10.3 and mesa >=9.10.3, but it still happens here even with newer versions:
[ebuild   R   ~] media-libs/mesa-9.1.4  USE="egl gallium gbm gles2 nptl openvg pax_kernel shared-glapi wayland xa xorg -bindist -classic -debug -gles1 -llvm -osmesa -pic (-r600-llvm-compiler) (-selinux) -vdpau -xvmc" PYTHON_SINGLE_TARGET="python2_7 -python2_6" PYTHON_TARGETS="python2_7 -python2_6" VIDEO_CARDS="r600 radeon -i915 -i965 -intel -nouveau -r100 -r200 -r300 (-radeonsi) -vmware" 0 kB
[ebuild   R    ] x11-libs/libdrm-2.4.45  USE="libkms -static-libs" VIDEO_CARDS="radeon (-exynos) (-freedreno) -intel -nouveau (-omap) -vmware" 0 kB
[ebuild   R    ] x11-base/xorg-server-1.13.4:0/1.13.4  USE="ipv6 nptl suid udev xorg xvfb -dmx -doc -kdrive -minimal (-selinux) -static-libs -tslib -xnest" 0 kB
[ebuild   R    ] kde-base/kwin-4.10.4:4  USE="opengl (-aqua) -debug -gles" 0 kB
[ebuild   R   ~] x11-drivers/xf86-video-ati-7.1.0  USE="udev -glamor" 0 kB
[ebuild   R    ] dev-qt/qtgui-4.8.4-r1:4  USE="accessibility cups dbus exceptions gif glib mng qt3support tiff xinerama xv (-aqua) -c++0x -debug -egl -gtkstyle -nas -nis (-pch) -trace" 0 kB

With FOSS radeon driver kwin crashes after unlocking session when it was locked for several (8-10) hours. If it was locked only for several minutes it will not crash. Sometimes it does not crash even when locked for hours. No 3D apps are working until X is restarted. dmesg is full of such messages:
[461883.276291] [drm:radeon_gem_object_create] *ERROR* Failed to allocate GEM object (4096, 6, 4096, -12)
[461883.276365] [TTM] Out of kernel memory
[461883.276371] [TTM] Out of kernel memory
[461883.276374] [drm:radeon_gem_object_create] *ERROR* Failed to allocate GEM object (4096, 6, 4096, -12)
[461883.276413] [TTM] Out of kernel memory
[461883.276418] [TTM] Out of kernel memory
[461883.276421] [drm:radeon_gem_object_create] *ERROR* Failed to allocate GEM object (4096, 6, 4096, -12)
[461883.276494] [TTM] Out of kernel memory
[461883.276500] [TTM] Out of kernel memory
[461883.276503] [drm:radeon_gem_object_create] *ERROR* Failed to allocate GEM object (4096, 6, 4096, -12)
[461883.276582] [TTM] Out of kernel memory
[461883.276588] [TTM] Out of kernel memory
[461883.276591] [drm:radeon_gem_object_create] *ERROR* Failed to allocate GEM object (4096, 6, 4096, -12)
[461883.276637] kwin_opengl_tes[31530]: segfault at 0 ip 00000299698c7f6b sp 0000039d2a521160 error 4 in r600g_dri.so[29969560000+572000]
[461883.276658] grsec: Segmentation fault occurred at            (nil) in /usr/lib64/kde4/libexec/kwin_opengl_test[kwin_opengl_tes:31530] uid/euid:1000/1000 gid/egid:1000/1000, parent /usr/bin/kwin[Thread (pooled):31528] uid/euid:1000/1000 gid/egid:1000/1000

Reproducible: Sometimes

Steps to Reproduce:
1. Lock KDE session
2. Wait 10 hours
3. Enter password
Comment 1 Nikoli 2013-07-24 15:35:42 UTC
Created attachment 81320 [details]
kwin gdb
Comment 2 Thomas Lübking 2013-07-24 15:59:26 UTC
It's an OOM bug, that doesn't mean the source is necessarily equal to that of bug #315089 (selecting an MSAA drawable)

Do you a GL screensaver/locker?

Please attach at least /var/log/Xorg.0.log and the output of "qdbus org.kde.kwin /KWin supportInformation"
Comment 3 Nikoli 2013-07-24 16:40:26 UTC
Created attachment 81321 [details]
qdbus org.kde.kwin /KWin supportInformation
Comment 4 Nikoli 2013-07-24 16:46:00 UTC
Created attachment 81322 [details]
/var/log/Xorg.0.log.old (created during crash)
Comment 5 Nikoli 2013-07-24 16:47:02 UTC
> Do you a GL screensaver/locker?
I do not have screensavers installed, how can i know if my locker is GL? I use default locker from kde.
Comment 6 Thomas Lübking 2013-07-24 19:20:03 UTC
(In reply to comment #5)
> > Do you a GL screensaver/locker?
> I do not have screensavers installed, how can i know if my locker is GL?
No fancy animation -> no GL screensaver.

Is it the screenlocker with plasmoids on it or just the login dialog?
You could try in "kcmshell4 kwincompositing", 3rd tab, DISable "Suspend compositing for fullscreen windows" (but that's just a wild guess)

Another wild guess:
if it's not a notebook, try unplugging mouse/keyboard after locking (warning, it could happen that the X11 server can not re-enable them afterwards, so don't risk data loss)

@Martin:
The Xorg log has

------------
(EE) [mi] EQ overflowing.  Additional events will be discarded until existing events are processed.
(EE) 
(EE) Backtrace:
(EE) 0: /usr/bin/X (xorg_backtrace+0x47) [0x1540dce907]
(EE) 1: /usr/bin/X (mieqEnqueue+0x2a3) [0x1540dad093]
(EE) 2: /usr/bin/X (0x1540bee000+0x7172d) [0x1540c5f72d]
(EE) 3: /usr/lib64/xorg/modules/input/evdev_drv.so (0x3b1f6441000+0x6818) [0x3b1f6447818]
(EE) 4: /usr/bin/X (0x1540bee000+0xa2bc7) [0x1540c90bc7]
(EE) 5: /usr/bin/X (0x1540bee000+0xd3ea8) [0x1540cc1ea8]
(EE) 6: /lib64/libpthread.so.0 (0x3b1faf2b000+0xf2c0) [0x3b1faf3a2c0]
(EE) 7: /lib64/libc.so.6 (ioctl+0x7) [0x3b1f9c82ac7]
(EE) 8: /usr/lib64/libdrm.so.2 (drmIoctl+0x38) [0x3b1fad20a58]
(EE) 9: /usr/lib64/libdrm_radeon.so.1 (0x3b1f85bd000+0x2503) [0x3b1f85bf503]
(EE) 10: /usr/lib64/xorg/modules/drivers/radeon_drv.so (0x3b1f87cb000+0x1e8fa) [0x3b1f87e98fa]
(EE) 11: /usr/lib64/xorg/modules/libexa.so (0x3b1f7f8e000+0x90f7) [0x3b1f7f970f7]
(EE) 12: /usr/bin/X (0x1540bee000+0x15bae2) [0x1540d49ae2]
(EE) 13: /usr/bin/X (0x1540bee000+0x114f6a) [0x1540d02f6a]
(EE) 14: /usr/bin/X (FreePicture+0x18c) [0x1540d39d7c]
(EE) 15: /usr/bin/X (0x1540bee000+0x81842) [0x1540c6f842]
(EE) 16: /usr/bin/X (FreeClientResources+0x8a) [0x1540c70cda]
(EE) 17: /usr/bin/X (CloseDownClient+0x6a) [0x1540c474fa]
(EE) 18: /usr/bin/X (0x1540bee000+0x5a156) [0x1540c48156]
(EE) 19: /usr/bin/X (0x1540bee000+0x46a94) [0x1540c34a94]
(EE) 20: /lib64/libc.so.6 (__libc_start_main+0xed) [0x3b1f9bc637d]
(EE) 21: /usr/bin/X (0x1540bee000+0x46df1) [0x1540c34df1]
--------------

You mentioned similar (causing a hung GPU) but in relation with synaptics, which is not available here.
Did it look similar and was that on your radeon chip and/or in relation to screenlocking as well?
Comment 7 Nikoli 2013-07-24 21:22:31 UTC
> Is it the screenlocker with plasmoids on it or just the login dialog?

No plasmoids, just wallpaper + unlock/switch user dialog.

Not laptop, desktop.
Comment 8 Martin Flöser 2013-07-25 06:02:06 UTC
On Wednesday 24 July 2013 19:20:03 you wrote:
> You mentioned similar (causing a hung GPU) but in relation with synaptics,
> which is not available here.
> Did it look similar and was that on your radeon chip and/or in relation to
> screenlocking as well?
Kind of similar as far as one can say with lacking debug symbols, but it was 
on SandyBridge and not related to screen locking. Also the problem hasn't 
occurred for quite some time - I assume that one of the recent package 
upgrades fixed it
Comment 9 Nikoli 2013-07-26 17:25:20 UTC
Crashed again today, do you need gdb output?
Comment 10 Thomas Lübking 2013-07-26 18:22:19 UTC
Is it any different from the present one?

Did you try in "kcmshell4 kwincompositing", 3rd tab, to DISable "Suspend compositing for fullscreen windows"?
Comment 11 Nikoli 2013-07-27 15:04:09 UTC
> Is it any different from the present one?
Not much, almost same.

> Did you try in "kcmshell4 kwincompositing", 3rd tab, to DISable "Suspend compositing for fullscreen windows"?

Not yet, and i need this feature.
Comment 12 Thomas Lübking 2013-07-27 15:07:56 UTC
(In reply to comment #11)

> Not yet, and i need this feature.
Why?
(There's been repetitive discussion to remove it and we just blocked it for intel systems, because the driver(s) happily crash(es) for it)
Comment 13 Nikoli 2013-07-27 15:17:03 UTC
This time i was testing disabling compositing: kwin did not crash, but there was a black screen some time.
Before next screen lock i will keep compositing enabled, but will disable "Suspend compositing for fullscreen windows".

Isn't this feature useful for 3d games and opengl based video outputs in mpv and vlc?
Comment 14 Thomas Lübking 2013-07-27 17:15:21 UTC
> but there was a black screen some time.
You mean like the screen remained black for a longer time ad things went on after normally?
Was there a mouse cursor and did it move?

> sn't this feature useful for 3d games and opengl based video outputs in mpv and vlc?
http://kde-look.org/content/show.php/GameMode?content=156659
Esp. for 3d games it frees more resources.
Comment 15 Martin Flöser 2013-07-29 05:08:05 UTC
> Isn't this feature useful for 3d games and opengl based video outputs in mpv
> and vlc?
No :-) I'm currently doing real world testing with playing Left for Dead 2 on 
a crappy SandyBridge with compositing enabled and I cannot notice any frame 
drops. The importance is that the game renders well, not that we get high 
number of frames - the screen caps at 60 fps anyway. Just Phoronix tests will 
tell you that we cannot do 254 fps. Differences in the area: the kernel 
sneezes.
Comment 16 Martin Flöser 2015-01-09 08:36:52 UTC
not much we can still do here - it's on OOM situation.