Bug 329075

Summary: Kwin crashes with opengl
Product: [Plasma] kwin Reporter: fri.K <fri.k>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash Keywords: drkonqi
Priority: NOR    
Version: 4.11.4   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description fri.K 2013-12-21 14:20:00 UTC
Application: kwin (4.11.4)
KDE Platform Version: 4.11.4
Qt Version: 4.8.5
Operating System: Linux 3.12.5-200.fc19.x86_64 x86_64
Distribution: "Fedora release 19 (Schrödinger’s Cat)"

-- Information about the crash:
Kwin crashes if started with openGL 3.1 or 2. 
KDE 4.11.5
Fedora 19 x86_64
Graphic card from lshw: Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller [8086:27A2]
vendor: Intel Corporation [8086]

The crash can be reproduced every time.

-- Backtrace:
Application: KWin (kwin), signal: Aborted
Using host libthread_db library "/lib64/libthread_db.so.1".
[KCrash Handler]
#5  0x00007f9dadeee9e9 in raise () from /lib64/libc.so.6
#6  0x00007f9dadef00f8 in abort () from /lib64/libc.so.6
#7  0x00007f9dadee7956 in __assert_fail_base () from /lib64/libc.so.6
#8  0x00007f9dadee7a02 in __assert_fail () from /lib64/libc.so.6
#9  0x00000035dd441309 in poll_for_event () from /lib64/libX11.so.6
#10 0x00000035dd44139e in poll_for_response () from /lib64/libX11.so.6
#11 0x00000035dd44167d in _XEventsQueued () from /lib64/libX11.so.6
#12 0x00000035dd444385 in _XGetRequest () from /lib64/libX11.so.6
#13 0x00007f9daecdb327 in DRI2GetBuffersWithFormat () from /lib64/libGL.so.1
#14 0x00007f9daecd8e6b in dri2GetBuffersWithFormat () from /lib64/libGL.so.1
#15 0x00007f9d93acce53 in intel_update_renderbuffers () from /usr/lib64/dri/i915_dri.so
#16 0x00007f9d93acd113 in intel_prepare_render () from /usr/lib64/dri/i915_dri.so
#17 0x00007f9d93acda91 in intelMakeCurrent () from /usr/lib64/dri/i915_dri.so
#18 0x00007f9d93ae99d6 in driBindContext () from /usr/lib64/dri/i915_dri.so
#19 0x00007f9daecda68f in dri2_bind_context () from /lib64/libGL.so.1
#20 0x00007f9daecb51f3 in glXMakeCurrentReadSGI () from /lib64/libGL.so.1
#21 0x00007f9db31d3319 in KWin::GlxBackend::initRenderingContext() () from /lib64/libkdeinit4_kwin.so
#22 0x00007f9db31d4e59 in KWin::GlxBackend::init() () from /lib64/libkdeinit4_kwin.so
#23 0x00007f9db31cfe7c in KWin::SceneOpenGL::createScene() () from /lib64/libkdeinit4_kwin.so
#24 0x00007f9db31b4e95 in KWin::Compositor::slotCompositingOptionsInitialized() () from /lib64/libkdeinit4_kwin.so
#25 0x00007f9db31b521d in KWin::Compositor::setup() [clone .part.76] () from /lib64/libkdeinit4_kwin.so
#26 0x00007f9db31b55c5 in KWin::Compositor::slotConfigChanged() () from /lib64/libkdeinit4_kwin.so
#27 0x00007f9db313c825 in KWin::Compositor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) [clone .part.27] () from /lib64/libkdeinit4_kwin.so
#28 0x00007f9db019ff78 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /lib64/libQtCore.so.4
#29 0x00007f9db314d69f in KWin::Workspace::slotReconfigure() () from /lib64/libkdeinit4_kwin.so
#30 0x00007f9db314dcad in KWin::Workspace::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) [clone .part.160] () from /lib64/libkdeinit4_kwin.so
#31 0x00007f9db019ff78 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /lib64/libQtCore.so.4
#32 0x00007f9db01a4141 in QObject::event(QEvent*) () from /lib64/libQtCore.so.4
#33 0x00007f9daf31752c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQtGui.so.4
#34 0x00007f9daf31daf0 in QApplication::notify(QObject*, QEvent*) () from /lib64/libQtGui.so.4
#35 0x00007f9db0e82eba in KApplication::notify(QObject*, QEvent*) () from /lib64/libkdeui.so.5
#36 0x00007f9db018c26d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /lib64/libQtCore.so.4
#37 0x00007f9db01bbc13 in QTimerInfoList::activateTimers() () from /lib64/libQtCore.so.4
#38 0x00007f9db01bc600 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#39 0x00007f9daf3b4936 in QEventDispatcherX11::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtGui.so.4
#40 0x00007f9db018aecf in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#41 0x00007f9db018b1c5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#42 0x00007f9db019045b in QCoreApplication::exec() () from /lib64/libQtCore.so.4
#43 0x00007f9db316d7e6 in kdemain () from /lib64/libkdeinit4_kwin.so
#44 0x00007f9dadedab45 in __libc_start_main () from /lib64/libc.so.6
#45 0x0000000000400a01 in _start ()

The reporter indicates this bug may be a duplicate of or related to bug 328718.

Possible duplicates by query: bug 328847, bug 328718, bug 328004, bug 327821, bug 324255.

Reported using DrKonqi
Comment 1 Thomas Lübking 2013-12-21 22:08:34 UTC
driver bug.
could be bug #328718 or bug #327310 (actually more like #327310)

Just to be very sure about this:
it happens with GL2 *and* GL3, but *not* with GL1?
Comment 2 fri.K 2013-12-22 06:55:05 UTC
(In reply to comment #1)
> it happens with GL2 *and* GL3, but *not* with GL1?

In former release- yes, but I just have checked again and it's working with GL1.0. Then I switched to GL2.0 and it's also working. Now it only crashes if i try GL3.1 (always). After such attempt I must log off to try again GL2.0.
It looks hardware/driver related because in other devices it works like a charm.
Comment 3 Thomas Lübking 2013-12-22 11:44:59 UTC
long story short: driver and gpu combo do not support gl3 and the "modern" context creation is apparently broken to on failure cause an invalid state, leading to later segfaults in the driver.
-> do not try to use GL3

*** This bug has been marked as a duplicate of bug 327310 ***
Comment 4 fri.K 2013-12-22 15:35:54 UTC
(In reply to comment #3)
> long story short: (..)
> -> do not try to use GL3
Thanks, I think it's not a problem, but in future there could be some checker before showing this option or something. But as I said, it's not a problem for me.
Comment 5 Martin Flöser 2013-12-22 18:39:32 UTC
> Thanks, I think it's not a problem, but in future there could be some
> checker before showing this option or something. But as I said, it's not a
> problem for me.
well the problem is, that the test crashes :-)
Comment 6 fri.K 2013-12-22 19:34:18 UTC
(In reply to comment #5)
> well the problem is, that the test crashes :-)
You mean some UT or me as SCT? :)
Comment 7 Thomas Lübking 2013-12-22 20:09:58 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > well the problem is, that the test crashes :-)
> You mean some UT or me as SCT? :)

We cannot check the GL capabilities in the config dialog since drivers or (worse) broken driver installations may crash on that test, making the config dialog inaccessible - we had that :-(

What *could* happen regarding bug #327310 would be to skip trying to create a GL3 context in kwin since we know it's not supported (what usually the failed creation would indicate) and this way we would bypass the driver bug (unless the driver start announcing GLCore support and crashing nevertheless ;-)
Comment 8 fri.K 2013-12-22 20:24:56 UTC
(In reply to comment #7)
> We cannot check the GL capabilities in the config dialog since drivers or
> (worse) broken driver installations may crash on that test
OK, I get it now.  

> What *could* happen regarding bug #327310 would be to skip trying to create
> a GL3 context in kwin since we know it's not supported (what usually the
> failed creation would indicate)
In simple world probably it could be enough. But we are ugly creatures and one day I can start this OS in some hardware and another day in other.
Only way I see it, is to force driver developers to fix it, at least function "isAvailable()" or whatever it calls.
In my opinion KDE could only show message "Some hardware is broken, if it fails, try GL2 then. More info here".