Application: kwin_x11 (5.8.3) (Compiled from sources) Qt Version: 5.7.0 Frameworks Version: 5.28.0 Operating System: Linux 4.7.4-gentoo x86_64 Distribution: "Gentoo Base System release 2.3" -- Information about the crash: - What I was doing when the application crashed: I plugged out my external monitor from my laptop. After that, kwin crashed -- Backtrace: Application: KWin (kwin_x11), signal: Segmentation fault Using host libthread_db library "/lib64/libthread_db.so.1". [Current thread is 1 (Thread 0x7f9531b06840 (LWP 16831))] Thread 8 (Thread 0x7f951130e700 (LWP 3266)): #0 0x00007f95316bd01f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 #1 0x00007f952f156d9a in QWaitConditionPrivate::wait (time=18446744073709551615, this=0x27a1f30) at thread/qwaitcondition_unix.cpp:143 #2 QWaitCondition::wait (this=this@entry=0x261b768, mutex=mutex@entry=0x261b760, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:215 #3 0x00007f952a7f35f5 in QSGRenderThreadEventQueue::takeEvent (wait=true, this=0x261b758) at scenegraph/qsgthreadedrenderloop.cpp:242 #4 QSGRenderThread::processEventsAndWaitForMore (this=this@entry=0x261b6e0) at scenegraph/qsgthreadedrenderloop.cpp:690 #5 0x00007f952a7f5a9a in QSGRenderThread::run (this=0x261b6e0) at scenegraph/qsgthreadedrenderloop.cpp:719 #6 0x00007f952f15672c in QThreadPrivate::start (arg=0x261b6e0) at thread/qthread_unix.cpp:344 #7 0x00007f95316b7444 in start_thread () from /lib64/libpthread.so.0 #8 0x00007f95313fd92d in clone () from /lib64/libc.so.6 Thread 7 (Thread 0x7f9512dba700 (LWP 950)): #0 0x00007f95316bd01f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 #1 0x00007f952f156d9a in QWaitConditionPrivate::wait (time=18446744073709551615, this=0x2854e70) at thread/qwaitcondition_unix.cpp:143 #2 QWaitCondition::wait (this=this@entry=0x28617c8, mutex=mutex@entry=0x28617c0, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:215 #3 0x00007f952a7f35f5 in QSGRenderThreadEventQueue::takeEvent (wait=true, this=0x28617b8) at scenegraph/qsgthreadedrenderloop.cpp:242 #4 QSGRenderThread::processEventsAndWaitForMore (this=this@entry=0x2861740) at scenegraph/qsgthreadedrenderloop.cpp:690 #5 0x00007f952a7f5a9a in QSGRenderThread::run (this=0x2861740) at scenegraph/qsgthreadedrenderloop.cpp:719 #6 0x00007f952f15672c in QThreadPrivate::start (arg=0x2861740) at thread/qthread_unix.cpp:344 #7 0x00007f95316b7444 in start_thread () from /lib64/libpthread.so.0 #8 0x00007f95313fd92d in clone () from /lib64/libc.so.6 Thread 6 (Thread 0x7f94fdefb700 (LWP 949)): #0 QTimerInfoList::timerWait (this=this@entry=0x7f94f8000980, tm=...) at kernel/qtimerinfo_unix.cpp:413 #1 0x00007f952f342829 in QEventDispatcherUNIX::processEvents (this=0x7f94f80008c0, flags=...) at kernel/qeventdispatcher_unix.cpp:480 #2 0x00007f952f2f87ba in QEventLoop::exec (this=this@entry=0x7f94fdefad60, flags=..., flags@entry=...) at kernel/qeventloop.cpp:210 #3 0x00007f952f1521a4 in QThread::exec (this=this@entry=0x274a5b0) at thread/qthread.cpp:507 #4 0x00007f952a31fed5 in QQmlThreadPrivate::run (this=0x274a5b0) at qml/ftw/qqmlthread.cpp:147 #5 0x00007f952f15672c in QThreadPrivate::start (arg=0x274a5b0) at thread/qthread_unix.cpp:344 #6 0x00007f95316b7444 in start_thread () from /lib64/libpthread.so.0 #7 0x00007f95313fd92d in clone () from /lib64/libc.so.6 Thread 5 (Thread 0x7f94fc8d9700 (LWP 16915)): #0 0x00007f95316bd01f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 #1 0x00007f952e50ca94 in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x7f952e5fb180 <QTWTF::pageheap_memory>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359 #2 0x00007f952e50cad9 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=<optimized out>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464 #3 0x00007f95316b7444 in start_thread () from /lib64/libpthread.so.0 #4 0x00007f95313fd92d in clone () from /lib64/libc.so.6 Thread 4 (Thread 0x7f951236f700 (LWP 16880)): #0 0x00007f95313f484d in poll () from /lib64/libc.so.6 #1 0x00007f952f340f2a in poll (__timeout=-1, __nfds=1, __fds=0x7f9500000ac8) at /usr/include/bits/poll2.h:46 #2 qt_ppoll (timeout_ts=0x0, nfds=1, fds=0x7f9500000ac8) at kernel/qcore_unix.cpp:93 #3 qt_safe_poll (fds=0x7f9500000ac8, nfds=nfds@entry=1, timeout_ts=timeout_ts@entry=0x0) at kernel/qcore_unix.cpp:112 #4 0x00007f952f34258d in QEventDispatcherUNIX::processEvents (this=<optimized out>, flags=...) at kernel/qeventdispatcher_unix.cpp:495 #5 0x00007f952f2f87ba in QEventLoop::exec (this=this@entry=0x7f951236ed60, flags=..., flags@entry=...) at kernel/qeventloop.cpp:210 #6 0x00007f952f1521a4 in QThread::exec (this=this@entry=0x1efa090) at thread/qthread.cpp:507 #7 0x00007f952a31fed5 in QQmlThreadPrivate::run (this=0x1efa090) at qml/ftw/qqmlthread.cpp:147 #8 0x00007f952f15672c in QThreadPrivate::start (arg=0x1efa090) at thread/qthread_unix.cpp:344 #9 0x00007f95316b7444 in start_thread () from /lib64/libpthread.so.0 #10 0x00007f95313fd92d in clone () from /lib64/libc.so.6 Thread 3 (Thread 0x7f9518d4b700 (LWP 16854)): #0 0x00007f95313f484d in poll () from /lib64/libc.so.6 #1 0x00007f952f340f2a in poll (__timeout=-1, __nfds=1, __fds=0x7f950c00ab38) at /usr/include/bits/poll2.h:46 #2 qt_ppoll (timeout_ts=0x0, nfds=1, fds=0x7f950c00ab38) at kernel/qcore_unix.cpp:93 #3 qt_safe_poll (fds=0x7f950c00ab38, nfds=nfds@entry=1, timeout_ts=timeout_ts@entry=0x0) at kernel/qcore_unix.cpp:112 #4 0x00007f952f34258d in QEventDispatcherUNIX::processEvents (this=<optimized out>, flags=...) at kernel/qeventdispatcher_unix.cpp:495 #5 0x00007f952f2f87ba in QEventLoop::exec (this=this@entry=0x7f9518d4ad50, flags=..., flags@entry=...) at kernel/qeventloop.cpp:210 #6 0x00007f952f1521a4 in QThread::exec (this=this@entry=0x7f9531c8da00 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread.cpp:507 #7 0x00007f9531c1f335 in QDBusConnectionManager::run (this=0x7f9531c8da00 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:196 #8 0x00007f952f15672c in QThreadPrivate::start (arg=0x7f9531c8da00 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:344 #9 0x00007f95316b7444 in start_thread () from /lib64/libpthread.so.0 #10 0x00007f95313fd92d in clone () from /lib64/libc.so.6 Thread 2 (Thread 0x7f951aa15700 (LWP 16846)): #0 0x00007f95313f484d in poll () from /lib64/libc.so.6 #1 0x00007f9530558882 in poll (__timeout=-1, __nfds=1, __fds=0x7f951aa14c80) at /usr/include/bits/poll2.h:46 #2 _xcb_conn_wait (c=c@entry=0x1d9b490, cond=cond@entry=0x1d9b4d0, vector=vector@entry=0x0, count=count@entry=0x0) at /var/tmp/portage/x11-libs/libxcb-1.12-r2/work/libxcb-1.12/src/xcb_conn.c:479 #3 0x00007f953055a66f in xcb_wait_for_event (c=0x1d9b490) at /var/tmp/portage/x11-libs/libxcb-1.12-r2/work/libxcb-1.12/src/xcb_in.c:693 #4 0x00007f951b8f5ad9 in QXcbEventReader::run (this=0x1da95b0) at qxcbconnection.cpp:1337 #5 0x00007f952f15672c in QThreadPrivate::start (arg=0x1da95b0) at thread/qthread_unix.cpp:344 #6 0x00007f95316b7444 in start_thread () from /lib64/libpthread.so.0 #7 0x00007f95313fd92d in clone () from /lib64/libc.so.6 Thread 1 (Thread 0x7f9531b06840 (LWP 16831)): [KCrash Handler] #6 KWin::ContrastEffect::uploadRegion (this=this@entry=0x230f550, map=@0x7ffc7f3f49d8: 0x7f94fe08bee0, region=...) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/effects/backgroundcontrast/contrast.cpp:262 #7 0x00007f952e6cdae7 in KWin::ContrastEffect::uploadGeometry (this=this@entry=0x230f550, vbo=vbo@entry=0x2050f50, region=...) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/effects/backgroundcontrast/contrast.cpp:280 #8 0x00007f952e6ce86e in KWin::ContrastEffect::doContrast (this=this@entry=0x230f550, shape=..., screen=..., opacity=1) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/effects/backgroundcontrast/contrast.cpp:421 #9 0x00007f952e6cf116 in KWin::ContrastEffect::drawWindow (this=this@entry=0x230f550, w=w@entry=0x23379e0, mask=mask@entry=10, region=..., data=...) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/effects/backgroundcontrast/contrast.cpp:400 #10 0x00007f9530fca621 in KWin::EffectsHandlerImpl::drawWindow (this=0x209f5e0, w=w@entry=0x23379e0, mask=mask@entry=10, region=..., data=...) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/effects.cpp:417 #11 0x00007f952e6494d2 in KWin::BlurEffect::drawWindow (this=this@entry=0x20ad060, w=w@entry=0x23379e0, mask=mask@entry=10, region=..., data=...) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/effects/blur/blur.cpp:476 #12 0x00007f9530fca621 in KWin::EffectsHandlerImpl::drawWindow (this=0x209f5e0, w=w@entry=0x23379e0, mask=mask@entry=10, region=..., data=...) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/effects.cpp:417 #13 0x00007f9530f96ed1 in KWin::Scene::finalPaintWindow (this=<optimized out>, w=w@entry=0x23379e0, mask=mask@entry=10, region=..., data=...) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/scene.cpp:601 #14 0x00007f9530fca4ca in KWin::EffectsHandlerImpl::paintWindow (this=0x209f5e0, w=w@entry=0x23379e0, mask=mask@entry=10, region=..., data=...) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/effects.cpp:383 #15 0x00007f952eb2e6a1 in KWin::Effect::paintWindow (this=this@entry=0x230f550, w=w@entry=0x23379e0, mask=mask@entry=10, region=..., data=...) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/libkwineffects/kwineffects.cpp:589 #16 0x00007f9530fca471 in KWin::EffectsHandlerImpl::paintWindow (this=0x209f5e0, w=w@entry=0x23379e0, mask=mask@entry=10, region=..., data=...) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/effects.cpp:380 #17 0x00007f952eb2e6a1 in KWin::Effect::paintWindow (this=this@entry=0x20ad060, w=w@entry=0x23379e0, mask=mask@entry=10, region=..., data=...) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/libkwineffects/kwineffects.cpp:589 #18 0x00007f9530fca471 in KWin::EffectsHandlerImpl::paintWindow (this=0x209f5e0, w=0x23379e0, mask=mask@entry=10, region=..., data=...) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/effects.cpp:380 #19 0x00007f9530f9d50b in KWin::Scene::paintWindow (this=this@entry=0x205af80, w=0x222d0e0, mask=10, region=..., quads=...) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/scene.cpp:473 #20 0x00007f9530f9a278 in KWin::Scene::paintSimpleScreen (this=this@entry=0x205af80, orig_mask=orig_mask@entry=8, region=...) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/scene.cpp:376 #21 0x00007f9530faf053 in KWin::SceneOpenGL2::paintSimpleScreen (this=this@entry=0x205af80, mask=mask@entry=8, region=...) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/scene_opengl.cpp:1083 #22 0x00007f9530f9c8c5 in KWin::Scene::finalPaintScreen (this=0x205af80, mask=mask@entry=8, region=..., data=...) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/scene.cpp:201 #23 0x00007f9530fca24f in KWin::EffectsHandlerImpl::paintScreen (this=0x209f5e0, mask=mask@entry=8, region=..., data=...) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/effects.cpp:340 #24 0x00007f952eb2e5cf in KWin::Effect::paintScreen (this=this@entry=0x230f550, mask=mask@entry=8, region=..., data=...) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/libkwineffects/kwineffects.cpp:574 #25 0x00007f9530fca1fd in KWin::EffectsHandlerImpl::paintScreen (this=0x209f5e0, mask=mask@entry=8, region=..., data=...) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/effects.cpp:337 #26 0x00007f952eb2e5cf in KWin::Effect::paintScreen (this=this@entry=0x20ad060, mask=mask@entry=8, region=..., data=...) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/libkwineffects/kwineffects.cpp:574 #27 0x00007f9530fca1fd in KWin::EffectsHandlerImpl::paintScreen (this=0x209f5e0, mask=8, region=..., data=...) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/effects.cpp:337 #28 0x00007f9530f9c559 in KWin::Scene::paintScreen (this=this@entry=0x205af80, mask=mask@entry=0x7ffc7f3f5650, damage=..., repaint=..., updateRegion=updateRegion@entry=0x7ffc7f3f5620, validRegion=validRegion@entry=0x7ffc7f3f5630, projection=...) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/scene.cpp:151 #29 0x00007f9530fb5809 in KWin::SceneOpenGL::paint (this=0x205af80, damage=..., toplevels=...) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/scene_opengl.cpp:731 #30 0x00007f9530f8ef3a in KWin::Compositor::performCompositing (this=0x1e12dd0) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/composite.cpp:742 #31 0x00007f952f320f4b in QObject::event (this=0x1e12dd0, e=<optimized out>) at kernel/qobject.cpp:1285 #32 0x00007f952fb4348c in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x1e12dd0, e=0x7ffc7f3f5aa0) at kernel/qapplication.cpp:3799 #33 0x00007f952fb4a970 in QApplication::notify (this=0x7ffc7f3f5d40, receiver=0x1e12dd0, e=0x7ffc7f3f5aa0) at kernel/qapplication.cpp:3556 #34 0x00007f952f2f9ae0 in QCoreApplication::notifyInternal2 (receiver=0x1e12dd0, event=event@entry=0x7ffc7f3f5aa0) at kernel/qcoreapplication.cpp:988 #35 0x00007f952f3445be in QCoreApplication::sendEvent (event=0x7ffc7f3f5aa0, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231 #36 QTimerInfoList::activateTimers (this=this@entry=0x1de64c0) at kernel/qtimerinfo_unix.cpp:644 #37 0x00007f952f34148c in QEventDispatcherUNIXPrivate::activateTimers (this=this@entry=0x1de6420) at kernel/qeventdispatcher_unix.cpp:249 #38 0x00007f952f342760 in QEventDispatcherUNIX::processEvents (this=<optimized out>, flags=..., flags@entry=...) at kernel/qeventdispatcher_unix.cpp:509 #39 0x00007f951b96047d in QUnixEventDispatcherQPA::processEvents (this=<optimized out>, flags=...) at eventdispatchers/qunixeventdispatcher.cpp:68 #40 0x00007f952f2f87ba in QEventLoop::exec (this=this@entry=0x7ffc7f3f5c30, flags=..., flags@entry=...) at kernel/qeventloop.cpp:210 #41 0x00007f952f3002ec in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1261 #42 0x00007f952f62e98c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1639 #43 0x00007f952fb433e5 in QApplication::exec () at kernel/qapplication.cpp:2975 #44 0x00007f95318d51fb in kdemain (argc=1, argv=0x7ffc7f3f5ec8) at /var/tmp/portage/kde-plasma/kwin-5.8.3/work/kwin-5.8.3/main_x11.cpp:466 #45 0x00007f9531336790 in __libc_start_main () from /lib64/libc.so.6 #46 0x00000000004007b9 in _start () Possible duplicates by query: bug 356620. Reported using DrKonqi
which mesa version are you using?
Hi Martin, great to see my report has your attention ;-) My mesa version is 13.0.0. Please tell me when you need further information TIA -Marc
> My mesa version is 13.0.0. Please tell me when you need further information That's what I feared :-( Mesa 13 has a change that when a graphics reset happens some methods will return a nullptr. And I think you run into that problem here. To fix will be difficult as it can be many calls affected, so it will be a little bit like whack-a-mole. Important question: are you able to trigger the problem at will? If yes that could end up super helpful as I could provide patches which should address it.
*** Bug 373248 has been marked as a duplicate of this bug. ***
Created attachment 113741 [details] New crash information added by DrKonqi kwin_x11 (5.13.2) using Qt 5.11.0 - What I was doing when the application crashed: Switching back from tty1 to tty7 I am running KDE Neon on a Lenovo ThinkPad T470 laptop with NVIDIA GeForce 940MX hybrid graphics, with two external displays connected through a dock. This issue just started happening after upgrading xorg to the HWE version so that I could stop screen tearing. When I was running xorg 1.18 I didn't have any issues regardless of if the NVIDIA GPU was enabled or not. I'm also running the latest nvidia-390 display drivers. -- Backtrace (Reduced): #6 KWin::ContrastEffect::uploadRegion (this=this@entry=0x19c8550, map=@0x7ffdc02346a8: 0x7f2be05c56f0, region=...) at /workspace/build/effects/backgroundcontrast/contrast.cpp:281 #7 0x00007f2c02c009a4 in KWin::ContrastEffect::uploadGeometry (this=this@entry=0x19c8550, vbo=vbo@entry=0x191a200, region=...) at /workspace/build/effects/backgroundcontrast/contrast.cpp:299 #8 0x00007f2c02c01ea4 in KWin::ContrastEffect::doContrast (this=this@entry=0x19c8550, w=w@entry=0x226a940, shape=..., screen=..., opacity=1, screenProjection=...) at /workspace/build/effects/backgroundcontrast/contrast.cpp:442 #9 0x00007f2c02c02929 in KWin::ContrastEffect::drawWindow (this=this@entry=0x19c8550, w=w@entry=0x226a940, mask=mask@entry=2, region=..., data=...) at /workspace/build/effects/backgroundcontrast/contrast.cpp:419 #10 0x00007f2c05e9a16e in KWin::EffectsHandlerImpl::drawWindow (this=0x19c2e90, w=w@entry=0x226a940, mask=mask@entry=2, region=..., data=...) at /workspace/build/effects.cpp:456
*** Bug 396227 has been marked as a duplicate of this bug. ***
From the comment above: Other report was on resume from suspend, which means it's probably fallout from that nvidia graphics reset and us not resetting the vertex. I'll look into it.
I just want to add that I am seeing this crash as well, after resume w/ NVidia 390.77 driver, and it seems vbo.d->persistent is true, but vbo.d->map is not pointing to accessible memory (although set).
Created attachment 115311 [details] New crash information added by DrKonqi kwin_x11 (5.14.80) using Qt 5.11.2 - What I was doing when the application crashed: Resuming out os suspend mode. Using NVIDIA's 390.86 on opensuse tumbleweed. -- Backtrace (Reduced): #6 0x00007f4ab29efb11 in KWin::ContrastEffect::uploadRegion (this=this@entry=0x5575e168cde0, map=@0x7fffa3865868: 0x7f4a991f4f50, region=...) at /usr/include/qt5/QtCore/qrect.h:269 #7 0x00007f4ab29efbd4 in KWin::ContrastEffect::uploadGeometry (this=this@entry=0x5575e168cde0, vbo=vbo@entry=0x5575e15a3dd0, region=...) at /usr/src/debug/kwin5-5.14.80git.20180928T202124~72ad5dc89-6.1.x86_64/effects/backgroundcontrast/contrast.cpp:299 #8 0x00007f4ab29f1135 in KWin::ContrastEffect::doContrast (this=this@entry=0x5575e168cde0, w=w@entry=0x5575e1b736d0, shape=..., screen=..., opacity=1, screenProjection=...) at /usr/src/debug/kwin5-5.14.80git.20180928T202124~72ad5dc89-6.1.x86_64/effects/backgroundcontrast/contrast.cpp:442 #9 0x00007f4ab29f1b13 in KWin::ContrastEffect::drawWindow (this=this@entry=0x5575e168cde0, w=w@entry=0x5575e1b736d0, mask=mask@entry=2, region=..., data=...) at /usr/src/debug/kwin5-5.14.80git.20180928T202124~72ad5dc89-6.1.x86_64/effects/backgroundcontrast/contrast.cpp:419 #10 0x00007f4ab3f09f13 in KWin::EffectsHandlerImpl::drawWindow (this=this@entry=0x5575e1728b10, w=w@entry=0x5575e1b736d0, mask=mask@entry=2, region=..., data=...) at /usr/src/debug/kwin5-5.14.80git.20180928T202124~72ad5dc89-6.1.x86_64/effects.cpp:456
*** Bug 399800 has been marked as a duplicate of this bug. ***
*** Bug 399876 has been marked as a duplicate of this bug. ***
*** Bug 402976 has been marked as a duplicate of this bug. ***
Created attachment 117511 [details] New crash information added by DrKonqi kwin_x11 (5.14.5) using Qt 5.11.2 - What I was doing when the application crashed: Just open my laptop after suspen. This happens to me only when second monitor connected to my laptop -- Backtrace (Reduced): #6 KWin::ContrastEffect::uploadRegion (this=this@entry=0x564330207890, map=@0x7ffdb34cd698: 0x7f2954425790, region=...) at ./effects/backgroundcontrast/contrast.cpp:281 #7 0x00007f2975638404 in KWin::ContrastEffect::uploadGeometry (this=this@entry=0x564330207890, vbo=vbo@entry=0x5643303b5230, region=...) at ./effects/backgroundcontrast/contrast.cpp:299 #8 0x00007f2975639965 in KWin::ContrastEffect::doContrast (this=this@entry=0x564330207890, w=w@entry=0x564330563d50, shape=..., screen=..., opacity=0, screenProjection=...) at ./effects/backgroundcontrast/contrast.cpp:442 #9 0x00007f297563a35b in KWin::ContrastEffect::drawWindow (this=this@entry=0x564330207890, w=w@entry=0x564330563d50, mask=mask@entry=2, region=..., data=...) at ./effects/backgroundcontrast/contrast.cpp:419 #10 0x00007f29788ab11e in KWin::EffectsHandlerImpl::drawWindow (this=this@entry=0x5643303fd890, w=w@entry=0x564330563d50, mask=mask@entry=2, region=..., data=...) at ./effects.cpp:456
*** Bug 403863 has been marked as a duplicate of this bug. ***
*** Bug 396264 has been marked as a duplicate of this bug. ***
*** Bug 405248 has been marked as a duplicate of this bug. ***
*** Bug 409733 has been marked as a duplicate of this bug. ***
*** Bug 409900 has been marked as a duplicate of this bug. ***
*** Bug 411409 has been marked as a duplicate of this bug. ***
*** Bug 411625 has been marked as a duplicate of this bug. ***
*** Bug 411824 has been marked as a duplicate of this bug. ***
*** Bug 412911 has been marked as a duplicate of this bug. ***
*** Bug 412883 has been marked as a duplicate of this bug. ***
*** Bug 414199 has been marked as a duplicate of this bug. ***
*** Bug 414461 has been marked as a duplicate of this bug. ***
*** Bug 415775 has been marked as a duplicate of this bug. ***
Git commit 212d87a32ef15b9baf6102060639c06fa580e965 by David Edmundson. Committed on 10/01/2020 at 14:24. Pushed by davidedmundson into branch 'master'. [scenes/opengl] Remove outdated hack to reset vertex buffers Summary: Scene opengl has a callback for when we have a GL error. One of the handlers for an error calls scheduleVboReInit the history shows it was a forerunner to the GLX_NV_robustness_video_memory_purge but resetting only one tiny part based on debug output. When we get here we schedule a reset of the vertex buffer, via a timer. When the timer is caled we have no idea what GL context was last current, if it's not the currect context then the main scene GLVertexBuffer will be deleted but not correctly re-initialised. We have two very common crashes with a corrupted GLVertexBuffer::streamingBuffer() which would match up perfectly. Given that we now have a proper mechanism to reset the entire scene, we don't need this timer based hack and resolve that problem. Related: bug 399499 Reviewers: #kwin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D26556 M +0 -31 plugins/scenes/opengl/scene_opengl.cpp https://commits.kde.org/kwin/212d87a32ef15b9baf6102060639c06fa580e965
Note, I could not reproduce this crash and this fix is based on a strong theory. If we get a duplicate with Plasma 5.18beta or newer, please reopen.
*** Bug 416472 has been marked as a duplicate of this bug. ***
*** Bug 417109 has been marked as a duplicate of this bug. ***
*** Bug 416498 has been marked as a duplicate of this bug. ***
The crash still happens in KDE Plasma 5.18 beta.
Good news everyone! I've been experiencing similar crashes, and after finding an easy way to reproduce, I've been able to dissect it further. My crash is this: #4 0xb7eeebb8 in <signal handler called> () #5 0xb5878691 in KWin::WindowQuadList::makeInterleavedArrays(unsigned int, KWin::GLVertex2D*, QMatrix4x4 const&) const (this=0xbfe81d84, type=7, vertices=0xa94b9b60, textureMatrix=...) at ./libkwineffects/kwineffects.cpp:1171 #6 0xad9b362d in KWin::SceneOpenGL2Window::performPaint(int, QRegion, KWin::WindowPaintData) (this=0xbfe81fc4, mask=-1075306552, region=..., data=...) at ./plugins/scenes/opengl/scene_opengl.cpp:1431 also caused by vbo mapping pointing to inaccessible memory. I reproduced it by putting kwin under stress with this (don't laugh): ( for((;;)); do qdbus org.kde.kopete /kopete/MainWindow_1 org.qtproject.Qt.QWidget.minimumHeight 100; qdbus org.kde.kopete /kopete/MainWindow_1 org.qtproject.Qt.QWidget.maximumHeight 100; qdbus org.kde.kopete /kopete/MainWindow_1 org.qtproject.Qt.QWidget.maximumHeight 16000000; for i in $(seq 1 10); do qdbus org.kde.kopete /kopete/MainWindow_1 org.qtproject.Qt.QWidget.minimumHeight $((i*100)); done; done ) & and then provoke the crash by cycling the computer through suspend-to-ram: for i in $(seq 1 60); do rtcwake -m mem -s 30; sleep 20; done In my experience, kwin crashes within the first 10 iterations if vulnerable to this particular bug. With this, I found that: 1) KWIN_PERSISTENT_VBO=0 avoids the crash 2) reinitializing GLVertexBuffer::streamingBuffer while handling graphics reset also avoids the crash. I hope with this a way to fix this bug can be found.
Created attachment 126458 [details] A crude patch which reinitializes the VBO
That's very interesting! Thank you so much. In theory the VBO should be reset inside resetCompositing, but the fact that it comes after a queued event could be problematic. Maybe another paint() is scheduled whilst we're in that silly usleep which means we end up painting before we've actually performed the reset?
Could you test https://phabricator.kde.org/P548 as an alternate fix
(In reply to David Edmundson from comment #36) > Could you test https://phabricator.kde.org/P548 as an alternate fix Yes. Still crashes, unfortunately.
*** Bug 417779 has been marked as a duplicate of this bug. ***
Please have a look at https://phabricator.kde.org/D27924.
*** Bug 417120 has been marked as a duplicate of this bug. ***
*** Bug 418978 has been marked as a duplicate of this bug. ***
*** Bug 418068 has been marked as a duplicate of this bug. ***
*** Bug 420372 has been marked as a duplicate of this bug. ***
Created attachment 129418 [details] New crash information added by DrKonqi kwin_x11 (5.18.5) using Qt 5.14.2 - What I was doing when the application crashed: resume from suspend this is the first time this happened, been runing Fedora32 for just over a week Last night I finished installing v4l2loopback to use my DSLR as a webcam before suspending for the night Using NVDIA drivers - I noticed this in other bug reports, not sure if it's relevant -- Backtrace (Reduced): #4 0x00007f3d65638b81 in KWin::ContrastEffect::uploadRegion(QVector2D*&, QRegion const&) () from /lib64/libkwin4_effect_builtins.so.1 #5 0x00007f3d65638c49 in KWin::ContrastEffect::uploadGeometry(KWin::GLVertexBuffer*, QRegion const&) () from /lib64/libkwin4_effect_builtins.so.1 #6 0x00007f3d6563a8fa in KWin::ContrastEffect::doContrast(KWin::EffectWindow*, QRegion const&, QRect const&, float, QMatrix4x4 const&) () from /lib64/libkwin4_effect_builtins.so.1 #7 0x00007f3d6563b1c1 in KWin::ContrastEffect::drawWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) () from /lib64/libkwin4_effect_builtins.so.1 #8 0x00007f3d66d6fbbf in KWin::EffectsHandlerImpl::drawWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) () from /lib64/libkwin.so.5
Created attachment 133825 [details] New crash information added by DrKonqi kwin_x11 (5.20.3) using Qt 5.15.2 - What I was doing when the application crashed: Switched back from tty1 to tty7. 1. Coming back from suspend-to-ram 2. init 3 && killall kwin_x11 (needed to do both because KWin was still running) 3. init 5 and started Plasma session normally 4. Switched back to TTY1 (Ctrl+Alt+F1) and then back to TTY7 5. KWin crashed - NVIDIA driver 455.38 - Qt 5.15.2 - KWin 5.20.3 -- Backtrace (Reduced): #4 0x00007f6432729e3e in KWin::ContrastEffect::uploadRegion(QVector2D*&, QRegion const&) (this=<optimized out>, region=..., map=<synthetic pointer>: <optimized out>) at /usr/src/debug/kwin5-5.20.3-1.2.x86_64/effects/backgroundcontrast/contrast.cpp:301 #5 KWin::ContrastEffect::uploadGeometry(KWin::GLVertexBuffer*, QRegion const&) (this=0x560beaab7c80, region=..., vbo=0x560beab3d240) at /usr/src/debug/kwin5-5.20.3-1.2.x86_64/effects/backgroundcontrast/contrast.cpp:328 #6 KWin::ContrastEffect::doContrast(KWin::EffectWindow*, QRegion const&, QRect const&, float, QMatrix4x4 const&) (screenProjection=..., opacity=1, screen=..., shape=..., w=0x560bead9d740, this=0x560beaab7c80) at /usr/src/debug/kwin5-5.20.3-1.2.x86_64/effects/backgroundcontrast/contrast.cpp:471 #7 KWin::ContrastEffect::drawWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) (this=0x560beaab7c80, w=<optimized out>, mask=2, region=..., data=...) at /usr/src/debug/kwin5-5.20.3-1.2.x86_64/effects/backgroundcontrast/contrast.cpp:447 #8 0x00007f6434280211 in KWin::EffectsHandlerImpl::drawWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) (this=0x560beab27060, w=<optimized out>, mask=<optimized out>, region=..., data=...) at /usr/src/debug/kwin5-5.20.3-1.2.x86_64/effects.cpp:463
*** Bug 423295 has been marked as a duplicate of this bug. ***
*** Bug 430699 has been marked as a duplicate of this bug. ***
Tons of dupes, raising priority.
*** Bug 431783 has been marked as a duplicate of this bug. ***
*** Bug 419177 has been marked as a duplicate of this bug. ***
*** Bug 462017 has been marked as a duplicate of this bug. ***
*** Bug 429365 has been marked as a duplicate of this bug. ***
*** Bug 435763 has been marked as a duplicate of this bug. ***
*** Bug 463039 has been marked as a duplicate of this bug. ***
Raising priority due to number of duplicates.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3415
Git commit ddd60a0c1b6a6bbf7a1ba7e34cdc63582048b862 by Vlad Zahorodnii, on behalf of Aleix Pol. Committed on 11/01/2023 at 14:37. Pushed by vladz into branch 'master'. backgroundcontrast: Guard against calling a nullptr There are cases where GLVertexBuffer::map will return null (as seen in kwinglutils.cpp:1816) which does happen (as seen in the backtrace of bug 462017) Make sure we don't call the null map in that case. M +10 -3 src/effects/backgroundcontrast/contrast.cpp M +1 -1 src/effects/backgroundcontrast/contrast.h M +10 -4 src/effects/blur/blur.cpp M +1 -1 src/effects/blur/blur.h https://invent.kde.org/plasma/kwin/commit/ddd60a0c1b6a6bbf7a1ba7e34cdc63582048b862
(In reply to Vlad Zahorodnii from comment #57) > Git commit ddd60a0c1b6a6bbf7a1ba7e34cdc63582048b862 by Vlad Zahorodnii, on > behalf of Aleix Pol. > Committed on 11/01/2023 at 14:37. > Pushed by vladz into branch 'master'. > > backgroundcontrast: Guard against calling a nullptr > > There are cases where GLVertexBuffer::map will return null (as seen in > kwinglutils.cpp:1816) which does happen (as seen in the backtrace of bug > 462017) > Make sure we don't call the null map in that case. > https://invent.kde.org/plasma/kwin/commit/ddd60a0c1b6a6bbf7a1ba7e34cdc63582048b862 Are you sure this fixes the problem? In many of the backtraces, you can see that the map pointer isn't actually zero, although some of the backtraces seem different and I suspect they might indicate a different problem. Did you try to reproduce it and confirm it is fixed, by the procedure in my other comment? I used to have this problem, but since then I've changed my computer. I still have the graphics card in question around so maybe I could try to see what it does, but I can't promise anything. Without a clear idea of what's wrong and how to fix it, I don't think this can move forward. It seems like some peculiarity of NVidia drivers, but then again, other gl apps don't crash on Nvidia, or do they?