Bug 281540

Summary: kwin from kde 4.6.5 crashes on first start with mesa 7.11 on Intel Sandybridge
Product: [Plasma] kwin Reporter: Martin Steigerwald <Martin>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash CC: thomas.luebking
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian unstable   
OS: Linux   
Latest Commit: Version Fixed In:

Description Martin Steigerwald 2011-09-07 12:41:43 UTC
Application: kwin (4.6.5 (4.6.5))
KDE Platform Version: 4.6.5 (4.6.5)
Qt Version: 4.7.3
Operating System: Linux 3.0.0-1-amd64 x86_64
Distribution: Debian GNU/Linux unstable (sid)

-- Information about the crash:
- What I was doing when the application crashed:

I started a new KDE session. To make sure its no configuration issue, I deleted ~/.kde/share/config/kwinrc to start with a default configuration. 

I can work-around the crash by using:

martin@merkaba:~/.kde/env> cat fix-kwin-intel-gl.sh 
#!/bin/sh
export KWIN_DIRECT_GL=1

This didn´t happen with mesa 7.10 and some preliminary mesa 7.11 beta version.

This also doesn´t happen on a second KDE session started after this first one - I have one user for private and one for work things.


- Software in use:

merkaba:~> apt-show-versions | egrep "(kde-window-manager|kdebase|libqt4-gui|mesa|libdrm|xserver-xorg/|xserver-xorg-core/|xserver-xorg-video-intel)"
kde-window-manager/sid uptodate 4:4.6.5-2
kdebase-apps/sid uptodate 4:4.6.5-1
kdebase-bin/sid uptodate 4:4.6.5-1
kdebase-data/sid uptodate 4:4.6.5-1
kdebase-dbg/sid uptodate 4:4.6.5-1
kdebase-runtime/sid uptodate 4:4.6.5-1
kdebase-runtime-data/sid uptodate 4:4.6.5-1
kdebase-runtime-dbg/sid uptodate 4:4.6.5-1
kdebase-workspace/sid uptodate 4:4.6.5-2
kdebase-workspace-bin/sid uptodate 4:4.6.5-2
kdebase-workspace-data/sid uptodate 4:4.6.5-2
kdebase-workspace-dbg/sid uptodate 4:4.6.5-2
kdebase-workspace-kgreet-plugins/sid uptodate 4:4.6.5-2
libdrm-intel1/sid uptodate 2.4.26-1
libdrm-radeon1/sid uptodate 2.4.26-1
libdrm2/sid uptodate 2.4.26-1
libgl1-mesa-dev/sid uptodate 7.11-5
libgl1-mesa-dri/sid uptodate 7.11-5
libgl1-mesa-dri-dbg/sid uptodate 7.11-5
libgl1-mesa-glx/sid uptodate 7.11-5
libgl1-mesa-glx-dbg/sid uptodate 7.11-5
libglapi-mesa/sid uptodate 7.11-5
libglu1-mesa/sid uptodate 7.11-5
libglu1-mesa-dev/sid uptodate 7.11-5
mesa-common-dev/sid uptodate 7.11-5
mesa-utils/sid uptodate 8.0.1-2+b1
xserver-xorg/sid uptodate 1:7.6+8
xserver-xorg-core/sid uptodate 2:1.11.0-1
xserver-xorg-video-intel/sid uptodate 2:2.16.0-1


merkaba:~> cat /proc/version
Linux version 3.0.0-1-amd64 (Debian 3.0.0-3) (ben@decadent.org.uk) (gcc version 4.5.3 (Debian 4.5.3-8) ) #1 SMP Sat Aug 27 16:21:11 UTC 2011



- Hardware in use:

ThinkPad T520 with Sandybridge graphics:

merkaba:~> lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation 2nd Generation Core Processor Family DRAM Controller [8086:0104] (rev 09)
00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0126] (rev 09)
00:16.0 Communication controller [0780]: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 [8086:1c3a] (rev 04)
00:19.0 Ethernet controller [0200]: Intel Corporation 82579LM Gigabit Network Connection [8086:1502] (rev 04)
00:1a.0 USB Controller [0c03]: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 [8086:1c2d] (rev 04)
00:1b.0 Audio device [0403]: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller [8086:1c20] (rev 04)
00:1c.0 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 [8086:1c10] (rev b4)
00:1c.1 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 [8086:1c12] (rev b4)
00:1c.3 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4 [8086:1c16] (rev b4)
00:1c.4 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 [8086:1c18] (rev b4)
00:1d.0 USB Controller [0c03]: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 [8086:1c26] (rev 04)
00:1f.0 ISA bridge [0601]: Intel Corporation QM67 Express Chipset Family LPC Controller [8086:1c4f] (rev 04)
00:1f.2 SATA controller [0106]: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller [8086:1c03] (rev 04)
00:1f.3 SMBus [0c05]: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller [8086:1c22] (rev 04)
03:00.0 Network controller [0280]: Intel Corporation Centrino Advanced-N 6205 [8086:0085] (rev 34)
05:00.0 Mass storage controller [0180]: Silicon Image, Inc. SiI 3531 [SATALink/SATARaid] Serial ATA Controller [1095:3531] (rev 01)
0d:00.0 System peripheral [0880]: Ricoh Co Ltd Device [1180:e823] (rev 05)
0d:00.3 FireWire (IEEE 1394) [0c00]: Ricoh Co Ltd FireWire Host Controller [1180:e832] (rev 04)

The crash can be reproduced some of the time.

-- Backtrace:
Application: KWin (kwin), signal: Segmentation fault
[KCrash Handler]
#6  __memcpy_ssse3 () at ../sysdeps/x86_64/multiarch/memcpy-ssse3.S:91
#7  0x00007fb022e60d4b in __indirect_glProgramParameters4fvNV (target=14470368, index=411952, num=244454144, params=0x64930) at indirect.c:9317
#8  0x00007fb00b5cfa8f in KWin::ARBBlurShader::init (this=0xe13b60) at ../../../kwin/effects/blur/blurshader.cpp:473
#9  0x00007fb00b5ccdfb in KWin::BlurEffect::reconfigure (this=0xe78320, flags=<optimized out>) at ../../../kwin/effects/blur/blur.cpp:76
#10 0x00007fb00b5ccf87 in KWin::BlurEffect::BlurEffect (this=0xe78320) at ../../../kwin/effects/blur/blur.cpp:48
#11 0x00007fb00b5cd036 in KWin::effect_create_kwin4_effect_blur () at ../../../kwin/effects/blur/blur.cpp:29
#12 0x00007fb02596b5c1 in KWin::EffectsHandlerImpl::loadEffect (this=0xd946c0, name=...) at ../../kwin/effects.cpp:1128
#13 0x00007fb02596c689 in KWin::EffectsHandlerImpl::reconfigure (this=0xd946c0) at ../../kwin/effects.cpp:143
#14 0x00007fb02594622a in KWin::Workspace::setupCompositing (this=0xd75c90) at ../../kwin/composite.cpp:216
#15 0x00007fb0258ca6d3 in KWin::Workspace::Workspace (this=0xd75c90, restore=false) at ../../kwin/workspace.cpp:222
#16 0x00007fb0258e176a in KWin::Application::Application (this=<optimized out>) at ../../kwin/main.cpp:331
#17 0x00007fb0258e347b in kdemain (argc=<optimized out>, argv=<optimized out>) at ../../kwin/main.cpp:506
#18 0x00007fb025521ead in __libc_start_main (main=<optimized out>, argc=<optimized out>, ubp_av=<optimized out>, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff84c9da88) at libc-start.c:228
#19 0x00000000004006a1 in _start ()

Reported using DrKonqi
Comment 1 Thomas Lübking 2011-09-07 13:05:39 UTC

*** This bug has been marked as a duplicate of bug 270818 ***
Comment 2 Martin Steigerwald 2011-09-09 16:15:36 UTC
Thanks. I reported this downstream as:

kwin: crashes on login (sandybridge/mesa7.11/blur effect)
http://bugs.debian.org/640799
Comment 3 Thomas Lübking 2011-09-09 16:43:19 UTC
Errrmmm this is unlikely a good general downstream solution since eg. afaik fglrx will segfault with indirect rendering.

Recent kwin version (git master) removed the user choice altogether and enforce direct/indirect rendering depending on backend (4.7 has 3 GL paths) and driver (since only the nvidia css driver can actually do both w/o crashing)

a) can you test 4.7 (or even git master)
b) what's the output when starting kwin from konsole resp. "glxinfo | grep -iE '(renderer|vendor)'
Comment 4 Martin Steigerwald 2011-09-10 08:59:44 UTC
Thomas, what solution do you mean? I did not suggest any concrete solution, just gave all the pointers to possibly relevant information regarding the issue. Its up to the Debian developers to decide for the best possible solution.

a) Although I have a pretty fast ThinkPad T520 with Intel SSD 320 its a question of time spent. I never compiled KDE myself before so I nonetheless likely need some time to get a test setup running. Debian packages of 4.7 do not seem to be available ATM.

b) martin@merkaba:~> glxinfo | grep -iE '(renderer|vendor)'
server glx vendor string: SGI
client glx vendor string: Mesa Project and SGI
OpenGL vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Mobile

Actually I do think that mesa drivers should reliably advertise their features. Client software guessing driver capabilities from vendor and renderer strings does seem like a workaround for me. So if mesa drivers do not advertise features reliably via a good API, then possibly its best to report there first?
Comment 5 Thomas Lübking 2011-09-10 12:35:02 UTC
- I was referring to the "export KWIN_DIRECT_GL=1" solution
- At least 4.7 should be available in binary form, yeso?
- In an ideal world. In the real world things are advertised but not available, available but not advertised and advertised and available but broken (indirect rendering should always work) - at least under some conditions.... There's also more than mesa. :-(

That discussion however took place when 4.6 was released and the current checks are far more broad. (Mesa & Nvidia are assumed to support direct rendering unless the driver fails to create such context altogether)
Comment 6 Martin Steigerwald 2011-09-11 10:22:19 UTC
I saw "export KWIN_DIRECT_GL=1" as a work around, not a solution.

For Debian 4.7 is not yet available in binary form. I also do not find a KDE 4.7 live cd ATM:

http://dewiki.opensuse.org/KDE_Live still lists 4.6.5 as latest version.

Hmmm, Chakra might be providing a LiveCD image at:

http://chakra-project.org/get/

Might try that as I manage to take time for this.