Bug 312335

Summary: kwin crashed after switching back to tty7 from tty8
Product: [Plasma] kwin Reporter: sparhawk <kdebugs>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash Flags: thomas.luebking: Intel+
Priority: NOR    
Version: 4.9.3   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: output of `glxinfo`

Description sparhawk 2012-12-29 12:37:12 UTC
Application: kwin (4.9.3)
KDE Platform Version: 4.9.3
Qt Version: 4.8.3
Operating System: Linux 3.5.0-21-generic x86_64
Distribution: Ubuntu 12.10

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

I had a KDE session active in tty7. I started a new session (with a different username) in tty8. As it loaded up, I switched back to tty7 with Ctrl+Alt+7. The screen displayed some artefacts, then displayed the kwin crash dialogue.

-- Backtrace:
Application: KWin (kwin), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f7e44d6c780 (LWP 1994))]

Thread 3 (Thread 0x7f7e35f33700 (LWP 2074)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f7e54d11cd7 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#2  0x00007f7e54d11d09 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#3  0x00007f7e4ce15e9a in start_thread (arg=0x7f7e35f33700) at pthread_create.c:308
#4  0x00007f7e57de8cbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f7e3db16700 (LWP 3130)):
#0  0x00007f7e57de2023 in select () at ../sysdeps/unix/syscall-template.S:82
#1  0x00007f7e53a90023 in qt_safe_select (nfds=16, fdread=0x7f7e38000aa8, fdwrite=0x7f7e38000d40, fdexcept=0x7f7e38000fd8, orig_timeout=0x0) at kernel/qcore_unix.cpp:83
#2  0x00007f7e53a949e4 in QEventDispatcherUNIXPrivate::doSelect (this=this@entry=0x7f7e380008f0, flags=..., timeout=0x0) at kernel/qeventdispatcher_unix.cpp:223
#3  0x00007f7e53a95572 in QEventDispatcherUNIX::processEvents (this=0x7f7e3802c520, flags=...) at kernel/qeventdispatcher_unix.cpp:926
#4  0x00007f7e53a632bf in QEventLoop::processEvents (this=this@entry=0x7f7e3db15dd0, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f7e53a63548 in QEventLoop::exec (this=0x7f7e3db15dd0, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f7e53964b10 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007f7e53a439af in QInotifyFileSystemWatcherEngine::run (this=0x30d90c0) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007f7e53967aec in QThreadPrivate::start (arg=0x30d90c0) at thread/qthread_unix.cpp:338
#9  0x00007f7e4ce15e9a in start_thread (arg=0x7f7e3db16700) at pthread_create.c:308
#10 0x00007f7e57de8cbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f7e44d6c780 (LWP 1994)):
[KCrash Handler]
#6  brw_update_renderbuffer_surface (brw=0x23d9c10, rb=0x23bc660, unit=0) at brw_wm_surface_state.c:1109
#7  0x00007f7e3c059aa0 in brw_update_renderbuffer_surfaces (brw=0x23d9c10) at brw_wm_surface_state.c:1205
#8  0x00007f7e3c043ae2 in brw_upload_state (brw=brw@entry=0x23d9c10) at brw_state_upload.c:498
#9  0x00007f7e3c0311d7 in brw_try_draw_prims (max_index=23, min_index=71490856, ib=<optimized out>, nr_prims=<optimized out>, prim=0x7fff0442dd10, arrays=<optimized out>, ctx=0x23d9c10) at brw_draw.c:493
#10 brw_draw_prims (ctx=0x23d9c10, prim=0x7fff0442dd10, nr_prims=<optimized out>, ib=<optimized out>, index_bounds_valid=<optimized out>, min_index=0, max_index=23, tfb_vertcount=0x0) at brw_draw.c:589
#11 0x00007f7e37ba9b54 in vbo_draw_arrays (ctx=0x23d9c10, mode=4, start=0, count=24, numInstances=1, baseInstance=<optimized out>) at ../../../../../src/mesa/vbo/vbo_exec_array.c:645
#12 0x00007f7e5476789e in KWin::GLVertexBufferPrivate::corePainting (this=0x25dbd30, region=..., primitiveMode=4, hardwareClipping=<optimized out>) at ../../../kwin/libkwineffects/kwinglutils.cpp:1218
#13 0x00007f7e54767dbd in KWin::GLVertexBuffer::render (this=this@entry=0x23b5180, region=..., primitiveMode=primitiveMode@entry=4, hardwareClipping=hardwareClipping@entry=false) at ../../../kwin/libkwineffects/kwinglutils.cpp:1341
#14 0x00007f7e54767e41 in KWin::GLVertexBuffer::render (this=0x23b5180, primitiveMode=4) at ../../../kwin/libkwineffects/kwinglutils.cpp:1333
#15 0x00007f7e58174731 in KWin::SceneOpenGL::paintBackground (this=this@entry=0x22f8160, region=...) at ../../kwin/scene_opengl.cpp:210
#16 0x00007f7e58164270 in KWin::Scene::paintSimpleScreen (this=this@entry=0x22f8160, orig_mask=orig_mask@entry=8, region=...) at ../../kwin/scene.cpp:323
#17 0x00007f7e58161ee2 in KWin::Scene::finalPaintScreen (this=0x22f8160, mask=8, region=..., data=...) at ../../kwin/scene.cpp:192
#18 0x00007f7e58181523 in KWin::EffectsHandlerImpl::paintScreen (this=0x2666f60, mask=mask@entry=8, region=..., data=...) at ../../kwin/effects.cpp:246
#19 0x00007f7e565d3bf7 in KWin::Effect::paintScreen (this=this@entry=0x26b5b40, mask=mask@entry=8, region=..., data=...) at ../../../kwin/libkwineffects/kwineffects.cpp:142
#20 0x00007f7e581814cb in KWin::EffectsHandlerImpl::paintScreen (this=0x2666f60, mask=mask@entry=8, region=..., data=...) at ../../kwin/effects.cpp:243
#21 0x00007f7e565d3bf7 in KWin::Effect::paintScreen (this=this@entry=0x28695e0, mask=mask@entry=8, region=..., data=...) at ../../../kwin/libkwineffects/kwineffects.cpp:142
#22 0x00007f7e581814cb in KWin::EffectsHandlerImpl::paintScreen (this=0x2666f60, mask=8, region=..., data=...) at ../../kwin/effects.cpp:243
#23 0x00007f7e5816352b in KWin::Scene::paintScreen (this=0x22f8160, mask=0x7fff0442e3bc, region=0x7fff0442e460) at ../../kwin/scene.cpp:146
#24 0x00007f7e581780ed in KWin::SceneOpenGL::paint (this=0x22f8160, damage=..., toplevels=...) at ../../kwin/scene_opengl_glx.cpp:499
#25 0x00007f7e5815d228 in KWin::Workspace::performCompositing (this=0x238ba10) at ../../kwin/composite.cpp:443
#26 0x00007f7e53a7926c in QObject::event (this=0x238ba10, e=<optimized out>) at kernel/qobject.cpp:1157
#27 0x00007f7e52e0be9c in QApplicationPrivate::notify_helper (this=this@entry=0x21aaeb0, receiver=receiver@entry=0x238ba10, e=e@entry=0x7fff0442eb40) at kernel/qapplication.cpp:4562
#28 0x00007f7e52e1030a in QApplication::notify (this=0x7fff0442f180, receiver=0x238ba10, e=0x7fff0442eb40) at kernel/qapplication.cpp:4423
#29 0x00007f7e578d71d6 in KApplication::notify (this=0x7fff0442f180, receiver=0x238ba10, event=0x7fff0442eb40) at ../../kdeui/kernel/kapplication.cpp:311
#30 0x00007f7e53a6456e in QCoreApplication::notifyInternal (this=0x7fff0442f180, receiver=0x238ba10, event=0x7fff0442eb40) at kernel/qcoreapplication.cpp:915
#31 0x00007f7e53a95462 in sendEvent (event=0x7fff0442eb40, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#32 QTimerInfoList::activateTimers (this=0x21aba68) at kernel/qeventdispatcher_unix.cpp:611
#33 0x00007f7e53a954c0 in QEventDispatcherUNIX::activateTimers (this=this@entry=0x2140ad0) at kernel/qeventdispatcher_unix.cpp:868
#34 0x00007f7e53a95618 in QEventDispatcherUNIX::processEvents (this=0x2140ad0, flags=...) at kernel/qeventdispatcher_unix.cpp:930
#35 0x00007f7e52eb1a3f in QEventDispatcherX11::processEvents (this=0x2140ad0, flags=...) at kernel/qeventdispatcher_x11.cpp:152
#36 0x00007f7e53a632bf in QEventLoop::processEvents (this=this@entry=0x7fff0442ee90, flags=...) at kernel/qeventloop.cpp:149
#37 0x00007f7e53a63548 in QEventLoop::exec (this=0x7fff0442ee90, flags=...) at kernel/qeventloop.cpp:204
#38 0x00007f7e53a68708 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#39 0x00007f7e58116e14 in kdemain (argc=3, argv=0x7fff0442f2c8) at ../../kwin/main.cpp:545
#40 0x00007f7e57d1676d in __libc_start_main (main=0x4006a0 <main(int, char**)>, argc=3, ubp_av=0x7fff0442f2c8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff0442f2b8) at libc-start.c:226
#41 0x00000000004006d1 in _start ()

Possible duplicates by query: bug 311682, bug 310612, bug 310417, bug 310027, bug 309415.

Reported using DrKonqi
Comment 1 Thomas Lübking 2012-12-29 13:51:10 UTC
driver bug, please post GPU and driver information for "buggy GPU statistics"

*** This bug has been marked as a duplicate of bug 299333 ***
Comment 2 sparhawk 2012-12-29 22:24:11 UTC
Hi Thomas, I'm not sure what information you require, so please let me know if this is not sufficient.

$ lspci|grep VGA
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
01:00.0 VGA compatible controller: NVIDIA Corporation Device 124d (rev ff)

I'm also running bumblebee 3.0.1-3~quantalppa2 for nVidia Optimus.
Comment 3 Thomas Lübking 2012-12-29 22:36:31 UTC
Ah, optimus - just attach the output of "glxinfo", it will contain anything relevant (gl vendor, renderer) but unless you're using the nouveau driver, this is a sandy bridge intel chip on MESA.

do you use uxa or sna? ("grep -iE 'uxa|sna' /var/log/Xorg.0.log")
Comment 4 sparhawk 2012-12-29 23:20:17 UTC
Created attachment 76085 [details]
output of `glxinfo`
Comment 5 sparhawk 2012-12-29 23:20:46 UTC
$ grep -iE 'uxa|sna' /var/log/Xorg.0.log
[     5.914] (II) UXA(0): Driver registered support for the following operations:
Comment 6 Thomas Lübking 2012-12-29 23:33:19 UTC
yupp, intel on uxa - many thanks.

See here on how to activate SNA (it's arch because they've the best wiki, but it should just work the same on ubuntu)

https://wiki.archlinux.org/index.php/Intel_Graphics#Choose_acceleration_method

Personal experience: it's faster and more "reliable" in the visual outcome, BUT some "legacy" (?) games (happened with etracer) occasioanlly up to reliably crash on it. No special problems with kwin observed, though.
Comment 7 sparhawk 2012-12-30 00:38:46 UTC
Thanks for the tip. I had odd results with enabling SNA though. In my case, it prevented changing the screen brightness from 100% (either from laptop keys or external keyboard). Previously my laptop brightness keys had a 25 second delay, which was fixed by modifying grub with:
GRUB_CMDLINE_LINUX_DEFAULT="acpi_backlight=vendor"
(In all cases, changing brightness from the external laptop functioned perfectly.) When I removed this option, brightness worked again (with SNA). Oddly enough, now the laptop keys function, but don't show the brightness overlay. (The external keys work just as normal.)

Well, that's a small price to pay for a better solution though. Thanks again.
Comment 8 sparhawk 2012-12-30 00:43:27 UTC
Hmm... I just noticed that now I can't get to 0% brightness any more. Oh well, I guess SNA is not for me. Cheers.