Bug 414805

Summary: On X11, crash in QScreen::handle() after QXcbIntegration::createPlatformOpenGLContext()
Product: [Plasma] kwin Reporter: Edward Oubrayrie <edoubrayrie>
Component: generic-crashAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: crash CC: agentti002x, alex_scott, artx69, asvhen, bertil.bonus, bnafta, charlyghislain, coldresplendence, contact, cristof.mars, cunio, daniele.bellavista, derplip, dev.dorrejo, dovencio.doshorte, dura, fargeol+kde, fcvejic, fuyuyuyuyuyuyuyuyu, jackmcslay, johannes.derrer, jpflorijn, kde, kolja_20000, krose, labsboom, matizalejo, mike+kde, milanota90, milosz.lenczewski, nate, nickquednow, null, othello71, pepko94, pk.lehre, postix, reid, rez.open, sam, sfranky, szotsaki, techxgames, w, willypaz243, wolfit
Priority: NOR Keywords: drkonqi
Version: 5.17.3   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=421700
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi

Description Edward Oubrayrie 2019-12-03 20:06:29 UTC
Application: kwin_x11 (5.17.3)

Qt Version: 5.13.2
Frameworks Version: 5.64.0
Operating System: Linux 4.15.0-70-generic x86_64
Distribution: KDE neon User Edition 5.17

-- Information about the crash:
- What I was doing when the application crashed:
Clicking around taskbar (including the active window "icon" and the applets icons)

- Unusual behavior I noticed:
Panel was "recreated" a few times before crashing

- Custom settings of the application:
dark theme

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

Thread 6 (Thread 0x7f20b75ef700 (LWP 29045)):
#0  0x00007f20d6871f79 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#1  0x00007f20d689c230 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007f20d683f06a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007f20d665a3aa in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f20d665bb52 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f20d22ac6db in start_thread (arg=0x7f20b75ef700) at pthread_create.c:463
#6  0x00007f20d936988f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 5 (Thread 0x7f20a21f7700 (LWP 9794)):
[KCrash Handler]
#6  0x00007f20d6e3b3a4 in QScreen::handle() const () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#7  0x00007f20c1353b48 in QXcbIntegration::createPlatformOpenGLContext(QOpenGLContext*) const () at /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#8  0x00007f20d6e5676f in QOpenGLContext::create() () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#9  0x00007f20d14385ad in  () at /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#10 0x00007f20d1439a24 in  () at /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#11 0x00007f20d143d2b8 in  () at /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#12 0x00007f20d665bb52 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007f20d22ac6db in start_thread (arg=0x7f20a21f7700) at pthread_create.c:463
#14 0x00007f20d936988f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7f20b5984700 (LWP 4267)):
#0  0x00007f20d22b29f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7f20d5aabfb8) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  0x00007f20d22b29f3 in __pthread_cond_wait_common (abstime=0x0, mutex=0x7f20d5aabf68, cond=0x7f20d5aabf90) at pthread_cond_wait.c:502
#2  0x00007f20d22b29f3 in __pthread_cond_wait (cond=0x7f20d5aabf90, mutex=0x7f20d5aabf68) at pthread_cond_wait.c:655
#3  0x00007f20d57b6874 in  () at /usr/lib/x86_64-linux-gnu/libQt5Script.so.5
#4  0x00007f20d57b68b9 in  () at /usr/lib/x86_64-linux-gnu/libQt5Script.so.5
#5  0x00007f20d22ac6db in start_thread (arg=0x7f20b5984700) at pthread_create.c:463
#6  0x00007f20d936988f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7f20b6dee700 (LWP 3946)):
#0  0x00007f20d935ccf6 in __GI_ppoll (fds=0x7f20a4000d28, nfds=1, timeout=<optimized out>, sigmask=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:39
#1  0x00007f20d689a8a1 in qt_safe_poll(pollfd*, unsigned long, timespec const*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007f20d689c038 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007f20d683f06a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f20d665a3aa in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f20d0cb8815 in  () at /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#6  0x00007f20d665bb52 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f20d22ac6db in start_thread (arg=0x7f20b6dee700) at pthread_create.c:463
#8  0x00007f20d936988f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7f20bd946700 (LWP 3761)):
#0  0x00007f20d935ccf6 in __GI_ppoll (fds=0x7f20b000b948, nfds=1, timeout=<optimized out>, sigmask=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:39
#1  0x00007f20d689a8a1 in qt_safe_poll(pollfd*, unsigned long, timespec const*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007f20d689c038 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007f20d683f06a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f20d665a3aa in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f20cf8850e5 in  () at /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#6  0x00007f20d665bb52 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f20d22ac6db in start_thread (arg=0x7f20bd946700) at pthread_create.c:463
#8  0x00007f20d936988f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f20d99ff880 (LWP 3734)):
#0  0x00007f20d22b29f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55c052cd15b4) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  0x00007f20d22b29f3 in __pthread_cond_wait_common (abstime=0x0, mutex=0x55c052cd1560, cond=0x55c052cd1588) at pthread_cond_wait.c:502
#2  0x00007f20d22b29f3 in __pthread_cond_wait (cond=0x55c052cd1588, mutex=0x55c052cd1560) at pthread_cond_wait.c:655
#3  0x00007f20d6662aeb in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f20d6662df9 in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f20d143a0ed in  () at /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#6  0x00007f20d143c66d in  () at /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#7  0x00007f20d143cce9 in  () at /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#8  0x00007f20d6e1f525 in QWindow::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#9  0x00007f20d149ca45 in QQuickWindow::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#10 0x00007f2004b5e4db in PlasmaQuick::Dialog::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libKF5PlasmaQuick.so.5
#11 0x00007f20d7645eac in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007f20d764d4b0 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007f20d6840f08 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007f20d6e1541a in QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#15 0x00007f20d6e1566d in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#16 0x00007f20d6def79b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#17 0x00007f20c1377173 in  () at /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#18 0x00007f20d683f06a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007f20d68483e0 in QCoreApplication::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007f20d9641d05 in kdemain () at /usr/lib/x86_64-linux-gnu/libkdeinit5_kwin_x11.so
#21 0x00007f20d9269b97 in __libc_start_main (main=0x55c051231720, argc=3, argv=0x7fffdd777da8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffdd777d98) at ../csu/libc-start.c:310
#22 0x000055c05123175a in _start ()

Possible duplicates by query: bug 414555, bug 411216, bug 403543, bug 401605, bug 381516.

Reported using DrKonqi
Comment 1 Nate Graham 2021-02-08 19:12:50 UTC
*** Bug 411405 has been marked as a duplicate of this bug. ***
Comment 2 Nate Graham 2021-02-08 19:13:06 UTC
*** Bug 415486 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2021-02-08 19:13:41 UTC
*** Bug 416228 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2021-02-08 19:13:52 UTC
*** Bug 417129 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2021-02-08 19:13:58 UTC
*** Bug 416615 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2021-02-08 19:17:02 UTC
*** Bug 420597 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2021-02-08 19:18:47 UTC
*** Bug 422113 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2021-02-08 19:20:02 UTC
*** Bug 414709 has been marked as a duplicate of this bug. ***
Comment 9 Nate Graham 2021-02-08 19:20:29 UTC
*** Bug 422283 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2021-02-08 19:20:52 UTC
*** Bug 430529 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2021-02-08 19:21:25 UTC
*** Bug 422954 has been marked as a duplicate of this bug. ***
Comment 12 Nate Graham 2021-02-08 19:22:07 UTC
*** Bug 418206 has been marked as a duplicate of this bug. ***
Comment 13 Nate Graham 2021-02-08 19:23:03 UTC
*** Bug 423228 has been marked as a duplicate of this bug. ***
Comment 14 Nate Graham 2021-02-08 19:23:13 UTC
*** Bug 432604 has been marked as a duplicate of this bug. ***
Comment 15 Nate Graham 2021-02-08 19:33:24 UTC
Looks like a modern incarnation of Bug 341497. See also this variant: Bug 414823.

Raising priority due to number of duplicates.
Comment 16 Nate Graham 2021-03-08 19:54:05 UTC
*** Bug 434154 has been marked as a duplicate of this bug. ***
Comment 17 Nate Graham 2021-03-31 21:18:30 UTC
*** Bug 435058 has been marked as a duplicate of this bug. ***
Comment 18 David Edmundson 2021-03-31 23:11:17 UTC
Some initial analysis

#6  0x00007f20d6e3b3a4 in QScreen::handle() const () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5

This just returns the platformScreen, this is set in the ctor, so for a crash to happen here it means the QScreen object has been deleted.

In one of the dupes we can see a pointer is sent as this to QScreen::handle, which heavily implies it's a dangling pointer.

If someone can reproduce reliably valgrind will tell us in an instant what's wrong.
Comment 19 Szőts Ákos 2021-04-01 07:55:52 UTC
I attached Valgrind to running kwin_x11. It seems kwin crashes many more times than without it. It crashes on Alt+Tabs, closing windows, and minimising windows after returning from sleep (hopefully this is the reproducible case of the current ticket).

I observed the following errors:

==18204== Syscall param writev(vector[...]) points to uninitialised byte(s)
==18204==    at 0x64F21CD: __writev (writev.c:26)
==18204==    by 0x64F21CD: writev (writev.c:24)
==18204==    by 0x5B70AD2: UnknownInlinedFun (xcb_conn.c:277)
==18204==    by 0x5B70AD2: _xcb_conn_wait.part.0 (xcb_conn.c:523)
==18204==    by 0x5B70B8F: UnknownInlinedFun (xcb_out.c:463)
==18204==    by 0x5B70B8F: _xcb_out_send (xcb_out.c:464)
==18204==    by 0x5B70DE6: UnknownInlinedFun (xcb_out.c:488)
==18204==    by 0x5B70DE6: _xcb_out_flush_to (xcb_out.c:477)
==18204==    by 0x5B7242A: xcb_request_check (xcb_in.c:743)
==18204==    by 0x112601: QtPrivate::QFunctorSlotObject<KWin::ApplicationX11::performStartup()::{lambda()#2}, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (main_x11.cpp:243)
==18204==    by 0x5F26945: call (qobjectdefs_impl.h:398)
==18204==    by 0x5F26945: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3886)
==18204==    by 0x4BFF4C2: KSelectionOwner::Private::claimSucceeded() (kselectionowner.cpp:188)
==18204==    by 0x4C047A0: UnknownInlinedFun (kselectionowner.cpp:222)
==18204==    by 0x4C047A0: KSelectionOwner::filterEvent(void*) (kselectionowner.cpp:406)
==18204==    by 0x5EED876: QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long*) (qabstracteventdispatcher.cpp:495)
==18204==    by 0xC3540E0: QXcbConnection::handleXcbEvent(xcb_generic_event_t*) (qxcbconnection.cpp:536)
==18204==    by 0xC3555F5: QXcbConnection::processXcbEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qxcbconnection.cpp:1014)
==18204==  Address 0xa1bfd7a is 4,538 bytes inside a block of size 21,168 alloc'd
==18204==    at 0x4840B65: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==18204==    by 0x5B73050: xcb_connect_to_fd (xcb_conn.c:346)
==18204==    by 0x5B73C46: xcb_connect_to_display_with_auth_info (xcb_util.c:534)
==18204==    by 0x7BA40E1: _XConnectXCB (xcb_disp.c:78)
==18204==    by 0x7B94124: XOpenDisplay (OpenDis.c:129)
==18204==    by 0xC379926: QXcbBasicConnection::QXcbBasicConnection(char const*) (qxcbconnection_basic.cpp:114)
==18204==    by 0xC355B21: QXcbConnection::QXcbConnection(QXcbNativeInterface*, bool, unsigned int, char const*) (qxcbconnection.cpp:91)
==18204==    by 0xC358992: QXcbIntegration::QXcbIntegration(QStringList const&, int&, char**) (qxcbintegration.cpp:197)
==18204==    by 0x485E45E: create (qxcbmain.cpp:56)
==18204==    by 0x485E45E: QXcbIntegrationPlugin::create(QString const&, QStringList const&, int&, char**) (qxcbmain.cpp:53)
==18204==    by 0x55B908B: init_platform (qguiapplication.cpp:1223)
==18204==    by 0x55B908B: QGuiApplicationPrivate::createPlatformIntegration() (qguiapplication.cpp:1481)
==18204==    by 0x55BA48F: QGuiApplicationPrivate::createEventDispatcher() (qguiapplication.cpp:1498)
==18204==    by 0x5EF6DB5: QCoreApplicationPrivate::init() (qcoreapplication.cpp:834)
==18204==  Uninitialised value was created by a stack allocation
==18204==    at 0x4BFF450: KSelectionOwner::Private::claimSucceeded() (kselectionowner.cpp:170)


==18204== Invalid read of size 16
==18204==    at 0x12A6CB01: ??? (in /memfd:sljit (deleted))
==18204==    by 0xD0A5537: ???
==18204==  Address 0xd0a555e is 62 bytes inside a block of size 76 alloc'd
==18204==    at 0x483E77F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==18204==    by 0x5D1A490: QArrayData::allocate(unsigned long, unsigned long, unsigned long, QFlags<QArrayData::AllocationOption>) (qarraydata.cpp:218)
==18204==    by 0x5D933F9: allocate (qarraydata.h:224)
==18204==    by 0x5D933F9: QString::fromLatin1_helper(char const*, int) (qstring.cpp:5459)
==18204==    by 0x671CE5D: KWin::GLPlatform::detect(KWin::OpenGLPlatformInterface) (qstring.h:701)
==18204==    by 0x128B5AE1: KWin::GlxBackend::init() [clone .part.0] (glxbackend.cpp:196)
==18204==    by 0x13181D88: KWin::SceneOpenGL::createScene(QObject*) (scene_opengl.cpp:449)
==18204==    by 0x13190828: KWin::OpenGLFactory::create(QObject*) const (scene_opengl.cpp:2725)
==18204==    by 0x4985E2E: KWin::Compositor::setupStart() [clone .part.0] (composite.cpp:238)
==18204==    by 0x4988B59: KWin::X11Compositor::start() (composite.cpp:815)
==18204==    by 0x5F1C350: QObject::event(QEvent*) (qobject.cpp:1314)
==18204==    by 0x4F194FE: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:3632)
==18204==    by 0x5EF0329: QCoreApplication::notifyInternal2(QObject*, QEvent*) (qcoreapplication.cpp:1063)


==18204== Invalid read of size 16
==18204==    at 0x12A6C6D8: ??? (in /memfd:sljit (deleted))
==18204==    by 0xD0A5537: ???
==18204==  Address 0xd0a555e is 62 bytes inside a block of size 76 alloc'd
==18204==    at 0x483E77F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==18204==    by 0x5D1A490: QArrayData::allocate(unsigned long, unsigned long, unsigned long, QFlags<QArrayData::AllocationOption>) (qarraydata.cpp:218)
==18204==    by 0x5D933F9: allocate (qarraydata.h:224)
==18204==    by 0x5D933F9: QString::fromLatin1_helper(char const*, int) (qstring.cpp:5459)
==18204==    by 0x671CE5D: KWin::GLPlatform::detect(KWin::OpenGLPlatformInterface) (qstring.h:701)
==18204==    by 0x128B5AE1: KWin::GlxBackend::init() [clone .part.0] (glxbackend.cpp:196)
==18204==    by 0x13181D88: KWin::SceneOpenGL::createScene(QObject*) (scene_opengl.cpp:449)
==18204==    by 0x13190828: KWin::OpenGLFactory::create(QObject*) const (scene_opengl.cpp:2725)
==18204==    by 0x4985E2E: KWin::Compositor::setupStart() [clone .part.0] (composite.cpp:238)
==18204==    by 0x4988B59: KWin::X11Compositor::start() (composite.cpp:815)
==18204==    by 0x5F1C350: QObject::event(QEvent*) (qobject.cpp:1314)
==18204==    by 0x4F194FE: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:3632)
==18204==    by 0x5EF0329: QCoreApplication::notifyInternal2(QObject*, QEvent*) (qcoreapplication.cpp:1063)


==16985== Invalid read of size 8
==16985==    at 0x5F44682: QEventDispatcherUNIXPrivate::markPendingSocketNotifiers() (qeventdispatcher_unix.cpp:273)
==16985==    by 0x5F44BB3: QEventDispatcherUNIXPrivate::activateSocketNotifiers() (qeventdispatcher_unix.cpp:294)
==16985==    by 0x5F4508A: QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qeventdispatcher_unix.cpp:511)
==16985==    by 0x5EEECEA: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:232)
==16985==    by 0x5D0DDAD: QThread::exec() (qthread.cpp:547)
==16985==    by 0x5BAA7B6: QDBusConnectionManager::run() (qdbusconnection.cpp:179)
==16985==    by 0x5D0EEF0: QThreadPrivate::start(void*) (qthread_unix.cpp:329)
==16985==    by 0x6E67298: start_thread (pthread_create.c:473)
==16985==    by 0x64FB3B2: clone (clone.S:95)
==16985==  Address 0xce6b038 is 24 bytes inside a block of size 40 free'd
==16985==    at 0x483F9AB: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16985==    by 0x5F453ED: deleteNode (qhash.h:586)
==16985==    by 0x5F453ED: QHash<int, QSocketNotifierSetUNIX>::erase(QHash<int, QSocketNotifierSetUNIX>::const_iterator) (qhash.h:886)
==16985==    by 0x5CEBFF3: QEventDispatcherUNIXPrivate::markPendingSocketNotifiers() [clone .cold] (qeventdispatcher_unix.cpp:281)
==16985==    by 0x5F44BB3: QEventDispatcherUNIXPrivate::activateSocketNotifiers() (qeventdispatcher_unix.cpp:294)
==16985==    by 0x5F4508A: QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qeventdispatcher_unix.cpp:511)
==16985==    by 0x5EEECEA: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:232)
==16985==    by 0x5D0DDAD: QThread::exec() (qthread.cpp:547)
==16985==    by 0x5BAA7B6: QDBusConnectionManager::run() (qdbusconnection.cpp:179)
==16985==    by 0x5D0EEF0: QThreadPrivate::start(void*) (qthread_unix.cpp:329)
==16985==    by 0x6E67298: start_thread (pthread_create.c:473)
==16985==    by 0x64FB3B2: clone (clone.S:95)
==16985==  Block was alloc'd at
==16985==    at 0x483E77F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16985==    by 0x5D49897: QHashData::allocateNode(int) (qhash.cpp:479)
==16985==    by 0x5F43F51: createNode (qhash.h:610)
==16985==    by 0x5F43F51: operator[] (qhash.h:761)
==16985==    by 0x5F43F51: QEventDispatcherUNIX::registerSocketNotifier(QSocketNotifier*) (qeventdispatcher_unix.cpp:408)
==16985==    by 0x5F29F66: QSocketNotifier::QSocketNotifier(long long, QSocketNotifier::Type, QObject*) (qsocketnotifier.cpp:170)
==16985==    by 0x5BB6099: qDBusAddWatch (qdbusintegrator.cpp:214)
==16985==    by 0x7EB4D71: _dbus_watch_list_set_functions (dbus-watch.c:321)
==16985==    by 0x7EA3E8C: dbus_connection_set_watch_functions (dbus-connection.c:4966)
==16985==    by 0x5BBC957: q_dbus_connection_set_watch_functions (qdbus_symbols_p.h:244)
==16985==    by 0x5BBC957: QDBusConnectionPrivate::setConnection(DBusConnection*, QDBusErrorInternal const&) (qdbusintegrator.cpp:1829)
==16985==    by 0x5BAB2A5: QDBusConnectionManager::executeConnectionRequest(QDBusConnectionManager::ConnectionRequestData*) (qdbusconnection.cpp:290)
==16985==    by 0x5F1C350: QObject::event(QEvent*) (qobject.cpp:1314)
==16985==    by 0x5EF02FE: doNotify (qcoreapplication.cpp:1153)
==16985==    by 0x5EF02FE: notify (qcoreapplication.cpp:1139)
==16985==    by 0x5EF02FE: QCoreApplication::notifyInternal2(QObject*, QEvent*) (qcoreapplication.cpp:1063)
==16985==    by 0x5EF2D60: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (qcoreapplication.cpp:1817)


==16985== Invalid read of size 8
==16985==    at 0x5F4469F: QEventDispatcherUNIXPrivate::markPendingSocketNotifiers() (qeventdispatcher_unix.cpp:273)
==16985==    by 0x5F44BB3: QEventDispatcherUNIXPrivate::activateSocketNotifiers() (qeventdispatcher_unix.cpp:294)
==16985==    by 0x5F4508A: QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qeventdispatcher_unix.cpp:511)
==16985==    by 0x5EEECEA: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:232)
==16985==    by 0x5D0DDAD: QThread::exec() (qthread.cpp:547)
==16985==    by 0x5BAA7B6: QDBusConnectionManager::run() (qdbusconnection.cpp:179)
==16985==    by 0x5D0EEF0: QThreadPrivate::start(void*) (qthread_unix.cpp:329)
==16985==    by 0x6E67298: start_thread (pthread_create.c:473)
==16985==    by 0x64FB3B2: clone (clone.S:95)
==16985==  Address 0xce6b040 is 32 bytes inside a block of size 40 free'd
==16985==    at 0x483F9AB: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16985==    by 0x5F453ED: deleteNode (qhash.h:586)
==16985==    by 0x5F453ED: QHash<int, QSocketNotifierSetUNIX>::erase(QHash<int, QSocketNotifierSetUNIX>::const_iterator) (qhash.h:886)
==16985==    by 0x5CEBFF3: QEventDispatcherUNIXPrivate::markPendingSocketNotifiers() [clone .cold] (qeventdispatcher_unix.cpp:281)
==16985==    by 0x5F44BB3: QEventDispatcherUNIXPrivate::activateSocketNotifiers() (qeventdispatcher_unix.cpp:294)
==16985==    by 0x5F4508A: QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qeventdispatcher_unix.cpp:511)
==16985==    by 0x5EEECEA: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:232)
==16985==    by 0x5D0DDAD: QThread::exec() (qthread.cpp:547)
==16985==    by 0x5BAA7B6: QDBusConnectionManager::run() (qdbusconnection.cpp:179)
==16985==    by 0x5D0EEF0: QThreadPrivate::start(void*) (qthread_unix.cpp:329)
==16985==    by 0x6E67298: start_thread (pthread_create.c:473)
==16985==    by 0x64FB3B2: clone (clone.S:95)
==16985==  Block was alloc'd at
==16985==    at 0x483E77F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16985==    by 0x5D49897: QHashData::allocateNode(int) (qhash.cpp:479)
==16985==    by 0x5F43F51: createNode (qhash.h:610)
==16985==    by 0x5F43F51: operator[] (qhash.h:761)
==16985==    by 0x5F43F51: QEventDispatcherUNIX::registerSocketNotifier(QSocketNotifier*) (qeventdispatcher_unix.cpp:408)
==16985==    by 0x5F29F66: QSocketNotifier::QSocketNotifier(long long, QSocketNotifier::Type, QObject*) (qsocketnotifier.cpp:170)
==16985==    by 0x5BB6099: qDBusAddWatch (qdbusintegrator.cpp:214)
==16985==    by 0x7EB4D71: _dbus_watch_list_set_functions (dbus-watch.c:321)
==16985==    by 0x7EA3E8C: dbus_connection_set_watch_functions (dbus-connection.c:4966)
==16985==    by 0x5BBC957: q_dbus_connection_set_watch_functions (qdbus_symbols_p.h:244)
==16985==    by 0x5BBC957: QDBusConnectionPrivate::setConnection(DBusConnection*, QDBusErrorInternal const&) (qdbusintegrator.cpp:1829)
==16985==    by 0x5BAB2A5: QDBusConnectionManager::executeConnectionRequest(QDBusConnectionManager::ConnectionRequestData*) (qdbusconnection.cpp:290)
==16985==    by 0x5F1C350: QObject::event(QEvent*) (qobject.cpp:1314)
==16985==    by 0x5EF02FE: doNotify (qcoreapplication.cpp:1153)
==16985==    by 0x5EF02FE: notify (qcoreapplication.cpp:1139)
==16985==    by 0x5EF02FE: QCoreApplication::notifyInternal2(QObject*, QEvent*) (qcoreapplication.cpp:1063)
==16985==    by 0x5EF2D60: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (qcoreapplication.cpp:1817)
==16985== 
==16985== 
==16985== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==16985==    at 0x6438483: raise (raise.c:45)
==16985==    by 0x4BD8E90: KCrash::defaultCrashHandler(int) (kcrash.cpp:576)
==16985==    by 0x643852F: ??? (in /lib64/libc-2.33.so)
==16985==    by 0x122B15D9: ??? (in /memfd:sljit (deleted))
==16985== 
==16985== FILE DESCRIPTORS: 3 open at exit.
==16985== Open file descriptor 2: /dev/pts/5
==16985==    <inherited from parent>
==16985== 
==16985== Open file descriptor 1: /dev/pts/5
==16985==    <inherited from parent>
==16985== 
==16985== Open file descriptor 0: /dev/null
==16985==    <inherited from parent>


==16985== 1 errors in context 2 of 96:
==16985== Invalid read of size 16
==16985==    at 0x122B1B01: ??? (in /memfd:sljit (deleted))
==16985==    by 0x123B1567: ???
==16985==  Address 0x123b158e is 62 bytes inside a block of size 76 alloc'd
==16985==    at 0x483E77F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16985==    by 0x5D1A490: QArrayData::allocate(unsigned long, unsigned long, unsigned long, QFlags<QArrayData::AllocationOption>) (qarraydata.cpp:218)
==16985==    by 0x5D933F9: allocate (qarraydata.h:224)
==16985==    by 0x5D933F9: QString::fromLatin1_helper(char const*, int) (qstring.cpp:5459)
==16985==    by 0x671CE5D: KWin::GLPlatform::detect(KWin::OpenGLPlatformInterface) (qstring.h:701)
==16985==    by 0x134B5AE1: KWin::GlxBackend::init() [clone .part.0] (glxbackend.cpp:196)
==16985==    by 0x1228AD88: KWin::SceneOpenGL::createScene(QObject*) (scene_opengl.cpp:449)
==16985==    by 0x12299828: KWin::OpenGLFactory::create(QObject*) const (scene_opengl.cpp:2725)
==16985==    by 0x4985E2E: KWin::Compositor::setupStart() [clone .part.0] (composite.cpp:238)
==16985==    by 0x4988B59: KWin::X11Compositor::start() (composite.cpp:815)
==16985==    by 0x4987E92: KWin::Compositor::reinitialize() (composite.cpp:560)
==16985==    by 0x5F26945: call (qobjectdefs_impl.h:398)
==16985==    by 0x5F26945: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3886)
==16985==    by 0x5F1C350: QObject::event(QEvent*) (qobject.cpp:1314)
==16985== 
==16985== 
==16985== 1 errors in context 3 of 96:
==16985== Invalid read of size 16
==16985==    at 0x122B1B01: ??? (in /memfd:sljit (deleted))
==16985==    by 0xDEAB157: ???
==16985==  Address 0xdeab17e is 62 bytes inside a block of size 76 alloc'd
==16985==    at 0x483E77F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16985==    by 0x5D1A490: QArrayData::allocate(unsigned long, unsigned long, unsigned long, QFlags<QArrayData::AllocationOption>) (qarraydata.cpp:218)
==16985==    by 0x5D933F9: allocate (qarraydata.h:224)
==16985==    by 0x5D933F9: QString::fromLatin1_helper(char const*, int) (qstring.cpp:5459)
==16985==    by 0x671CE5D: KWin::GLPlatform::detect(KWin::OpenGLPlatformInterface) (qstring.h:701)
==16985==    by 0x134B5AE1: KWin::GlxBackend::init() [clone .part.0] (glxbackend.cpp:196)
==16985==    by 0x1228AD88: KWin::SceneOpenGL::createScene(QObject*) (scene_opengl.cpp:449)
==16985==    by 0x12299828: KWin::OpenGLFactory::create(QObject*) const (scene_opengl.cpp:2725)
==16985==    by 0x4985E2E: KWin::Compositor::setupStart() [clone .part.0] (composite.cpp:238)
==16985==    by 0x4988B59: KWin::X11Compositor::start() (composite.cpp:815)
==16985==    by 0x5F1C350: QObject::event(QEvent*) (qobject.cpp:1314)
==16985==    by 0x4F194FE: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:3632)
==16985==    by 0x5EF0329: QCoreApplication::notifyInternal2(QObject*, QEvent*) (qcoreapplication.cpp:1063)
==16985== 
==16985== 
==16985== 2 errors in context 4 of 96:
==16985== Invalid read of size 16
==16985==    at 0x122B16D8: ??? (in /memfd:sljit (deleted))
==16985==    by 0x123B1567: ???
==16985==  Address 0x123b158e is 62 bytes inside a block of size 76 alloc'd
==16985==    at 0x483E77F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16985==    by 0x5D1A490: QArrayData::allocate(unsigned long, unsigned long, unsigned long, QFlags<QArrayData::AllocationOption>) (qarraydata.cpp:218)
==16985==    by 0x5D933F9: allocate (qarraydata.h:224)
==16985==    by 0x5D933F9: QString::fromLatin1_helper(char const*, int) (qstring.cpp:5459)
==16985==    by 0x671CE5D: KWin::GLPlatform::detect(KWin::OpenGLPlatformInterface) (qstring.h:701)
==16985==    by 0x134B5AE1: KWin::GlxBackend::init() [clone .part.0] (glxbackend.cpp:196)
==16985==    by 0x1228AD88: KWin::SceneOpenGL::createScene(QObject*) (scene_opengl.cpp:449)
==16985==    by 0x12299828: KWin::OpenGLFactory::create(QObject*) const (scene_opengl.cpp:2725)
==16985==    by 0x4985E2E: KWin::Compositor::setupStart() [clone .part.0] (composite.cpp:238)
==16985==    by 0x4988B59: KWin::X11Compositor::start() (composite.cpp:815)
==16985==    by 0x4987E92: KWin::Compositor::reinitialize() (composite.cpp:560)
==16985==    by 0x5F26945: call (qobjectdefs_impl.h:398)
==16985==    by 0x5F26945: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3886)
==16985==    by 0x5F1C350: QObject::event(QEvent*) (qobject.cpp:1314)
==16985== 
==16985== 
==16985== 2 errors in context 5 of 96:
==16985== Invalid read of size 16
==16985==    at 0x122B16D8: ??? (in /memfd:sljit (deleted))
==16985==    by 0xDEAB157: ???
==16985==  Address 0xdeab17e is 62 bytes inside a block of size 76 alloc'd
==16985==    at 0x483E77F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16985==    by 0x5D1A490: QArrayData::allocate(unsigned long, unsigned long, unsigned long, QFlags<QArrayData::AllocationOption>) (qarraydata.cpp:218)
==16985==    by 0x5D933F9: allocate (qarraydata.h:224)
==16985==    by 0x5D933F9: QString::fromLatin1_helper(char const*, int) (qstring.cpp:5459)
==16985==    by 0x671CE5D: KWin::GLPlatform::detect(KWin::OpenGLPlatformInterface) (qstring.h:701)
==16985==    by 0x134B5AE1: KWin::GlxBackend::init() [clone .part.0] (glxbackend.cpp:196)
==16985==    by 0x1228AD88: KWin::SceneOpenGL::createScene(QObject*) (scene_opengl.cpp:449)
==16985==    by 0x12299828: KWin::OpenGLFactory::create(QObject*) const (scene_opengl.cpp:2725)
==16985==    by 0x4985E2E: KWin::Compositor::setupStart() [clone .part.0] (composite.cpp:238)
==16985==    by 0x4988B59: KWin::X11Compositor::start() (composite.cpp:815)
==16985==    by 0x5F1C350: QObject::event(QEvent*) (qobject.cpp:1314)
==16985==    by 0x4F194FE: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:3632)
==16985==    by 0x5EF0329: QCoreApplication::notifyInternal2(QObject*, QEvent*) (qcoreapplication.cpp:1063)
==16985== 
==16985== 
==16985== 3 errors in context 6 of 96:
==16985== Thread 3 QDBusConnectionM:
==16985== Invalid read of size 8
==16985==    at 0x5F4469F: QEventDispatcherUNIXPrivate::markPendingSocketNotifiers() (qeventdispatcher_unix.cpp:273)
==16985==    by 0x5F44BB3: QEventDispatcherUNIXPrivate::activateSocketNotifiers() (qeventdispatcher_unix.cpp:294)
==16985==    by 0x5F4508A: QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qeventdispatcher_unix.cpp:511)
==16985==    by 0x5EEECEA: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:232)
==16985==    by 0x5D0DDAD: QThread::exec() (qthread.cpp:547)
==16985==    by 0x5BAA7B6: QDBusConnectionManager::run() (qdbusconnection.cpp:179)
==16985==    by 0x5D0EEF0: QThreadPrivate::start(void*) (qthread_unix.cpp:329)
==16985==    by 0x6E67298: start_thread (pthread_create.c:473)
==16985==    by 0x64FB3B2: clone (clone.S:95)
==16985==  Address 0xce6b040 is 32 bytes inside a block of size 40 free'd
==16985==    at 0x483F9AB: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16985==    by 0x5F453ED: deleteNode (qhash.h:586)
==16985==    by 0x5F453ED: QHash<int, QSocketNotifierSetUNIX>::erase(QHash<int, QSocketNotifierSetUNIX>::const_iterator) (qhash.h:886)
==16985==    by 0x5CEBFF3: QEventDispatcherUNIXPrivate::markPendingSocketNotifiers() [clone .cold] (qeventdispatcher_unix.cpp:281)
==16985==    by 0x5F44BB3: QEventDispatcherUNIXPrivate::activateSocketNotifiers() (qeventdispatcher_unix.cpp:294)
==16985==    by 0x5F4508A: QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qeventdispatcher_unix.cpp:511)
==16985==    by 0x5EEECEA: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:232)
==16985==    by 0x5D0DDAD: QThread::exec() (qthread.cpp:547)
==16985==    by 0x5BAA7B6: QDBusConnectionManager::run() (qdbusconnection.cpp:179)
==16985==    by 0x5D0EEF0: QThreadPrivate::start(void*) (qthread_unix.cpp:329)
==16985==    by 0x6E67298: start_thread (pthread_create.c:473)
==16985==    by 0x64FB3B2: clone (clone.S:95)
==16985==  Block was alloc'd at
==16985==    at 0x483E77F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16985==    by 0x5D49897: QHashData::allocateNode(int) (qhash.cpp:479)
==16985==    by 0x5F43F51: createNode (qhash.h:610)
==16985==    by 0x5F43F51: operator[] (qhash.h:761)
==16985==    by 0x5F43F51: QEventDispatcherUNIX::registerSocketNotifier(QSocketNotifier*) (qeventdispatcher_unix.cpp:408)
==16985==    by 0x5F29F66: QSocketNotifier::QSocketNotifier(long long, QSocketNotifier::Type, QObject*) (qsocketnotifier.cpp:170)
==16985==    by 0x5BB6099: qDBusAddWatch (qdbusintegrator.cpp:214)
==16985==    by 0x7EB4D71: _dbus_watch_list_set_functions (dbus-watch.c:321)
==16985==    by 0x7EA3E8C: dbus_connection_set_watch_functions (dbus-connection.c:4966)
==16985==    by 0x5BBC957: q_dbus_connection_set_watch_functions (qdbus_symbols_p.h:244)
==16985==    by 0x5BBC957: QDBusConnectionPrivate::setConnection(DBusConnection*, QDBusErrorInternal const&) (qdbusintegrator.cpp:1829)
==16985==    by 0x5BAB2A5: QDBusConnectionManager::executeConnectionRequest(QDBusConnectionManager::ConnectionRequestData*) (qdbusconnection.cpp:290)
==16985==    by 0x5F1C350: QObject::event(QEvent*) (qobject.cpp:1314)
==16985==    by 0x5EF02FE: doNotify (qcoreapplication.cpp:1153)
==16985==    by 0x5EF02FE: notify (qcoreapplication.cpp:1139)
==16985==    by 0x5EF02FE: QCoreApplication::notifyInternal2(QObject*, QEvent*) (qcoreapplication.cpp:1063)
==16985==    by 0x5EF2D60: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (qcoreapplication.cpp:1817)
==16985== 
==16985== 
==16985== 3 errors in context 7 of 96:
==16985== Invalid read of size 8
==16985==    at 0x5F44682: QEventDispatcherUNIXPrivate::markPendingSocketNotifiers() (qeventdispatcher_unix.cpp:273)
==16985==    by 0x5F44BB3: QEventDispatcherUNIXPrivate::activateSocketNotifiers() (qeventdispatcher_unix.cpp:294)
==16985==    by 0x5F4508A: QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qeventdispatcher_unix.cpp:511)
==16985==    by 0x5EEECEA: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:232)
==16985==    by 0x5D0DDAD: QThread::exec() (qthread.cpp:547)
==16985==    by 0x5BAA7B6: QDBusConnectionManager::run() (qdbusconnection.cpp:179)
==16985==    by 0x5D0EEF0: QThreadPrivate::start(void*) (qthread_unix.cpp:329)
==16985==    by 0x6E67298: start_thread (pthread_create.c:473)
==16985==    by 0x64FB3B2: clone (clone.S:95)
==16985==  Address 0xce6b038 is 24 bytes inside a block of size 40 free'd
==16985==    at 0x483F9AB: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16985==    by 0x5F453ED: deleteNode (qhash.h:586)
==16985==    by 0x5F453ED: QHash<int, QSocketNotifierSetUNIX>::erase(QHash<int, QSocketNotifierSetUNIX>::const_iterator) (qhash.h:886)
==16985==    by 0x5CEBFF3: QEventDispatcherUNIXPrivate::markPendingSocketNotifiers() [clone .cold] (qeventdispatcher_unix.cpp:281)
==16985==    by 0x5F44BB3: QEventDispatcherUNIXPrivate::activateSocketNotifiers() (qeventdispatcher_unix.cpp:294)
==16985==    by 0x5F4508A: QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qeventdispatcher_unix.cpp:511)
==16985==    by 0x5EEECEA: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:232)
==16985==    by 0x5D0DDAD: QThread::exec() (qthread.cpp:547)
==16985==    by 0x5BAA7B6: QDBusConnectionManager::run() (qdbusconnection.cpp:179)
==16985==    by 0x5D0EEF0: QThreadPrivate::start(void*) (qthread_unix.cpp:329)
==16985==    by 0x6E67298: start_thread (pthread_create.c:473)
==16985==    by 0x64FB3B2: clone (clone.S:95)
==16985==  Block was alloc'd at
==16985==    at 0x483E77F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16985==    by 0x5D49897: QHashData::allocateNode(int) (qhash.cpp:479)
==16985==    by 0x5F43F51: createNode (qhash.h:610)
==16985==    by 0x5F43F51: operator[] (qhash.h:761)
==16985==    by 0x5F43F51: QEventDispatcherUNIX::registerSocketNotifier(QSocketNotifier*) (qeventdispatcher_unix.cpp:408)
==16985==    by 0x5F29F66: QSocketNotifier::QSocketNotifier(long long, QSocketNotifier::Type, QObject*) (qsocketnotifier.cpp:170)
==16985==    by 0x5BB6099: qDBusAddWatch (qdbusintegrator.cpp:214)
==16985==    by 0x7EB4D71: _dbus_watch_list_set_functions (dbus-watch.c:321)
==16985==    by 0x7EA3E8C: dbus_connection_set_watch_functions (dbus-connection.c:4966)
==16985==    by 0x5BBC957: q_dbus_connection_set_watch_functions (qdbus_symbols_p.h:244)
==16985==    by 0x5BBC957: QDBusConnectionPrivate::setConnection(DBusConnection*, QDBusErrorInternal const&) (qdbusintegrator.cpp:1829)
==16985==    by 0x5BAB2A5: QDBusConnectionManager::executeConnectionRequest(QDBusConnectionManager::ConnectionRequestData*) (qdbusconnection.cpp:290)
==16985==    by 0x5F1C350: QObject::event(QEvent*) (qobject.cpp:1314)
==16985==    by 0x5EF02FE: doNotify (qcoreapplication.cpp:1153)
==16985==    by 0x5EF02FE: notify (qcoreapplication.cpp:1139)
==16985==    by 0x5EF02FE: QCoreApplication::notifyInternal2(QObject*, QEvent*) (qcoreapplication.cpp:1063)
==16985==    by 0x5EF2D60: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (qcoreapplication.cpp:1817)
==16985== 
==16985== 
==16985== 110 errors in context 8 of 96:
==16985== Thread 1:
==16985== Syscall param writev(vector[...]) points to uninitialised byte(s)
==16985==    at 0x64F21CD: __writev (writev.c:26)
==16985==    by 0x64F21CD: writev (writev.c:24)
==16985==    by 0x5B70AD2: UnknownInlinedFun (xcb_conn.c:277)
==16985==    by 0x5B70AD2: _xcb_conn_wait.part.0 (xcb_conn.c:523)
==16985==    by 0x5B70B8F: UnknownInlinedFun (xcb_out.c:463)
==16985==    by 0x5B70B8F: _xcb_out_send (xcb_out.c:464)
==16985==    by 0x5B70DE6: UnknownInlinedFun (xcb_out.c:488)
==16985==    by 0x5B70DE6: _xcb_out_flush_to (xcb_out.c:477)
==16985==    by 0x5B7242A: xcb_request_check (xcb_in.c:743)
==16985==    by 0x112601: QtPrivate::QFunctorSlotObject<KWin::ApplicationX11::performStartup()::{lambda()#2}, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (main_x11.cpp:243)
==16985==    by 0x5F26945: call (qobjectdefs_impl.h:398)
==16985==    by 0x5F26945: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3886)
==16985==    by 0x4BFF4C2: KSelectionOwner::Private::claimSucceeded() (kselectionowner.cpp:188)
==16985==    by 0x4C047A0: UnknownInlinedFun (kselectionowner.cpp:222)
==16985==    by 0x4C047A0: KSelectionOwner::filterEvent(void*) (kselectionowner.cpp:406)
==16985==    by 0x5EED876: QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long*) (qabstracteventdispatcher.cpp:495)
==16985==    by 0xC3540E0: QXcbConnection::handleXcbEvent(xcb_generic_event_t*) (qxcbconnection.cpp:536)
==16985==    by 0xC3555F5: QXcbConnection::processXcbEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qxcbconnection.cpp:1014)
==16985==  Address 0xa1bfd7a is 4,538 bytes inside a block of size 21,168 alloc'd
==16985==    at 0x4840B65: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16985==    by 0x5B73050: xcb_connect_to_fd (xcb_conn.c:346)
==16985==    by 0x5B73C46: xcb_connect_to_display_with_auth_info (xcb_util.c:534)
==16985==    by 0x7BA40E1: _XConnectXCB (xcb_disp.c:78)
==16985==    by 0x7B94124: XOpenDisplay (OpenDis.c:129)
==16985==    by 0xC379926: QXcbBasicConnection::QXcbBasicConnection(char const*) (qxcbconnection_basic.cpp:114)
==16985==    by 0xC355B21: QXcbConnection::QXcbConnection(QXcbNativeInterface*, bool, unsigned int, char const*) (qxcbconnection.cpp:91)
==16985==    by 0xC358992: QXcbIntegration::QXcbIntegration(QStringList const&, int&, char**) (qxcbintegration.cpp:197)
==16985==    by 0x485E45E: create (qxcbmain.cpp:56)
==16985==    by 0x485E45E: QXcbIntegrationPlugin::create(QString const&, QStringList const&, int&, char**) (qxcbmain.cpp:53)
==16985==    by 0x55B908B: init_platform (qguiapplication.cpp:1223)
==16985==    by 0x55B908B: QGuiApplicationPrivate::createPlatformIntegration() (qguiapplication.cpp:1481)
==16985==    by 0x55BA48F: QGuiApplicationPrivate::createEventDispatcher() (qguiapplication.cpp:1498)
==16985==    by 0x5EF6DB5: QCoreApplicationPrivate::init() (qcoreapplication.cpp:834)
==16985==  Uninitialised value was created by a stack allocation
==16985==    at 0x4BFF450: KSelectionOwner::Private::claimSucceeded() (kselectionowner.cpp:170)
==16985== 
==16985== 
==16985== 670 errors in context 9 of 96:
==16985== Thread 7 Thread (pooled):
==16985== Conditional jump or move depends on uninitialised value(s)
==16985==    at 0xEEF521D: glXWaitVideoSyncSGI (in /usr/lib64/libGLX_nvidia.so.460.67)
==16985==    by 0x134B07A2: KWin::SGIVideoSyncVsyncMonitorHelper::poll() (sgivideosyncvsyncmonitor.cpp:122)
==16985==    by 0x5F1C350: QObject::event(QEvent*) (qobject.cpp:1314)
==16985==    by 0x4F194FE: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:3632)
==16985==    by 0x5EF0329: QCoreApplication::notifyInternal2(QObject*, QEvent*) (qcoreapplication.cpp:1063)
==16985==    by 0x5EF2D60: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (qcoreapplication.cpp:1817)
==16985==    by 0x5F44D89: QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qeventdispatcher_unix.cpp:468)
==16985==    by 0x5EEECEA: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:232)
==16985==    by 0x5D0DDAD: QThread::exec() (qthread.cpp:547)
==16985==    by 0x5D0EEF0: QThreadPrivate::start(void*) (qthread_unix.cpp:329)
==16985==    by 0x6E67298: start_thread (pthread_create.c:473)
==16985==    by 0x64FB3B2: clone (clone.S:95)
==16985==  Uninitialised value was created by a stack allocation
==16985==    at 0x5F17F50: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:613)


I saw many of these repeated, however, I think they are not very helpful:

==18205== 1 errors in context 866 of 868:
==18205== Conditional jump or move depends on uninitialised value(s)
==18205==    at 0xEF0C3DE: ??? (in /memfd:sljit (deleted))
==18205==    by 0xB5A6E77: ???


kwin_x11 related leaks:

==16985== Thread 1:
==16985== 8 bytes in 1 blocks are definitely lost in loss record 414 of 14,666
==16985==    at 0x483E77F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16985==    by 0xEEF3798: glXChooseFBConfig (in /usr/lib64/libGLX_nvidia.so.460.67)
==16985==    by 0x92A3FE6: glXChooseFBConfig (libglx.c:1491)
==16985==    by 0xE5FD8B4: QGLXContext::init(QXcbScreen*, QPlatformOpenGLContext*, QVariant const&) (qglxintegration.cpp:484)
==16985==    by 0xE5FC1D6: QXcbGlxIntegration::createPlatformOpenGLContext(QOpenGLContext*) const (qxcbglxintegration.cpp:191)
==16985==    by 0x560889C: QOpenGLContext::create() (qopenglcontext.cpp:612)
==16985==    by 0x134B5A9D: UnknownInlinedFun (glxbackend.cpp:380)
==16985==    by 0x134B5A9D: KWin::GlxBackend::init() [clone .part.0] (glxbackend.cpp:189)
==16985==    by 0x1228AD88: KWin::SceneOpenGL::createScene(QObject*) (scene_opengl.cpp:449)
==16985==    by 0x12299828: KWin::OpenGLFactory::create(QObject*) const (scene_opengl.cpp:2725)
==16985==    by 0x4985E2E: KWin::Compositor::setupStart() [clone .part.0] (composite.cpp:238)
==16985==    by 0x4988B59: KWin::X11Compositor::start() (composite.cpp:815)
==16985==    by 0x5F1C350: QObject::event(QEvent*) (qobject.cpp:1314)
==16985== 
==16985== 8 bytes in 1 blocks are definitely lost in loss record 415 of 14,666
==16985==    at 0x483E77F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16985==    by 0xEEF3798: glXChooseFBConfig (in /usr/lib64/libGLX_nvidia.so.460.67)
==16985==    by 0x92A3FE6: glXChooseFBConfig (libglx.c:1491)
==16985==    by 0xE5FD8B4: QGLXContext::init(QXcbScreen*, QPlatformOpenGLContext*, QVariant const&) (qglxintegration.cpp:484)
==16985==    by 0xE5FC1D6: QXcbGlxIntegration::createPlatformOpenGLContext(QOpenGLContext*) const (qxcbglxintegration.cpp:191)
==16985==    by 0x560889C: QOpenGLContext::create() (qopenglcontext.cpp:612)
==16985==    by 0x134B5A9D: UnknownInlinedFun (glxbackend.cpp:380)
==16985==    by 0x134B5A9D: KWin::GlxBackend::init() [clone .part.0] (glxbackend.cpp:189)
==16985==    by 0x1228AD88: KWin::SceneOpenGL::createScene(QObject*) (scene_opengl.cpp:449)
==16985==    by 0x12299828: KWin::OpenGLFactory::create(QObject*) const (scene_opengl.cpp:2725)
==16985==    by 0x4985E2E: KWin::Compositor::setupStart() [clone .part.0] (composite.cpp:238)
==16985==    by 0x4988B59: KWin::X11Compositor::start() (composite.cpp:815)
==16985==    by 0x4987E92: KWin::Compositor::reinitialize() (composite.cpp:560)


I hope these traces are useful; if not, I'll gladly collect more. The core files created during crashes are still available in case you need them.

Operating System: openSUSE Tumbleweed 20210330
KDE Plasma Version: 5.21.3
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2
Kernel Version: 5.11.6-1-default
OS Type: 64-bit
Graphics Platform: X11
Graphics Processor: GeForce GTX 960/PCIe/SSE2
Comment 20 Szőts Ákos 2021-04-01 15:05:45 UTC
During the day kwin was running in Valgrind and it crashed seven times and produced 19 different Valgrind .log files. I tried my best to de-duplicate the error and leak messages there (there were many repeating).

Here come the errors from Valgrind:

==18204== Thread 7 vsync event moni:
==18204== Conditional jump or move depends on uninitialised value(s)
==18204==    at 0xEEF521D: glXWaitVideoSyncSGI (in /usr/lib64/libGLX_nvidia.so.460.67)
==18204==    by 0x128B07A2: KWin::SGIVideoSyncVsyncMonitorHelper::poll() (sgivideosyncvsyncmonitor.cpp:122)
==18204==    by 0x5F1C350: QObject::event(QEvent*) (qobject.cpp:1314)
==18204==    by 0x4F194FE: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:3632)
==18204==    by 0x5EF0329: QCoreApplication::notifyInternal2(QObject*, QEvent*) (qcoreapplication.cpp:1063)
==18204==    by 0x5EF2D60: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (qcoreapplication.cpp:1817)
==18204==    by 0x5F44D89: QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qeventdispatcher_unix.cpp:468)
==18204==    by 0x5EEECEA: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:232)
==18204==    by 0x5D0DDAD: QThread::exec() (qthread.cpp:547)
==18204==    by 0x5D0EEF0: QThreadPrivate::start(void*) (qthread_unix.cpp:329)
==18204==    by 0x6E67298: start_thread (pthread_create.c:473)
==18204==    by 0x64FB3B2: clone (clone.S:95)
==18204==  Uninitialised value was created by a stack allocation
==18204==    at 0x5F17F50: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:613)


==23403== Invalid read of size 16
==23403==    at 0x122B1B01: ??? (in /memfd:sljit (deleted))
==23403==    by 0xD0C4EB7: ???
==23403==  Address 0xd0c4ede is 62 bytes inside a block of size 76 alloc'd
==23403==    at 0x483E77F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==23403==    by 0x5D1A490: QArrayData::allocate(unsigned long, unsigned long, unsigned long, QFlags<QArrayData::AllocationOption>) (qarraydata.cpp:218)
==23403==    by 0x5D933F9: allocate (qarraydata.h:224)
==23403==    by 0x5D933F9: QString::fromLatin1_helper(char const*, int) (qstring.cpp:5459)
==23403==    by 0x671CE5D: KWin::GLPlatform::detect(KWin::OpenGLPlatformInterface) (qstring.h:701)
==23403==    by 0x134B5AE1: KWin::GlxBackend::init() [clone .part.0] (glxbackend.cpp:196)
==23403==    by 0x1228AD88: KWin::SceneOpenGL::createScene(QObject*) (scene_opengl.cpp:449)
==23403==    by 0x12299828: KWin::OpenGLFactory::create(QObject*) const (scene_opengl.cpp:2725)
==23403==    by 0x4985E2E: KWin::Compositor::setupStart() [clone .part.0] (composite.cpp:238)
==23403==    by 0x4988B59: KWin::X11Compositor::start() (composite.cpp:815)
==23403==    by 0x5F1C350: QObject::event(QEvent*) (qobject.cpp:1314)
==23403==    by 0x4F194FE: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:3632)
==23403==    by 0x5EF0329: QCoreApplication::notifyInternal2(QObject*, QEvent*) (qcoreapplication.cpp:1063)


==23403== Syscall param writev(vector[...]) points to uninitialised byte(s)
==23403==    at 0x64F21CD: __writev (writev.c:26)
==23403==    by 0x64F21CD: writev (writev.c:24)
==23403==    by 0x5B70AD2: UnknownInlinedFun (xcb_conn.c:277)
==23403==    by 0x5B70AD2: _xcb_conn_wait.part.0 (xcb_conn.c:523)
==23403==    by 0x5B70B8F: UnknownInlinedFun (xcb_out.c:463)
==23403==    by 0x5B70B8F: _xcb_out_send (xcb_out.c:464)
==23403==    by 0x5B70DE6: UnknownInlinedFun (xcb_out.c:488)
==23403==    by 0x5B70DE6: _xcb_out_flush_to (xcb_out.c:477)
==23403==    by 0x5B7242A: xcb_request_check (xcb_in.c:743)
==23403==    by 0x112601: QtPrivate::QFunctorSlotObject<KWin::ApplicationX11::performStartup()::{lambda()#2}, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (main_x11.cpp:243)
==23403==    by 0x5F26945: call (qobjectdefs_impl.h:398)
==23403==    by 0x5F26945: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3886)
==23403==    by 0x4BFF4C2: KSelectionOwner::Private::claimSucceeded() (kselectionowner.cpp:188)
==23403==    by 0x4C047A0: UnknownInlinedFun (kselectionowner.cpp:222)
==23403==    by 0x4C047A0: KSelectionOwner::filterEvent(void*) (kselectionowner.cpp:406)
==23403==    by 0x5EED876: QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long*) (qabstracteventdispatcher.cpp:495)
==23403==    by 0xC3540E0: QXcbConnection::handleXcbEvent(xcb_generic_event_t*) (qxcbconnection.cpp:536)
==23403==    by 0xC3555F5: QXcbConnection::processXcbEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qxcbconnection.cpp:1014)
==23403==  Address 0xa1bfd7a is 4,538 bytes inside a block of size 21,168 alloc'd
==23403==    at 0x4840B65: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==23403==    by 0x5B73050: xcb_connect_to_fd (xcb_conn.c:346)
==23403==    by 0x5B73C46: xcb_connect_to_display_with_auth_info (xcb_util.c:534)
==23403==    by 0x7BA40E1: _XConnectXCB (xcb_disp.c:78)
==23403==    by 0x7B94124: XOpenDisplay (OpenDis.c:129)
==23403==    by 0xC379926: QXcbBasicConnection::QXcbBasicConnection(char const*) (qxcbconnection_basic.cpp:114)
==23403==    by 0xC355B21: QXcbConnection::QXcbConnection(QXcbNativeInterface*, bool, unsigned int, char const*) (qxcbconnection.cpp:91)
==23403==    by 0xC358992: QXcbIntegration::QXcbIntegration(QStringList const&, int&, char**) (qxcbintegration.cpp:197)
==23403==    by 0x485E45E: create (qxcbmain.cpp:56)
==23403==    by 0x485E45E: QXcbIntegrationPlugin::create(QString const&, QStringList const&, int&, char**) (qxcbmain.cpp:53)
==23403==    by 0x55B908B: init_platform (qguiapplication.cpp:1223)
==23403==    by 0x55B908B: QGuiApplicationPrivate::createPlatformIntegration() (qguiapplication.cpp:1481)
==23403==    by 0x55BA48F: QGuiApplicationPrivate::createEventDispatcher() (qguiapplication.cpp:1498)
==23403==    by 0x5EF6DB5: QCoreApplicationPrivate::init() (qcoreapplication.cpp:834)
==23403==  Uninitialised value was created by a stack allocation
==23403==    at 0x4BFF450: KSelectionOwner::Private::claimSucceeded() (kselectionowner.cpp:170)


==24377== Thread 3 QDBusConnectionM:
==24377== Invalid read of size 8
==24377==    at 0x5F44682: QEventDispatcherUNIXPrivate::markPendingSocketNotifiers() (qeventdispatcher_unix.cpp:273)
==24377==    by 0x5F44BB3: QEventDispatcherUNIXPrivate::activateSocketNotifiers() (qeventdispatcher_unix.cpp:294)
==24377==    by 0x5F4508A: QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qeventdispatcher_unix.cpp:511)
==24377==    by 0x5EEECEA: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:232)
==24377==    by 0x5D0DDAD: QThread::exec() (qthread.cpp:547)
==24377==    by 0x5BAA7B6: QDBusConnectionManager::run() (qdbusconnection.cpp:179)
==24377==    by 0x5D0EEF0: QThreadPrivate::start(void*) (qthread_unix.cpp:329)
==24377==    by 0x6E67298: start_thread (pthread_create.c:473)
==24377==    by 0x64FB3B2: clone (clone.S:95)
==24377==  Address 0xd261c08 is 24 bytes inside a block of size 40 free'd
==24377==    at 0x483F9AB: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==24377==    by 0x5F453ED: deleteNode (qhash.h:586)
==24377==    by 0x5F453ED: QHash<int, QSocketNotifierSetUNIX>::erase(QHash<int, QSocketNotifierSetUNIX>::const_iterator) (qhash.h:886)
==24377==    by 0x5CEBFF3: QEventDispatcherUNIXPrivate::markPendingSocketNotifiers() [clone .cold] (qeventdispatcher_unix.cpp:281)
==24377==    by 0x5F44BB3: QEventDispatcherUNIXPrivate::activateSocketNotifiers() (qeventdispatcher_unix.cpp:294)
==24377==    by 0x5F4508A: QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qeventdispatcher_unix.cpp:511)
==24377==    by 0x5EEECEA: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:232)
==24377==    by 0x5D0DDAD: QThread::exec() (qthread.cpp:547)
==24377==    by 0x5BAA7B6: QDBusConnectionManager::run() (qdbusconnection.cpp:179)
==24377==    by 0x5D0EEF0: QThreadPrivate::start(void*) (qthread_unix.cpp:329)
==24377==    by 0x6E67298: start_thread (pthread_create.c:473)
==24377==    by 0x64FB3B2: clone (clone.S:95)
==24377==  Block was alloc'd at
==24377==    at 0x483E77F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==24377==    by 0x5D49897: QHashData::allocateNode(int) (qhash.cpp:479)
==24377==    by 0x5F43F51: createNode (qhash.h:610)
==24377==    by 0x5F43F51: operator[] (qhash.h:761)
==24377==    by 0x5F43F51: QEventDispatcherUNIX::registerSocketNotifier(QSocketNotifier*) (qeventdispatcher_unix.cpp:408)
==24377==    by 0x5F29F66: QSocketNotifier::QSocketNotifier(long long, QSocketNotifier::Type, QObject*) (qsocketnotifier.cpp:170)
==24377==    by 0x5BB6099: qDBusAddWatch (qdbusintegrator.cpp:214)
==24377==    by 0x7EB4D71: _dbus_watch_list_set_functions (dbus-watch.c:321)
==24377==    by 0x7EA3E8C: dbus_connection_set_watch_functions (dbus-connection.c:4966)
==24377==    by 0x5BBC957: q_dbus_connection_set_watch_functions (qdbus_symbols_p.h:244)
==24377==    by 0x5BBC957: QDBusConnectionPrivate::setConnection(DBusConnection*, QDBusErrorInternal const&) (qdbusintegrator.cpp:1829)
==24377==    by 0x5BAB3BF: QDBusConnectionManager::executeConnectionRequest(QDBusConnectionManager::ConnectionRequestData*) (qdbusconnection.cpp:290)
==24377==    by 0x5F1C350: QObject::event(QEvent*) (qobject.cpp:1314)
==24377==    by 0x5EF02FE: doNotify (qcoreapplication.cpp:1153)
==24377==    by 0x5EF02FE: notify (qcoreapplication.cpp:1139)
==24377==    by 0x5EF02FE: QCoreApplication::notifyInternal2(QObject*, QEvent*) (qcoreapplication.cpp:1063)
==24377==    by 0x5EF2D60: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (qcoreapplication.cpp:1817)


==26719== Conditional jump or move depends on uninitialised value(s)
==26719==    at 0x682D9D6: isPossibleCell (Collector.cpp:785)
==26719==    by 0x682D9D6: QTJSC::Heap::markConservatively(QTJSC::MarkStack&, void*, void*) (Collector.cpp:807)
==26719==    by 0x682DC0F: QTJSC::Heap::markCurrentThreadConservativelyInternal(QTJSC::MarkStack&) (Collector.cpp:834)
==26719==    by 0x682DC97: QTJSC::Heap::markCurrentThreadConservatively(QTJSC::MarkStack&) (Collector.cpp:856)
==26719==    by 0x682E2FF: markStackObjectsConservatively (Collector.cpp:1008)
==26719==    by 0x682E2FF: QTJSC::Heap::markRoots() (Collector.cpp:1148)
==26719==    by 0x682E60E: reset (Collector.cpp:1269)
==26719==    by 0x682E60E: QTJSC::Heap::allocate(unsigned long) (Collector.cpp:405)
==26719==    by 0x68CC6DA: operator new (JSCell.h:162)
==26719==    by 0x68CC6DA: QScriptContext::argumentsObject() const (qscriptcontext.cpp:348)
==26719==    by 0x68CCCDD: QScriptContext::argument(int) const (qscriptcontext.cpp:281)
==26719==    by 0x4A3E33C: KWin::kwinEffectRetarget(QScriptContext*, QScriptEngine*) (scriptedeffect.cpp:408)
==26719==    by 0x68F7778: QScript::FunctionWrapper::proxyCall(QTJSC::ExecState*, QTJSC::JSObject*, QTJSC::JSValue, QTJSC::ArgList const&) (qscriptfunction.cpp:98)
==26719==    by 0x682D46D: QTJSC::NativeFuncWrapper::operator()(QTJSC::ExecState*, QTJSC::JSObject*, QTJSC::JSValue, QTJSC::ArgList const&) const (CallData.cpp:46)
==26719==    by 0x680A732: cti_op_call_NotJSFunction (JITStubs.cpp:1780)
==26719==    by 0x59CEEA19: ???
==26719==  Uninitialised value was created by a stack allocation
==26719==    at 0x682DB50: QTJSC::Heap::markCurrentThreadConservativelyInternal(QTJSC::MarkStack&) (Collector.cpp:830)


==26719== Conditional jump or move depends on uninitialised value(s)
==26719==    at 0x682DA5D: QTJSC::Heap::markConservatively(QTJSC::MarkStack&, void*, void*) (Collector.cpp:820)
==26719==    by 0x682DC0F: QTJSC::Heap::markCurrentThreadConservativelyInternal(QTJSC::MarkStack&) (Collector.cpp:834)
==26719==    by 0x682DC97: QTJSC::Heap::markCurrentThreadConservatively(QTJSC::MarkStack&) (Collector.cpp:856)
==26719==    by 0x682E2FF: markStackObjectsConservatively (Collector.cpp:1008)
==26719==    by 0x682E2FF: QTJSC::Heap::markRoots() (Collector.cpp:1148)
==26719==    by 0x682E60E: reset (Collector.cpp:1269)
==26719==    by 0x682E60E: QTJSC::Heap::allocate(unsigned long) (Collector.cpp:405)
==26719==    by 0x68CC6DA: operator new (JSCell.h:162)
==26719==    by 0x68CC6DA: QScriptContext::argumentsObject() const (qscriptcontext.cpp:348)
==26719==    by 0x68CCCDD: QScriptContext::argument(int) const (qscriptcontext.cpp:281)
==26719==    by 0x4A3E33C: KWin::kwinEffectRetarget(QScriptContext*, QScriptEngine*) (scriptedeffect.cpp:408)
==26719==    by 0x68F7778: QScript::FunctionWrapper::proxyCall(QTJSC::ExecState*, QTJSC::JSObject*, QTJSC::JSValue, QTJSC::ArgList const&) (qscriptfunction.cpp:98)
==26719==    by 0x682D46D: QTJSC::NativeFuncWrapper::operator()(QTJSC::ExecState*, QTJSC::JSObject*, QTJSC::JSValue, QTJSC::ArgList const&) const (CallData.cpp:46)
==26719==    by 0x680A732: cti_op_call_NotJSFunction (JITStubs.cpp:1780)
==26719==    by 0x59CEEA19: ???
==26719==  Uninitialised value was created by a stack allocation
==26719==    at 0x682DC70: QTJSC::Heap::markCurrentThreadConservatively(QTJSC::MarkStack&) (Collector.cpp:844)

==30515== Use of uninitialised value of size 8
==30515==    at 0x682DA68: get (Collector.h:215)
==30515==    by 0x682DA68: isCellMarked (Collector.h:269)
==30515==    by 0x682DA68: append (JSCell.h:329)
==30515==    by 0x682DA68: QTJSC::Heap::markConservatively(QTJSC::MarkStack&, void*, void*) (Collector.cpp:822)
==30515==    by 0x682DC0F: QTJSC::Heap::markCurrentThreadConservativelyInternal(QTJSC::MarkStack&) (Collector.cpp:834)
==30515==    by 0x682DC97: QTJSC::Heap::markCurrentThreadConservatively(QTJSC::MarkStack&) (Collector.cpp:856)
==30515==    by 0x682E2FF: markStackObjectsConservatively (Collector.cpp:1008)
==30515==    by 0x682E2FF: QTJSC::Heap::markRoots() (Collector.cpp:1148)
==30515==    by 0x682E60E: reset (Collector.cpp:1269)
==30515==    by 0x682E60E: QTJSC::Heap::allocate(unsigned long) (Collector.cpp:405)
==30515==    by 0x6848399: operator new (JSCell.h:162)
==30515==    by 0x6848399: jsString (JSString.h:445)
==30515==    by 0x6848399: QTJSC::InternalFunction::InternalFunction(QTJSC::JSGlobalData*, QTWTF::NonNullPassRefPtr<QTJSC::Structure>, QTJSC::Identifier const&) (InternalFunction.cpp:43)
==30515==    by 0x68FE370: QScript::QtPropertyFunction::QtPropertyFunction(QMetaObject const*, int, QTJSC::JSGlobalData*, QTWTF::PassRefPtr<QTJSC::Structure>, QTJSC::Identifier const&) (qscriptqobject.cpp:1061)
==30515==    by 0x6907CD0: QScript::QObjectDelegate::getOwnPropertySlot(QScriptObject*, QTJSC::ExecState*, QTJSC::Identifier const&, QTJSC::PropertySlot&) (qscriptqobject.cpp:1262)
==30515==    by 0x67CD57C: fastGetOwnPropertySlot (JSObject.h:382)
==30515==    by 0x67CD57C: QTJSC::JSValue::get(QTJSC::ExecState*, QTJSC::Identifier const&, QTJSC::PropertySlot&) const (JSObject.h:618)
==30515==    by 0x6806FEE: cti_op_get_by_id_generic (JITStubs.cpp:1237)
==30515==    by 0x59CE5AEC: ???
==30515==    by 0x67BFE39: execute (JITCode.h:79)
==30515==    by 0x67BFE39: QTJSC::Interpreter::execute(QTJSC::FunctionExecutable*, QTJSC::ExecState*, QTJSC::JSFunction*, QTJSC::JSObject*, QTJSC::ArgList const&, QTJSC::ScopeChainNode*, QTJSC::JSValue*) (Interpreter.cpp:718)
==30515==  Uninitialised value was created by a stack allocation
==30515==    at 0x6907697: QScript::QObjectDelegate::getOwnPropertySlot(QScriptObject*, QTJSC::ExecState*, QTJSC::Identifier const&, QTJSC::PropertySlot&) (qscriptqobject.cpp:1206)


==26719== Conditional jump or move depends on uninitialised value(s)
==26719==    at 0x68FC3E7: append (JSCell.h:329)
==26719==    by 0x68FC3E7: append (JSCell.h:340)
==26719==    by 0x68FC3E7: QScript::QtFunction::markChildren(QTJSC::MarkStack&) (qscriptqobject.cpp:238)
==26719==    by 0x682F9C4: markChildren (JSArray.h:178)
==26719==    by 0x682F9C4: QTJSC::MarkStack::drain() (JSArray.h:220)
==26719==    by 0x682DA96: QTJSC::Heap::markConservatively(QTJSC::MarkStack&, void*, void*) (Collector.cpp:823)
==26719==    by 0x682DC0F: QTJSC::Heap::markCurrentThreadConservativelyInternal(QTJSC::MarkStack&) (Collector.cpp:834)
==26719==    by 0x682DC97: QTJSC::Heap::markCurrentThreadConservatively(QTJSC::MarkStack&) (Collector.cpp:856)
==26719==    by 0x682E2FF: markStackObjectsConservatively (Collector.cpp:1008)
==26719==    by 0x682E2FF: QTJSC::Heap::markRoots() (Collector.cpp:1148)
==26719==    by 0x682E60E: reset (Collector.cpp:1269)
==26719==    by 0x682E60E: QTJSC::Heap::allocate(unsigned long) (Collector.cpp:405)
==26719==    by 0x68CC6DA: operator new (JSCell.h:162)
==26719==    by 0x68CC6DA: QScriptContext::argumentsObject() const (qscriptcontext.cpp:348)
==26719==    by 0x68CCCDD: QScriptContext::argument(int) const (qscriptcontext.cpp:281)
==26719==    by 0x4A3E33C: KWin::kwinEffectRetarget(QScriptContext*, QScriptEngine*) (scriptedeffect.cpp:408)
==26719==    by 0x68F7778: QScript::FunctionWrapper::proxyCall(QTJSC::ExecState*, QTJSC::JSObject*, QTJSC::JSValue, QTJSC::ArgList const&) (qscriptfunction.cpp:98)
==26719==    by 0x682D46D: QTJSC::NativeFuncWrapper::operator()(QTJSC::ExecState*, QTJSC::JSObject*, QTJSC::JSValue, QTJSC::ArgList const&) const (CallData.cpp:46)
==26719==  Uninitialised value was created by a stack allocation
==26719==    at 0x4A3E215: KWin::kwinEffectRetarget(QScriptContext*, QScriptEngine*) (scriptedeffect.cpp:402)
Comment 21 Szőts Ákos 2021-04-01 15:06:33 UTC
Here are the reported definite leaks:

==23403== 128 (24 direct, 104 indirect) bytes in 1 blocks are definitely lost in loss record 715 of 1,029
==23403==    at 0x483EDEF: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==23403==    by 0x49BDDD4: KWin::Workspace::registerEventFilter(KWin::X11EventFilter*) (events.cpp:171)
==23403==    by 0x1349E201: KWin::X11StandalonePlatform::createScreenEdge(KWin::ScreenEdges*) (screenedges_filter.cpp:20)
==23403==    by 0x4A332F4: KWin::ScreenEdges::createEdge(KWin::ElectricBorder, int, int, int, int, bool) (screenedge.cpp:1106)
==23403==    by 0x4A342A2: KWin::ScreenEdges::createVerticalEdge(KWin::ElectricBorder, QRect const&, QRect const&) (screenedge.cpp:1061)
==23403==    by 0x4A34792: KWin::ScreenEdges::recreateEdges() (screenedge.cpp:1001)
==23403==    by 0x4A8DE54: KWin::Workspace::init() (workspace.cpp:218)
==23403==    by 0x4A8CE82: KWin::Workspace::Workspace() (workspace.cpp:204)
==23403==    by 0x49FE22F: KWin::Application::createWorkspace() (main.cpp:272)
==23403==    by 0x111D08: KWin::ApplicationX11::continueStartupWithScreens() (main_x11.cpp:272)
==23403==    by 0x5F26945: call (qobjectdefs_impl.h:398)
==23403==    by 0x5F26945: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3886)
==23403==    by 0x134AE5D8: void KWin::X11StandalonePlatform::doUpdateOutputs<KWin::Xcb::RandR::ScreenResources>() (x11_platform.cpp:603)


==23403== 128 (24 direct, 104 indirect) bytes in 1 blocks are definitely lost in loss record 720 of 1,029
==23403==    at 0x483EDEF: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==23403==    by 0x49BDDD4: KWin::Workspace::registerEventFilter(KWin::X11EventFilter*) (events.cpp:171)
==23403==    by 0x4AC1C71: KWin::X11EventFilter::X11EventFilter(int, int, int) (x11eventfilter.cpp:25)
==23403==    by 0x134A41FF: KWin::X11StandalonePlatform::init() (x11_platform.cpp:66)
==23403==    by 0x1127E6: QtPrivate::QFunctorSlotObject<KWin::ApplicationX11::performStartup()::{lambda()#2}, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (main_x11.cpp:259)
==23403==    by 0x5F26945: call (qobjectdefs_impl.h:398)
==23403==    by 0x5F26945: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3886)
==23403==    by 0x4BFF4C2: KSelectionOwner::Private::claimSucceeded() (kselectionowner.cpp:188)
==23403==    by 0x4C047A0: UnknownInlinedFun (kselectionowner.cpp:222)
==23403==    by 0x4C047A0: KSelectionOwner::filterEvent(void*) (kselectionowner.cpp:406)
==23403==    by 0x5EED876: QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long*) (qabstracteventdispatcher.cpp:495)
==23403==    by 0xC3540E0: QXcbConnection::handleXcbEvent(xcb_generic_event_t*) (qxcbconnection.cpp:536)
==23403==    by 0xC3555F5: QXcbConnection::processXcbEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qxcbconnection.cpp:1014)
==23403==    by 0xC37835B: QXcbUnixEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qxcbeventdispatcher.cpp:61)


==24377== 8 bytes in 1 blocks are definitely lost in loss record 758 of 21,144
==24377==    at 0x483E77F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==24377==    by 0xEEF3798: glXChooseFBConfig (in /usr/lib64/libGLX_nvidia.so.460.67)
==24377==    by 0x92A3FE6: glXChooseFBConfig (libglx.c:1491)
==24377==    by 0xE5FD8B4: QGLXContext::init(QXcbScreen*, QPlatformOpenGLContext*, QVariant const&) (qglxintegration.cpp:484)
==24377==    by 0xE5FC1D6: QXcbGlxIntegration::createPlatformOpenGLContext(QOpenGLContext*) const (qxcbglxintegration.cpp:191)
==24377==    by 0x560889C: QOpenGLContext::create() (qopenglcontext.cpp:612)
==24377==    by 0x128AFA9D: UnknownInlinedFun (glxbackend.cpp:380)
==24377==    by 0x128AFA9D: KWin::GlxBackend::init() [clone .part.0] (glxbackend.cpp:189)
==24377==    by 0x1268AD88: KWin::SceneOpenGL::createScene(QObject*) (scene_opengl.cpp:449)
==24377==    by 0x12699828: KWin::OpenGLFactory::create(QObject*) const (scene_opengl.cpp:2725)
==24377==    by 0x4985E2E: KWin::Compositor::setupStart() [clone .part.0] (composite.cpp:238)
==24377==    by 0x4988B59: KWin::X11Compositor::start() (composite.cpp:815)
==24377==    by 0x5F1C350: QObject::event(QEvent*) (qobject.cpp:1314)


==24377== 16 bytes in 2 blocks are definitely lost in loss record 1,669 of 21,144
==24377==    at 0x483F50F: operator new[](unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==24377==    by 0x77489FE: QLinkedStringHash<QPair<int, QQmlPropertyData*> >::linkAndReserve(QLinkedStringHash<QPair<int, QQmlPropertyData*> > const&, int) (qlinkedstringhash_p.h:82)
==24377==    by 0x77440B1: copy (qqmlpropertycache.cpp:262)
==24377==    by 0x77440B1: QQmlPropertyCache::copyAndReserve(int, int, int, int) (qqmlpropertycache.cpp:278)
==24377==    by 0x76F05E0: QQmlPropertyCacheCreator<QV4::ExecutableCompilationUnit>::createMetaObject(int, QV4::CompiledData::Object const*, QQmlRefPointer<QQmlPropertyCache> const&) (qqmlpropertycachecreator_p.h:351)
==24377==    by 0x76F2156: QQmlPropertyCacheCreator<QV4::ExecutableCompilationUnit>::buildMetaObjectRecursively(int, QQmlBindingInstantiationContext const&, QQmlPropertyCacheCreator<QV4::ExecutableCompilationUnit>::VMEMetaObjectIsRequired) (qqmlpropertycachecreator_p.h:269)
==24377==    by 0x76F2CD5: QQmlPropertyCacheCreator<QV4::ExecutableCompilationUnit>::buildMetaObjects() (qqmlpropertycachecreator_p.h:213)
==24377==    by 0x76EA11B: QQmlTypeData::createTypeAndPropertyCaches(QQmlRefPointer<QQmlTypeNameCache> const&, QV4::ResolvedTypeReferenceMap const&) (qqmltypedata.cpp:247)
==24377==    by 0x76EBF93: QQmlTypeData::done() (qqmltypedata.cpp:457)
==24377==    by 0x76D9E04: tryDone (qqmldatablob.cpp:524)
==24377==    by 0x76D9E04: QQmlDataBlob::tryDone() (qqmldatablob.cpp:515)
==24377==    by 0x7733B74: QQmlTypeLoader::setData(QQmlDataBlob*, QQmlDataBlob::SourceCodeData const&) (qqmltypeloader.cpp:457)
==24377==    by 0x7734231: QQmlTypeLoader::setData(QQmlDataBlob*, QString const&) (qqmltypeloader.cpp:437)
==24377==    by 0x77354AB: QQmlTypeLoader::loadThread(QQmlDataBlob*) (qqmltypeloader.cpp:299)


==24377== 40 bytes in 5 blocks are definitely lost in loss record 8,895 of 21,144
==24377==    at 0x483F50F: operator new[](unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==24377==    by 0x7744AE6: linkAndReserve (qlinkedstringhash_p.h:82)
==24377==    by 0x7744AE6: copy (qqmlpropertycache.cpp:262)
==24377==    by 0x7744AE6: QQmlPropertyCache::copy() (qqmlpropertycache.cpp:272)
==24377==    by 0x7729E04: QQmlMetaTypeData::propertyCache(QQmlType const&, int) (qqmlmetatypedata.cpp:175)
==24377==    by 0x771DC11: QQmlMetaType::propertyCache(QQmlType const&, int) (qqmlmetatype.cpp:1242)
==24377==    by 0x76E6CCD: cache (qqmlengine_p.h:410)
==24377==    by 0x76E6CCD: cache (qqmlengine_p.h:402)
==24377==    by 0x76E6CCD: QQmlTypeData::buildTypeResolutionCaches(QQmlRefPointer<QQmlTypeNameCache>*, QV4::ResolvedTypeReferenceMap*) const (qqmltypedata.cpp:975)
==24377==    by 0x76EAEB2: QQmlTypeData::done() (qqmltypedata.cpp:424)
==24377==    by 0x76D9E04: tryDone (qqmldatablob.cpp:524)
==24377==    by 0x76D9E04: QQmlDataBlob::tryDone() (qqmldatablob.cpp:515)
==24377==    by 0x7733B74: QQmlTypeLoader::setData(QQmlDataBlob*, QQmlDataBlob::SourceCodeData const&) (qqmltypeloader.cpp:457)
==24377==    by 0x7734231: QQmlTypeLoader::setData(QQmlDataBlob*, QString const&) (qqmltypeloader.cpp:437)
==24377==    by 0x77354AB: QQmlTypeLoader::loadThread(QQmlDataBlob*) (qqmltypeloader.cpp:299)
==24377==    by 0x76F459C: QQmlTypeLoaderThread::loadThread(QQmlDataBlob*) (qqmltypeloaderthread.cpp:162)
==24377==    by 0x77A674E: QQmlThreadPrivate::threadEvent() (qqmlthread.cpp:198)
Comment 22 David Edmundson 2021-04-01 15:31:56 UTC
I'm not so much interested in the leaks, but I want a trace of a time when we're calling createPlatformOpenGLContext with an invalid screen
Comment 23 Szőts Ákos 2021-04-01 21:42:51 UTC
I usually get this kind of crash when I regularly switch between the two inputs (DisplayPort and HDMI) of my monitor. I'll continue testing with this pattern in a few days, therefore anyone who has a better reproducible or can jump in sooner, feel free to do :).

On a related note, may I ask what will be the fate of the other kwin Valgrind errors from Comment 20? Should I open separate bug tickets for them? As kwin crashes under Valgrind quite often it'd also ease further debugging if we didn't need to filter out duplicate reportings.
Comment 24 dura 2021-06-11 10:21:37 UTC
For me it usually happen after a VT switch.
Trying to reproduce it with plasmashell under valgrind leads to this use after free that makes me think it's a pure QT bug:

==1964973== Invalid read of size 8
==1964973==    at 0x631FB85: ??? (in /usr/qt5/lib/libQt5Gui.so.5.15.2)
==1964973==    by 0x60857E9: QOpenGLContextGroupPrivate::deletePendingResources(QOpenGLContext*) (in /usr/qt5/lib/libQt5Gui.so.5.15.2)
==1964973==    by 0x608763B: QOpenGLSharedResource::free() (in /usr/qt5/lib/libQt5Gui.so.5.15.2)
==1964973==    by 0x631FC29: QOpenGLTextureCache::invalidateResource() (in /usr/qt5/lib/libQt5Gui.so.5.15.2)
==1964973==    by 0x6087796: QOpenGLMultiGroupSharedResource::cleanup(QOpenGLContextGroup*, QOpenGLSharedResource*) (in /usr/qt5/lib/libQt5Gui.so.5.15.2)
==1964973==    by 0x6087867: QOpenGLContextGroupPrivate::cleanup() (in /usr/qt5/lib/libQt5Gui.so.5.15.2)
==1964973==    by 0x6087E37: QOpenGLContextGroupPrivate::removeContext(QOpenGLContext*) (in /usr/qt5/lib/libQt5Gui.so.5.15.2)
==1964973==    by 0x6087FAD: QOpenGLContext::destroy() (in /usr/qt5/lib/libQt5Gui.so.5.15.2)
==1964973==    by 0x6088229: QOpenGLContext::create() (in /usr/qt5/lib/libQt5Gui.so.5.15.2)
==1964973==    by 0x4E0C7C3: ??? (in /usr/qt5/lib/libQt5Quick.so.5.15.2)
==1964973==    by 0x4E0E58D: ??? (in /usr/qt5/lib/libQt5Quick.so.5.15.2)
==1964973==    by 0x4E0F2A6: ??? (in /usr/qt5/lib/libQt5Quick.so.5.15.2)
==1964973==    by 0x66A58A9: ??? (in /usr/qt5/lib/libQt5Core.so.5.15.2)
==1964973==    by 0x797AD1D: start_thread (in /usr/lib/libpthread-2.33.so)
==1964973==    by 0x6DD05BE: clone (in /usr/lib/libc-2.33.so)
==1964973==  Address 0x3646e6a0 is 96 bytes inside a block of size 2,936 free'd
==1964973==    at 0x4840B52: operator delete(void*, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==1964973==    by 0x60857B5: QOpenGLContextGroupPrivate::deletePendingResources(QOpenGLContext*) (in /usr/qt5/lib/libQt5Gui.so.5.15.2)
==1964973==    by 0x608763B: QOpenGLSharedResource::free() (in /usr/qt5/lib/libQt5Gui.so.5.15.2)
==1964973==    by 0x6087707: QOpenGLMultiGroupSharedResource::cleanup(QOpenGLContextGroup*, QOpenGLSharedResource*) (in /usr/qt5/lib/libQt5Gui.so.5.15.2)
==1964973==    by 0x6087867: QOpenGLContextGroupPrivate::cleanup() (in /usr/qt5/lib/libQt5Gui.so.5.15.2)
==1964973==    by 0x6087E37: QOpenGLContextGroupPrivate::removeContext(QOpenGLContext*) (in /usr/qt5/lib/libQt5Gui.so.5.15.2)
==1964973==    by 0x6087FAD: QOpenGLContext::destroy() (in /usr/qt5/lib/libQt5Gui.so.5.15.2)
==1964973==    by 0x6088229: QOpenGLContext::create() (in /usr/qt5/lib/libQt5Gui.so.5.15.2)
==1964973==    by 0x4E0C7C3: ??? (in /usr/qt5/lib/libQt5Quick.so.5.15.2)
==1964973==    by 0x4E0E58D: ??? (in /usr/qt5/lib/libQt5Quick.so.5.15.2)
==1964973==    by 0x4E0F2A6: ??? (in /usr/qt5/lib/libQt5Quick.so.5.15.2)
==1964973==    by 0x66A58A9: ??? (in /usr/qt5/lib/libQt5Core.so.5.15.2)
==1964973==    by 0x797AD1D: start_thread (in /usr/lib/libpthread-2.33.so)
==1964973==    by 0x6DD05BE: clone (in /usr/lib/libc-2.33.so)
==1964973==  Block was alloc'd at
==1964973==    at 0x483DF82: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==1964973==    by 0x6313078: ??? (in /usr/qt5/lib/libQt5Gui.so.5.15.2)
==1964973==    by 0x63131EE: QOpenGLFunctions::QOpenGLFunctions(QOpenGLContext*) (in /usr/qt5/lib/libQt5Gui.so.5.15.2)
==1964973==    by 0x6085211: QOpenGLContext::functions() const (in /usr/qt5/lib/libQt5Gui.so.5.15.2)
==1964973==    by 0x4E01EC4: QSGDefaultRenderContext::initialize(QSGRenderContext::InitParams const*) (in /usr/qt5/lib/libQt5Quick.so.5.15.2)
==1964973==    by 0x4E0F4DB: ??? (in /usr/qt5/lib/libQt5Quick.so.5.15.2)
==1964973==    by 0x66A58A9: ??? (in /usr/qt5/lib/libQt5Core.so.5.15.2)
==1964973==    by 0x797AD1D: start_thread (in /usr/lib/libpthread-2.33.so)
==1964973==    by 0x6DD05BE: clone (in /usr/lib/libc-2.33.so)

In the next days, I will try to reproduce it again with a QT debug build.
Comment 25 David Edmundson 2021-06-25 12:18:04 UTC
Found it:

 QPlatformOpenGLContext *QXcbIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
 {
-    QXcbScreen *screen = static_cast<QXcbScreen *>(context->screen()->handle());
-    QXcbGlIntegration *glIntegration = screen->connection()->glIntegration();
+    QXcbGlIntegration *glIntegration = defaultConnection()->glIntegration();



It appears it is fixed in Qt6 with 590ac717a2c073292027111d5c99d68fb17b160c

I'll see if we can get it backported.
Comment 26 dura 2021-06-25 14:13:39 UTC
1e39b39ddb478719682948bed329e891b26d7bf6 and 590ac717a2c073292027111d5c99d68fb17b160c apply cleanly on qt 5.15.2. Do you think it would be enough?
Comment 27 David Edmundson 2021-06-25 14:43:34 UTC
I would suggest taking https://invent.kde.org/qt/qt/qtbase/-/merge_requests/33 as a backportable patch.
Comment 28 David Edmundson 2021-06-28 17:07:56 UTC
*** Bug 439005 has been marked as a duplicate of this bug. ***
Comment 29 David Edmundson 2021-06-29 09:31:03 UTC
*** Bug 414823 has been marked as a duplicate of this bug. ***
Comment 30 David Redondo 2021-07-22 08:12:38 UTC
*** Bug 440124 has been marked as a duplicate of this bug. ***
Comment 31 Nate Graham 2021-08-30 16:12:25 UTC
*** Bug 441744 has been marked as a duplicate of this bug. ***
Comment 32 Nate Graham 2021-09-08 21:20:46 UTC
*** Bug 442126 has been marked as a duplicate of this bug. ***
Comment 33 Nate Graham 2021-10-25 23:12:49 UTC
*** Bug 444386 has been marked as a duplicate of this bug. ***
Comment 34 Nate Graham 2021-11-12 22:12:39 UTC
*** Bug 445327 has been marked as a duplicate of this bug. ***
Comment 35 Nate Graham 2021-11-23 22:30:46 UTC
*** Bug 445498 has been marked as a duplicate of this bug. ***
Comment 36 Nate Graham 2021-12-03 16:49:10 UTC
*** Bug 445498 has been marked as a duplicate of this bug. ***
Comment 37 Nate Graham 2022-01-12 01:33:07 UTC
*** Bug 447751 has been marked as a duplicate of this bug. ***
Comment 38 Szőts Ákos 2022-01-12 08:10:58 UTC
I see the backport was merged into KDE Qt repos 6 months ago. I use openSUSE Tumbleweed 20220103 with libqt5 5.15.2+kde268-1.1 (so its seems it has KDE patches).

For some reason I still daily meet this crash after I change monitor outputs (once for KWin after an Alt+Tab, then in Krunner when I press Alt+F2, finally in plasmashell when I click on volume slider).

In the distro libqt5 changelog (https://build.opensuse.org/package/view_file/openSUSE:Factory/libqt5-qtbase/libqt5-qtbase.changes?expand=1 ) I don't see the explicit mentioning of this backport fix, however, I do see that it's getting the sources from invent.kde (https://build.opensuse.org/package/view_file/openSUSE:Factory/libqt5-qtbase/_service?expand=1 )

My question is, how certain you are that this patch fixed the issue or should I post some backtraces to verify whether we're talking about the same crash?
Comment 39 Szőts Ákos 2022-01-27 22:40:38 UTC
I reported the phenomenon I referred above in Bug 449270 separately to be able to track it independently.
Comment 40 Nicolas Fella 2022-01-28 12:52:29 UTC
*** Bug 449288 has been marked as a duplicate of this bug. ***
Comment 41 Szőts Ákos 2022-02-04 19:03:30 UTC
Created attachment 146271 [details]
New crash information added by DrKonqi

plasmashell (5.23.4) using Qt 5.15.2

Unfortunately, it seems that the very same crash happens with the Qt patch applied (my libqt5-base version is 5.15.2+kde268). Once after each monitor input change I can reproduce it.

I understand that this is a Qt problem (presumably), however, the number of duplicates tells that it widely affects KDE users.

My question is, despite that this is an external problem, should we reopen it? Do other people face the same problem also with KDE-patched Qt?

-- Backtrace (Reduced):
#6  0x00007f32b4a46794 in QScreen::handle() const (this=0x559f268d9ca0) at kernel/qscreen.cpp:182
#7  0x00007f32aec95150 in QXcbGlxIntegration::createPlatformOpenGLContext(QOpenGLContext*) const (this=<optimized out>, context=0x7f32a80043b0) at qxcbglxintegration.cpp:195
#8  0x00007f32b4a63bed in QOpenGLContext::create() (this=0x7f32a80043b0) at kernel/qopenglcontext.cpp:612
#9  0x00007f32b60924b8 in QSGRenderThread::sync(bool, bool) (this=this@entry=0x559f29d4a650, inExpose=inExpose@entry=true, inGrab=inGrab@entry=false) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde36-1.3.x86_64/src/quick/scenegraph/qsgthreadedrenderloop.cpp:620
#10 0x00007f32b609425c in QSGRenderThread::syncAndRender(QImage*) (this=0x559f29d4a650, grabImage=0x0) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde36-1.3.x86_64/src/quick/scenegraph/qsgthreadedrenderloop.cpp:778
Comment 42 Nate Graham 2023-09-14 21:12:21 UTC
*** Bug 471417 has been marked as a duplicate of this bug. ***
Comment 43 Nate Graham 2023-09-20 19:15:01 UTC
*** Bug 474721 has been marked as a duplicate of this bug. ***
Comment 44 Nate Graham 2023-09-28 19:23:41 UTC
*** Bug 474935 has been marked as a duplicate of this bug. ***
Comment 45 Nate Graham 2023-10-11 21:29:48 UTC Comment hidden (spam)
Comment 46 Nate Graham 2023-10-11 21:30:11 UTC Comment hidden (spam)
Comment 47 Nate Graham 2023-10-11 21:30:23 UTC
*** Bug 475350 has been marked as a duplicate of this bug. ***
Comment 48 Nate Graham 2023-10-13 21:04:21 UTC
*** Bug 475545 has been marked as a duplicate of this bug. ***
Comment 49 Nate Graham 2023-10-16 19:47:23 UTC
*** Bug 475618 has been marked as a duplicate of this bug. ***
Comment 50 Nate Graham 2023-10-17 17:55:00 UTC
*** Bug 475739 has been marked as a duplicate of this bug. ***
Comment 51 Nate Graham 2023-10-27 15:37:54 UTC
*** Bug 415485 has been marked as a duplicate of this bug. ***
Comment 52 Nate Graham 2023-11-09 20:25:40 UTC
*** Bug 476713 has been marked as a duplicate of this bug. ***
Comment 53 Nicolas Fella 2023-12-23 14:34:52 UTC
*** Bug 478941 has been marked as a duplicate of this bug. ***
Comment 54 Nicolas Fella 2023-12-23 14:35:36 UTC
*** Bug 478183 has been marked as a duplicate of this bug. ***
Comment 55 fanzhuyifan 2024-01-26 07:34:57 UTC
*** Bug 480308 has been marked as a duplicate of this bug. ***
Comment 56 Nate Graham 2024-02-14 20:19:15 UTC
*** Bug 481190 has been marked as a duplicate of this bug. ***
Comment 57 Nate Graham 2024-02-15 02:51:36 UTC
*** Bug 481022 has been marked as a duplicate of this bug. ***
Comment 58 Nate Graham 2024-02-15 05:25:32 UTC
*** Bug 479408 has been marked as a duplicate of this bug. ***
Comment 59 Nate Graham 2024-03-04 19:25:06 UTC
Demoting this from being a VHI priority bug since the X11 session is no longer default in Plasma 6.

I'm also interested in learning whether anyone using X11 on Plasma 6 can still reproduce the issue.
Comment 60 Fabio C. Barrionuevo 2024-03-04 19:32:53 UTC
I use KDE Neon and preferably use X11 sessions. I did the update process for Plasma 6 via "sudo pkcon refresh && sudo pkcon update -v ; flatpak update -y" and then restarted.


I don't know if this is a new bug, however when putting KDE Neon into sleep mode and waking it up, instead of seeing the login screen I only see the mouse arrow on a 100% black screen on all monitors. The login screen does not return even after waiting a few minutes and then I am forced to open a terminal session (CRTL + ALT + F4) and perform a manual restart, which involves having to manually kill all instances of Google Chrome (so as not to lose my open tabs) and only then perform reboot.
Comment 61 Nate Graham 2024-03-04 19:36:04 UTC
That is a different bug, yes. This one is about a crash in QScreen::handle() after QXcbIntegration::createPlatformOpenGLContext().
Comment 62 nickquednow 2024-03-09 02:57:44 UTC
(In reply to Nate Graham from comment #59)
> Demoting this from being a VHI priority bug since the X11 session is no
> longer default in Plasma 6.
> 
> I'm also interested in learning whether anyone using X11 on Plasma 6 can
> still reproduce the issue.

I can test this on my Debian 12 system. I am not super fimiliar with the organization of the repositories, and I am assuming that I am targeting the xdg-desktop-portal-kde project?
Comment 63 Nate Graham 2024-03-10 03:07:51 UTC
You'll need to upgrade everything to Plasma 6, not just one package. It's something typically a distro does for you, either in your main repo once their ready, or a "testing" repo you enable yourself.

Regardless, let's avoid discussing the details of how to perform system upgrades, as 36 people are CCd to this bug report and probably will not appreciate the email spam resulting from it.
Comment 64 Nate Graham 2024-04-09 22:44:47 UTC
*** Bug 483633 has been marked as a duplicate of this bug. ***
Comment 65 David Edmundson 2024-06-02 16:50:31 UTC
*** Bug 487909 has been marked as a duplicate of this bug. ***
Comment 66 David Edmundson 2024-06-02 16:50:33 UTC
*** Bug 485021 has been marked as a duplicate of this bug. ***
Comment 67 David Edmundson 2024-07-15 13:03:21 UTC
*** Bug 489744 has been marked as a duplicate of this bug. ***
Comment 68 David Edmundson 2024-07-15 13:03:33 UTC
*** Bug 474368 has been marked as a duplicate of this bug. ***
Comment 69 Nate Graham 2024-08-13 19:04:11 UTC
*** Bug 483134 has been marked as a duplicate of this bug. ***
Comment 70 Nate Graham 2024-08-13 20:36:22 UTC
*** Bug 491439 has been marked as a duplicate of this bug. ***
Comment 71 Nate Graham 2024-08-15 13:57:10 UTC
*** Bug 491747 has been marked as a duplicate of this bug. ***
Comment 72 Nate Graham 2024-08-27 18:47:42 UTC
*** Bug 492190 has been marked as a duplicate of this bug. ***
Comment 73 Nate Graham 2024-08-28 18:22:01 UTC
*** Bug 492317 has been marked as a duplicate of this bug. ***
Comment 74 David Edmundson 2024-09-26 21:28:58 UTC
There appear to be no new traces on Qt 6. Given the crash is deep in Qt code and RHI refactored a lot I think we can call this resolved.