Bug 344733 - Crash when changing opengl 2.0 -> opengl 3.1
Summary: Crash when changing opengl 2.0 -> opengl 3.1
Status: RESOLVED DUPLICATE of bug 327310
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-02 09:29 UTC by Pascal d'Hermilly
Modified: 2015-03-02 14:06 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal d'Hermilly 2015-03-02 09:29:13 UTC
Application: kwin (4.11.11)
KDE Platform Version: 4.13.3
Qt Version: 4.8.6
Operating System: Linux 3.16.0-31-generic x86_64
Distribution: Ubuntu 14.04.2 LTS

-- Information about the crash:
- What I was doing when the application crashed:
I had noticed some small rendering problems so I went into Desktop effects Advanced settings and changed compositing type from OpenGL 2.0 to OpenGL 3.1. Once I clicked apply it came with a crash dialog and started a countdown to restore settings to before.

I have integrated intel graphics.
In kinfocenter under OpenGL it says 2.1 mesa 10.3.2

The crash can be reproduced every time.

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

Thread 3 (Thread 0x7f1af1315700 (LWP 2099)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f1b16bb8ffb in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#2  0x00007f1b16bb9039 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#3  0x00007f1b0f72e182 in start_thread (arg=0x7f1af1315700) at pthread_create.c:312
#4  0x00007f1b179c947d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7f1af9b78700 (LWP 3035)):
#0  0x00007f1b179c0da3 in select () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f1b11d832c7 in qt_safe_select (nfds=13, fdread=0x7f1af4003d78, fdwrite=0x7f1af4004010, fdexcept=0x7f1af40042a8, orig_timeout=0x0) at kernel/qcore_unix.cpp:79
#2  0x00007f1b11d88824 in QEventDispatcherUNIXPrivate::doSelect (this=this@entry=0x7f1af4003bc0, flags=..., timeout=0x0) at kernel/qeventdispatcher_unix.cpp:223
#3  0x00007f1b11d88c92 in QEventDispatcherUNIX::processEvents (this=0x7f1af40008f0, flags=...) at kernel/qeventdispatcher_unix.cpp:936
#4  0x00007f1b11d570af in QEventLoop::processEvents (this=this@entry=0x7f1af9b77da0, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f1b11d573a5 in QEventLoop::exec (this=this@entry=0x7f1af9b77da0, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f1b11c53c5f in QThread::exec (this=this@entry=0x9fb400) at thread/qthread.cpp:537
#7  0x00007f1b11d38823 in QInotifyFileSystemWatcherEngine::run (this=0x9fb400) at io/qfilesystemwatcher_inotify.cpp:265
#8  0x00007f1b11c5632f in QThreadPrivate::start (arg=0x9fb400) at thread/qthread_unix.cpp:349
#9  0x00007f1b0f72e182 in start_thread (arg=0x7f1af9b78700) at pthread_create.c:312
#10 0x00007f1b179c947d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7f1b18202800 (LWP 2088)):
[KCrash Handler]
#6  0x00007f1b17905cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#7  0x00007f1b179090d8 in __GI_abort () at abort.c:89
#8  0x00007f1b178feb86 in __assert_fail_base (fmt=0x7f1b17a4f830 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7f1b15847390 "!xcb_xlib_threads_sequence_lost", file=file@entry=0x7f1b158471db "../../src/xcb_io.c", line=line@entry=274, function=function@entry=0x7f1b15847696 <__PRETTY_FUNCTION__.14364> "poll_for_event") at assert.c:92
#9  0x00007f1b178fec32 in __GI___assert_fail (assertion=assertion@entry=0x7f1b15847390 "!xcb_xlib_threads_sequence_lost", file=file@entry=0x7f1b158471db "../../src/xcb_io.c", line=line@entry=274, function=function@entry=0x7f1b15847696 <__PRETTY_FUNCTION__.14364> "poll_for_event") at assert.c:101
#10 0x00007f1b157d7c69 in poll_for_event (dpy=dpy@entry=0x9b9e50) at ../../src/xcb_io.c:271
#11 0x00007f1b157d7cfc in poll_for_response (dpy=dpy@entry=0x9b9e50) at ../../src/xcb_io.c:289
#12 0x00007f1b157d7fcd in _XEventsQueued (dpy=0x9b9e50, mode=mode@entry=1) at ../../src/xcb_io.c:363
#13 0x00007f1b157d8273 in _XFlush (dpy=<optimized out>) at ../../src/xcb_io.c:514
#14 0x00007f1b157dac75 in _XGetRequest (dpy=dpy@entry=0x9b9e50, type=type@entry=5 '\005', len=len@entry=20) at ../../src/XlibInt.c:1735
#15 0x00007f1b12840997 in DRI2GetBuffersWithFormat (dpy=0x9b9e50, drawable=25241578, width=width@entry=0xb8bd38, height=height@entry=0xb8bd3c, attachments=0x7fff8bd0b520, count=1, outCount=outCount@entry=0x7fff8bd0b51c) at ../../../../src/glx/dri2.c:481
#16 0x00007f1b1283e2eb in dri2GetBuffersWithFormat (driDrawable=<optimized out>, width=0xb8bd38, height=0xb8bd3c, attachments=<optimized out>, count=<optimized out>, out_count=0x7fff8bd0b51c, loaderPrivate=0x187cca0) at ../../../../src/glx/dri2_glx.c:900
#17 0x00007f1af33dbbba in intel_query_dri2_buffers (buffer_count=0x7fff8bd0b51c, buffers=<synthetic pointer>, drawable=0xb8bd10, brw=0xc9cf18) at ../../../../../../../src/mesa/drivers/dri/i965/brw_context.c:1275
#18 intel_update_dri2_buffers (drawable=0xb8bd10, brw=0xc9cf18) at ../../../../../../../src/mesa/drivers/dri/i965/brw_context.c:1091
#19 intel_update_renderbuffers (context=context@entry=0xc115b0, drawable=drawable@entry=0xb8bd10) at ../../../../../../../src/mesa/drivers/dri/i965/brw_context.c:1147
#20 0x00007f1af33dbf93 in intel_prepare_render (brw=brw@entry=0xc9cf18) at ../../../../../../../src/mesa/drivers/dri/i965/brw_context.c:1166
#21 0x00007f1af33dc0eb in intelMakeCurrent (driContextPriv=0xc115b0, driDrawPriv=0xb8bd10, driReadPriv=0xb8bd10) at ../../../../../../../src/mesa/drivers/dri/i965/brw_context.c:1009
#22 0x00007f1af337d2c6 in driBindContext (pcp=<optimized out>, pdp=<optimized out>, prp=<optimized out>) at ../../../../../../../src/mesa/drivers/dri/common/dri_util.c:540
#23 0x00007f1b1283fc94 in dri2_bind_context (context=0x1283450, old=<optimized out>, draw=25241579, read=25241579) at ../../../../src/glx/dri2_glx.c:160
#24 0x00007f1b1281a1f7 in MakeContextCurrent (dpy=0x9b9e50, draw=25241579, read=25241579, gc_user=0x1283450) at ../../../../src/glx/glxcurrent.c:243
#25 0x00007f1b17d76749 in KWin::GlxBackend::initRenderingContext (this=this@entry=0x1ad02f0) at ../../kwin/glxbackend.cpp:221
#26 0x00007f1b17d782f9 in KWin::GlxBackend::init (this=0x1ad02f0) at ../../kwin/glxbackend.cpp:94
#27 0x00007f1b17d731cc in KWin::SceneOpenGL::createScene () at ../../kwin/scene_opengl.cpp:222
#28 0x00007f1b17d577a5 in KWin::Compositor::slotCompositingOptionsInitialized (this=0xb3c5d0) at ../../kwin/composite.cpp:208
#29 0x00007f1b17cdfa55 in KWin::Compositor::qt_static_metacall (_o=<optimized out>, _id=<optimized out>, _a=<optimized out>, _c=<optimized out>) at moc_composite.cpp:193
#30 0x00007f1b11d6c87a in QMetaObject::activate (sender=0x1bbe040, m=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3539
#31 0x00007f1b11c46b18 in QFutureWatcherBase::event (this=<optimized out>, event=0x7f1aec0008c0) at concurrent/qfuturewatcher.cpp:344
#32 0x00007f1b110f1e2c in QApplicationPrivate::notify_helper (this=this@entry=0x987d70, receiver=receiver@entry=0x1bbe040, e=e@entry=0x7f1aec0008c0) at kernel/qapplication.cpp:4567
#33 0x00007f1b110f84a0 in QApplication::notify (this=this@entry=0x7fff8bd0c220, receiver=receiver@entry=0x1bbe040, e=e@entry=0x7f1aec0008c0) at kernel/qapplication.cpp:4353
#34 0x00007f1b1660dd1a in KApplication::notify (this=0x7fff8bd0c220, receiver=0x1bbe040, event=0x7f1aec0008c0) at ../../kdeui/kernel/kapplication.cpp:311
#35 0x00007f1b11d584dd in QCoreApplication::notifyInternal (this=0x7fff8bd0c220, receiver=receiver@entry=0x1bbe040, event=event@entry=0x7f1aec0008c0) at kernel/qcoreapplication.cpp:953
#36 0x00007f1b11d5bb3d in sendEvent (event=0x7f1aec0008c0, receiver=0x1bbe040) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#37 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x9311f0) at kernel/qcoreapplication.cpp:1577
#38 0x00007f1b11d5bfe3 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1470
#39 0x00007f1b1119432c in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#40 QEventDispatcherX11::processEvents (this=0x932af0, flags=...) at kernel/qeventdispatcher_x11.cpp:75
#41 0x00007f1b11d570af in QEventLoop::processEvents (this=this@entry=0x7fff8bd0c090, flags=...) at kernel/qeventloop.cpp:149
#42 0x00007f1b11d573a5 in QEventLoop::exec (this=this@entry=0x7fff8bd0c090, flags=...) at kernel/qeventloop.cpp:204
#43 0x00007f1b11d5cb79 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1225
#44 0x00007f1b110f037c in QApplication::exec () at kernel/qapplication.cpp:3828
#45 0x00007f1b17d0f9d6 in kdemain (argc=3, argv=0x7fff8bd0c368) at ../../kwin/main.cpp:597
#46 0x00007f1b178f0ec5 in __libc_start_main (main=0x4006d0 <main(int, char**)>, argc=3, argv=0x7fff8bd0c368, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff8bd0c358) at libc-start.c:287
#47 0x00000000004006fe in _start ()

Possible duplicates by query: bug 344371, bug 341645, bug 337359, bug 335983, bug 335915.

Report to https://bugs.kde.org/

Reproducible: Always
Comment 1 Thomas Lübking 2015-03-02 13:43:37 UTC
Driver bug.
Simply don't try - the GPU doesn't support GL 3 anyway.

*** This bug has been marked as a duplicate of bug 327310 ***
Comment 2 Pascal d'Hermilly 2015-03-02 13:47:23 UTC
Why is possible to switch it into something that we apparently know is unsupported?
Comment 3 Thomas Lübking 2015-03-02 13:56:28 UTC
The config dialog does not test the GPU and the context creation does not work this way.

First, because accessing GL, what might - and in the past *did* - crash, in the dialog to configure the GL system turned out to be an ultimately bad idea.

Second, because the context creation arb works by "try to create this context" "worked?" "no?" "try fallback context creation"

The driver should just skip the GL3 context creation so we walk on to a GL2 context.
Comment 4 Pascal d'Hermilly 2015-03-02 13:59:43 UTC
ok. I just assumed the GPU in some way declared it's capabilities.
Thanks
Comment 5 Thomas Lübking 2015-03-02 14:06:03 UTC
"It is" - but the process is a bit hackish (you create a basic 1.3 context to use it to query the supported version by some legacy GL API)
See eg. https://bugs.kde.org/show_bug.cgi?id=327310#c28

For the config module: in an ideal world, where drivers would never crash on even most basic calls, we'd just check capabilities, yes :-(