Bug 427062

Summary: assert in context recreate
Product: [Plasma] kwin Reporter: David Edmundson <kde>
Component: glxAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: bernie
Priority: NOR    
Version: 5.20.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description David Edmundson 2020-09-28 08:36:38 UTC
#0  0x00007ffff2d11615 in raise () at /usr/lib/libc.so.6
#1  0x00007ffff2cfa862 in abort () at /usr/lib/libc.so.6
#2  0x00007ffff323a061 in  () at /usr/lib/libepoxy.so.0
#3  0x00007ffff329de25 in  () at /usr/lib/libepoxy.so.0
#4  0x00007fffe7e0e9e8 in KWin::GlxBackend::initRenderingContext()
    (this=0x555555a635b0)
    at /home/david/projects/kde5/src/kde/workspace/kwin/plugins/platforms/x11/standalone/glxbackend.cpp:331
#5  0x00007fffe7e0d337 in KWin::GlxBackend::init() (this=0x555555a635b0)
    at /home/david/projects/kde5/src/kde/workspace/kwin/plugins/platforms/x11/standalone/glxbackend.cpp:192
#6  0x00007fff56b60c8e in KWin::SceneOpenGL::createScene(QObject*)
    (parent=0x55555567e800)
    at /home/david/projects/kde5/src/kde/workspace/kwin/plugins/scenes/opengl/scene_opengl.cpp:451
#7  0x00007fff56b70153 in KWin::OpenGLFactory::create(QObject*) const
    (this=0x5555556d9a90, parent=0x55555567e800)
    at /home/david/projects/kde5/src/kde/workspace/kwin/plugins/scenes/opengl/scene_opengl.cpp:2749
#8  0x00007ffff7b511e8 in KWin::Compositor::setupStart() (this=0x55555567e800)
    at /home/david/projects/kde5/src/kde/workspace/kwin/composite.cpp:246
#9  0x00007ffff7b54292 in KWin::X11Compositor::start() (this=0x55555567e800)
    at /home/david/projects/kde5/src/kde/workspace/kwin/composite.cpp:958
#10 0x00007ffff7b53bea in KWin::X11Compositor::resume(KWin::X11Compositor::SuspendReason) (this=0x55555567e800, reason=KWin::X11Compositor::AllReasonSuspend)
    at /home/david/projects/kde5/src/kde/workspace/kwin/composite.cpp:936
#11 0x00007ffff7b53b5d in KWin::X11Compositor::toggleCompositing()
    (this=0x55555567e800)
    at /home/david/projects/kde5/src/kde/workspace/kwin/composite.cpp:888
#12 0x00007ffff7b5a701 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KWin::Compositor::*)()>::call(void (KWin::Compositor::*)(), KWin::Compositor*, void**)
    (f=&virtual table offset 96, o=0x55555567e800, arg=0x7fffffffd380)
    at /opt/qt5/include/QtCore/qobjectdefs_impl.h:152
#13 0x00007ffff7b5a668 in QtPrivate::FunctionPointer<void (KWin::Compositor::*)()>::call<QtPrivate::List<>, void>(void (KWin::Compositor::*)(), KWin::Compositor*, void**) (f=&virtual table offset 96, o=0x55555567e800, arg=0x7fffffffd380)
    at /opt/qt5/include/QtCore/qobjectdefs_impl.h:185
#14 0x00007ffff7b5a595 in QtPrivate::QSlotObject<void (KWin::Compositor::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
    (which=1, this_=0x555555810bc0, r=0x55555567e800, a=0x7fffffffd380, ret=0x0) at /opt/qt5/include/QtCore/qobjectdefs_impl.h:418
#15 0x00007ffff368bf39 in QtPrivate::QSlotObjectBase::call(QObject*, void**)
    (this=0x555555810bc0, r=0x55555567e800, a=0x7fffffffd380)
    at ../../include/QtCore/../../../../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:398
#16 0x00007ffff36cf1e2 in doActivate<false>(QObject*, int, void**)
    (sender=0x5555558235f0, signal_index=4, argv=0x7fffffffd380)
    at /home/david/projects/qt5/qtbase/src/corelib/kernel/qobject.cpp:3886
#17 0x00007ffff36c8743 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**)
    (sender=0x5555558235f0, m=0x7ffff4c7d400 <QAction::staticMetaObject>, local_signal_index=1, argv=0x7fffffffd380)
    at /home/david/projects/qt5/qtbase/src/corelib/kernel/qobject.cpp:3946
#18 0x00007ffff44f1a19 in QAction::triggered(bool)
    (this=0x5555558235f0, _t1=false) at .moc/moc_qaction.cpp:376
#19 0x00007ffff44f0966 in QAction::activate(QAction::ActionEvent)
    (this=0x5555558235f0, event=QAction::Trigger)
    at /home/david/projects/qt5/qtbase/src/widgets/kernel/qaction.cpp:1161
#20 0x00007ffff5ef1587 in QAction::trigger() (this=0x5555558235f0)
    at /opt/qt5/include/QtWidgets/qaction.h:187
#21 0x00007ffff5eed0b6 in KGlobalAccelPrivate::_k_invokeAction(QString const&, QString const&, long long)
    (this=0x5555557c4e50, componentUnique=..., actionUnique=..., timestamp=53120310)
    at /home/david/projects/kde5/src/frameworks/kglobalaccel/src/kglobalaccel.cpp:456
#22 0x00007ffff5eee8bc in KGlobalAccel::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)
    (_o=0x7ffff5f15728 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder>, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x7fffffffd6b0)
    at src/KF5GlobalAccel_autogen/include/moc_kglobalaccel.cpp:94
#23 0x00007ffff36cf290 in doActivate<false>(QObject*, int, void**)
    (sender=0x55555580e940, signal_index=3, argv=0x7fffffffd6b0)
    at /home/david/projects/qt5/qtbase/src/corelib/kernel/qobject.cpp:3898
#24 0x00007ffff36c8743 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**)
    (sender=0x55555580e940, m=0x7ffff5f14cb8 <OrgKdeKglobalaccelComponentInterface::staticMetaObject>, local_signal_index=0, argv=0x7fffffffd6b0)
    at /home/david/projects/qt5/qtbase/src/corelib/kernel/qobject.cpp:3946
#25 0x00007ffff5f03735 in OrgKdeKglobalaccelComponentInterface::globalShortcutPressed(QString const&, QString const&, long long)
    (this=0x55555580e940, _t1=..., _t2=..., _t3=53120310)
    at src/kglobalaccel_component_interface.moc:227
#26 0x00007ffff5f032e0 in OrgKdeKglobalaccelComponentInterface::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)
    (_o=0x55555580e940, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffffffd8e0) at src/kglobalaccel_component_interface.moc:121
#27 0x00007ffff5f038cd in OrgKdeKglobalaccelComponentInterface::qt_metacall(QMetaObject::Call, int, void**)
    (this=0x55555580e940, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffffffd8e0) at src/kglobalaccel_component_interface.moc:196
#28 0x00007ffff4e5bece in QDBusConnectionPrivate::deliverCall(QObject*, int, QDBusMessage const&, QVector<int> const&, int)
    (this=0x7fffe0000d20, object=0x55555580e940, msg=..., metaTypes=..., slotIdx=6) at /home/david/projects/qt5/qtbase/src/dbus/qdbusintegrator.cpp:1001
#29 0x00007ffff4e67306 in QDBusCallDeliveryEvent::placeMetaCall(QObject*)
    (this=0x7fffe00121a0, object=0x55555580e940)
    at /home/david/projects/qt5/qtbase/src/dbus/qdbusintegrator_p.h:114
#30 0x00007ffff36c16c3 in QObject::event(QEvent*)
    (this=0x55555580e940, e=0x7fffe00121a0)
    at /home/david/projects/qt5/qtbase/src/corelib/kernel/qobject.cpp:1314
#31 0x00007ffff4502d2b in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    (this=0x55555559d980, receiver=0x55555580e940, e=0x7fffe00121a0)
    at /home/david/projects/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3630
#32 0x00007ffff4500069 in QApplication::notify(QObject*, QEvent*)
    (this=0x7fffffffe3b0, receiver=0x55555580e940, e=0x7fffe00121a0)
    at /home/david/projects/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2970
#33 0x000055555555dc4d in KWin::ApplicationX11::notify(QObject*, QEvent*)
    (this=0x7fffffffe3b0, o=0x55555580e940, e=0x7fffe00121a0)
    at /home/david/projects/kde5/src/kde/workspace/kwin/main_x11.cpp:278
#34 0x00007ffff3679cbf in QCoreApplication::notifyInternal2(QObject*, QEvent*)
    (receiver=0x55555580e940, event=0x7fffe00121a0)
    at /home/david/projects/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1063
#35 0x00007ffff367a716 in QCoreApplication::sendEvent(QObject*, QEvent*)
    (receiver=0x55555580e940, event=0x7fffe00121a0)
    at /home/david/projects/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1458
#36 0x00007ffff367b47d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x555555575520)
    at /home/david/projects/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1817
#37 0x00007ffff370c68e in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x55555563e830, flags=...)
    at /home/david/projects/qt5/qtbase/src/corelib/kernel/qeventdispatcher_unix.cpp:468
#38 0x00007fffeeeb7a6a in QXcbUnixEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x55555563e830, flags=...)
    at /home/david/projects/qt5/qtbase/src/plugins/platforms/xcb/qxcbeventdispatcher.cpp:60
#39 0x00007ffff3676381 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7fffffffe140, flags=...)
    at /home/david/projects/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:139
#40 0x00007ffff36766e3 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7fffffffe140, flags=...)
    at /home/david/projects/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:232
#41 0x00007ffff367a558 in QCoreApplication::exec() ()
    at /home/david/projects/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1371
#42 0x00007ffff3bc7ffc in QGuiApplication::exec() ()
    at /home/david/projects/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:1867
#43 0x00007ffff44ffa35 in QApplication::exec() ()
    at /home/david/projects/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2822
#44 0x000055555555ed2b in main(int, char**) (argc=1, argv=0x7fffffffe528)


From the trace apparently I hit the toggle compositing global shortcut.
This is with Nvidia 450 which is somewhat broken ATM (see https://bugs.kde.org/show_bug.cgi?id=424592#c11), but it does work sometimes.
Comment 1 Bernie Innocenti 2020-11-22 08:15:42 UTC
I just got this today in kwin_x11 5.20.3

The stacktrace is different, but it also hits an assertion in libepoxy.so.0. Unfortunately, I don't have kwin_x11's stderr to confirm it's the same bug, but I have a coredump and I could attach gdb:

#0  0x00007fe3fe91ef75 in raise () at /usr/lib/libpthread.so.0
#1  0x00007fe3ff3099da in KCrash::defaultCrashHandler(int) (sig=6) at /home/bernie/kde/src/kcrash/src/kcrash.cpp:449
#2  0x00007fe3fccf26a0 in <signal handler called> () at /usr/lib/libc.so.6
#3  0x00007fe3fccf2615 in raise () at /usr/lib/libc.so.6
#4  0x00007fe3fccdb862 in abort () at /usr/lib/libc.so.6
#5  0x00007fe3fccdb747 in _nl_load_domain.cold () at /usr/lib/libc.so.6
#6  0x00007fe3fcceabf6 in  () at /usr/lib/libc.so.6
#7  0x00007fe3fd27dea8 in  () at /usr/lib/libepoxy.so.0
#8  0x00007fe3fd22faba in  () at /usr/lib/libepoxy.so.0
#9  0x00007fe3fe879d5d in KWin::GLVertexBufferPrivate::awaitFence(long) (this=0x55e70114d3e0, end=87760) at /home/bernie/kde/src/kwin/libkwineffects/kwinglutils.cpp:1905
#10 0x00007fe3fe87a00c in KWin::GLVertexBufferPrivate::getIdleRange(unsigned long) (this=0x55e70114d3e0, size=512)
    at /home/bernie/kde/src/kwin/libkwineffects/kwinglutils.cpp:1943
#11 0x00007fe3fe87a3e7 in KWin::GLVertexBuffer::map(unsigned long) (this=0x55e701151700, size=512) at /home/bernie/kde/src/kwin/libkwineffects/kwinglutils.cpp:2028
#12 0x00007fe3f17ea2ed in KWin::OpenGLWindow::performPaint(int, QRegion const&, KWin::WindowPaintData const&) (this=0x55e701680a00, mask=9, region=@0x7ffe331cfe50: {
  d = 0x55e701fb67b0,
  static shared_empty = {
    ref = {
      atomic = {
        _q_value = {
          <std::__atomic_base<int>> = {
            static _S_alignment = 4,
            _M_i = -1
          }, 
          members of std::atomic<int>:
          static is_always_lock_free = true
        }
      }
    },
    qt_rgn = 0x7fe3fdf3bea0
  }
}, _data=@0x7ffe331cff70: {
  <KWin::PaintData> = {
    _vptr.PaintData = 0x7fe40077d8d0 <vtable for KWin::WindowPaintData+16>,
    d = 0x55e701e11490
  }, 
  members of KWin::WindowPaintData:
  quads = {
    <QVector<KWin::WindowQuad>> = {
      d = 0x55e701717630
    }, <No data fields>},
  shader = 0x0,
  d = 0x55e701f994d0
Comment 2 Bernie Innocenti 2020-11-22 08:18:43 UTC
Perhaps relevant: I'm running with KWIN_OPENGL_INTERFACE=egl
This is the amdgpu driver.
Comment 3 David Edmundson 2021-01-13 12:26:35 UTC

*** This bug has been marked as a duplicate of bug 426435 ***