Bug 492886 - KSVG appears to cause crashes in many Plasma6 applications
Summary: KSVG appears to cause crashes in many Plasma6 applications
Status: REPORTED
Alias: None
Product: frameworks-ksvg
Classification: Frameworks and Libraries
Component: General (show other bugs)
Version: 6.5.0
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-09 14:00 UTC by localtoast
Modified: 2024-09-17 23:01 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description localtoast 2024-09-09 14:00:28 UTC
SUMMARY
Several Gentoo users have reported segfaults in a range of Plasma6 applications including kwin, kscreenlocker, plasmashell, etc. Common symptom appears to be a report of a segfault and "Unable to access opcode bytes at <location> from the kernel in syslog. As well as process names, the kernel reports segfaults in QQuickPixmapRea. The crash is present in X and Wayland, and in at least one case also affects sddm.

This was never, and continues to not, be an issue when running Plasma 5 for any of the affected users. Current workaround is to downgrade to Plasma 5, but as 5 is due to be cleaned up from the Gentoo repos, this will not remain a workable solution long-term.

It appears that affected users are on amdgpu based laptop hardware, details of my own are listed below.

Other user accounts, omitted here, are also available in this thread: https://forums.gentoo.org/viewtopic-t-1169619-postdays-0-postorder-asc-start-0.html

STEPS TO REPRODUCE
1. Attempt to start any of sddm, plasmashell, dbus-run-session startplasma-{x11|wayland}, kwin

OBSERVED RESULT

Black screen, syslog entries as below under "Additional Information", eventual crash and switching user to TTY1

EXPECTED RESULT

An sddm login screen or Plasma session should start.

SOFTWARE/OS VERSIONS
Linux: 6.6.47 (also tested and affected, 6.6.38)
KDE Plasma Version: 6.1.4-r1
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2-r4

ADDITIONAL INFORMATION

Sample /var/log/syslog from sddm start on bootup:

Sep  4 19:09:54 kernel: show_signal_msg: 50 callbacks suppressed
Sep  4 19:09:54 kernel: QQuickPixmapRea[5615]: segfault at 0 ip 0000000000000000 sp 00007f2736b615f8 error 14 in sddm-greeter-qt6[5648f00bd000+c000] likely on CPU 0 (core 0, socket 0)
Sep  4 19:09:54 kernel: Code: Unable to access opcode bytes at 0xffffffffffffffd6.


Specimen /var/log/syslog from a direct launch of dbus-run-session startplasma-wayland:

Sep  4 19:20:36 dbus-daemon[3227]: [system] Successfully activated service 'org.freedesktop.RealtimeKit1'
Sep  4 19:20:38 kernel: QQuickPixmapRea[17045]: segfault at 0 ip 0000000000000000 sp 00007fffb4ff8538 error 14 in ksplashqml[555555554000+5000] likely on CPU 1 (core 1, socket 0)
Sep  4 19:20:38 kernel: Code: Unable to access opcode bytes at 0xffffffffffffffd6.
Sep  4 19:20:39 libddcutil[17144]: Initializing.  ddcutil version 1.3.0
Sep  4 19:20:39 libddcutil[17144]: Library initialization complete.

[...omitted successful startup of rtkit, bluetoothd, UPower, UDisks, etc...]

Sep  4 19:20:39 dbus-daemon[3227]: [system] Successfully activated service 'org.kde.powerdevil.chargethresholdhelper'
Sep  4 19:20:40 kernel: xwaylandvideobr[17188]: segfault at 0 ip 0000000000000000 sp 00007fffffffc998 error 14 in xwaylandvideobridge[555555554000+7000] likely on CPU 0 (core 0, socket 0)
Sep  4 19:20:40 kernel: Code: Unable to access opcode bytes at 0xffffffffffffffd6.
Sep  4 19:20:40 dbus-daemon[3227]: [system] Activating service name='org.kde.powerdevil.backlighthelper' requested by ':1.43' (uid=1000 pid=17144 comm="/usr/libexec/org_kde_powerdevil") (using servicehelper)
Sep  4 19:20:40 org.kde.powerdevil.backlighthelper: Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8. Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead. If this causes problems, reconfigure your locale. See the locale(1) manual for more information.
Sep  4 19:20:40 dbus-daemon[3227]: [system] Successfully activated service 'org.kde.powerdevil.backlighthelper'
Sep  4 12:20:40 rtkit-daemon[16962]: Successfully made thread 17176 of process 17176 owned by '1000' high priority at nice level -11.
Sep  4 19:20:40 kernel: kwin_wayland[16924]: segfault at 0 ip 0000000000000000 sp 00007ffc62e94848 error 14 in kwin_wayland[5555f8c82000+38000] likely on CPU 0 (core 0, socket 0)
Sep  4 19:20:40 kernel: Code: Unable to access opcode bytes at 0xffffffffffffffd6.
Sep  4 19:20:43 kernel: plasmashell[17626]: segfault at 0 ip 0000000000000000 sp 00007fffffffbfe8 error 14 in plasmashell[555555554000+23000] likely on CPU 1 (core 1, socket 0)
Sep  4 19:20:43 kernel: Code: Unable to access opcode bytes at 0xffffffffffffffd6.
Sep  4 19:20:43 GalaxyBudsClient: [X11Platform] SMLib/ICELib reported a new error: Could not open network socket
Sep  4 19:20:49 kernel: kwin_wayland[17595]: segfault at 0 ip 0000000000000000 sp 00007ffc196350e8 error 14 in kwin_wayland[5587bd422000+38000] likely on CPU 1 (core 1, socket 0)
Sep  4 19:20:49 kernel: Code: Unable to access opcode bytes at 0xffffffffffffffd6.
Sep  4 19:20:53 bluetoothd[3826]: src/profile.c:record_cb() Unable to get Hands-Free Voice gateway SDP record: Host is down
Sep  4 19:24:04 kernel: kscreenlocker_g[19091]: segfault at 0 ip 0000000000000000 sp 00007ffcd30a8138 error 14 in kscreenlocker_greet[5631bc19a000+d000] likely on CPU 1 (core 1, socket 0)
Sep  4 19:24:04 kernel: Code: Unable to access opcode bytes at 0xffffffffffffffd6.


Full backtrace, running plasmashell:

Starting program: /usr/bin/plasmashell 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib64/libthread_db.so.1".
[New Thread 0x7fffef1ff6c0 (LWP 28218)]
[Detaching after fork from child process 28219]
[New Thread 0x7fffee9fe6c0 (LWP 28220)]
[New Thread 0x7fffec9ff6c0 (LWP 28239)]
[New Thread 0x7fffd85ff6c0 (LWP 28240)]
[New Thread 0x7fffd7dfe6c0 (LWP 28241)]
[New Thread 0x7fffd75fd6c0 (LWP 28242)]
[New Thread 0x7fffd69fc6c0 (LWP 28243)]
[New Thread 0x7fffd61fb6c0 (LWP 28244)]
[New Thread 0x7fffd59fa6c0 (LWP 28245)]
[New Thread 0x7fffd51f96c0 (LWP 28246)]
[New Thread 0x7fffd49f86c0 (LWP 28247)]
[New Thread 0x7fffb7fff6c0 (LWP 28248)]
[New Thread 0x7fffb77fe6c0 (LWP 28249)]
[New Thread 0x7fffb6ffd6c0 (LWP 28250)]
[Thread 0x7fffb6ffd6c0 (LWP 28250) exited]
[Thread 0x7fffb77fe6c0 (LWP 28249) exited]
[Thread 0x7fffb7fff6c0 (LWP 28248) exited]
[New Thread 0x7fffb7fff6c0 (LWP 28257)]
[New Thread 0x7fffb77fe6c0 (LWP 28258)]
[New Thread 0x7fffb6ffd6c0 (LWP 28259)]
[Thread 0x7fffb6ffd6c0 (LWP 28259) exited]
[Thread 0x7fffb77fe6c0 (LWP 28258) exited]
[Thread 0x7fffb7fff6c0 (LWP 28257) exited]
[New Thread 0x7fffb7fff6c0 (LWP 28260)]

Thread 1 "plasmashell" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
#0  0x0000000000000000 in ??? ()
#1  0x00007ffff797ceac in KSvg::FrameSvgPrivate::generateFrameBackground (this=this@entry=0x555555e56440, frame=...) at /var/tmp/portage/kde-frameworks/ksvg-6.5.0/work/ksvg-6.5.0/src/ksvg/framesvg.cpp:619
#2  0x00007ffff797d680 in KSvg::FrameSvgPrivate::generateBackground (this=this@entry=0x555555e56440, frame=...) at /var/tmp/portage/kde-frameworks/ksvg-6.5.0/work/ksvg-6.5.0/src/ksvg/framesvg.cpp:547
#3  0x00007ffff797c6cd in KSvg::FrameSvgPrivate::generateBackground (frame=..., this=0x555555e56440) at /var/tmp/portage/kde-frameworks/ksvg-6.5.0/work/ksvg-6.5.0/src/ksvg/framesvg.cpp:486
#4  KSvg::FrameSvgPrivate::alphaMask (this=0x555555e56440) at /var/tmp/portage/kde-frameworks/ksvg-6.5.0/work/ksvg-6.5.0/src/ksvg/framesvg.cpp:486
#5  0x00007ffff797ec45 in KSvg::FrameSvg::mask (this=0x555555e2d1d0) at /var/tmp/portage/kde-frameworks/ksvg-6.5.0/work/ksvg-6.5.0/src/ksvg/framesvg.cpp:342
#6  0x00007fffb5660b2f in KSvg::FrameSvgItem::mask (this=0x555555c58670) at /var/tmp/portage/kde-frameworks/ksvg-6.5.0/work/ksvg-6.5.0/src/declarativeimports/framesvgitem.cpp:500
#7  KSvg::FrameSvgItem::qt_static_metacall (_o=0x555555c58670, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /var/tmp/portage/kde-frameworks/ksvg-6.5.0/work/ksvg-6.5.0_build/src/declarativeimports/corebindingsplugin_autogen/include/moc_framesvgitem.cpp:486
#8  0x00007fffb566247f in KSvg::FrameSvgItem::qt_metacall (this=0x555555c58670, _c=QMetaObject::ReadProperty, _id=9, _a=0x7fffffffc920) at /var/tmp/portage/kde-frameworks/ksvg-6.5.0/work/ksvg-6.5.0_build/src/declarativeimports/corebindingsplugin_autogen/include/moc_framesvgitem.cpp:538
#9  0x00007ffff54e852f in QMetaProperty::read (this=this@entry=0x7fffffffca20, object=object@entry=0x555555c58670) at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qmetaobject.cpp:3734
#10 0x00007ffff546f398 in QObject::property (this=0x555555c58670, name=<optimized out>, name@entry=0x7ffff7d0cc5a "mask") at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobject.cpp:4316
#11 0x00007ffff7ce964a in PlasmaQuick::DialogBackground::mask (this=<optimized out>) at /var/tmp/portage/kde-plasma/libplasma-6.1.4/work/libplasma-6.1.4/src/plasmaquick/private/dialogbackground_p.cpp:60
#12 0x00007ffff7cc6856 in PlasmaQuick::DialogPrivate::updateTheme (this=0x555555e2a5a0) at /var/tmp/portage/kde-plasma/libplasma-6.1.4/work/libplasma-6.1.4/src/plasmaquick/dialog.cpp:245
#13 0x00007ffff637e122 in QQmlObjectCreator::finalize(QQmlInstantiationInterrupt&) () at /usr/lib64/libQt6Qml.so.6
#14 0x00007ffff641ab98 in QQmlComponentPrivate::complete(QQmlEnginePrivate*, QQmlComponentPrivate::ConstructionState*) () at /usr/lib64/libQt6Qml.so.6
#15 0x00007ffff64476eb in QQmlComponentPrivate::completeCreate() () at /usr/lib64/libQt6Qml.so.6
#16 0x00007ffff7ce1332 in PlasmaQuick::SharedQmlEngine::completeInitialization (this=0x7fffe0006240, initialProperties=<optimized out>) at /var/tmp/portage/kde-plasma/libplasma-6.1.4/work/libplasma-6.1.4/src/plasmaquick/sharedqmlengine.cpp:239
#17 0x00007ffff7ce1449 in PlasmaQuick::SharedQmlEnginePrivate::scheduleExecutionEnd (this=0x555555ead2a0) at /usr/include/qt6/QtCore/qhash.h:836
#18 0x00007ffff7ce3680 in PlasmaQuick::QuickViewSharedEngine::setSource (url=..., this=0x555555dbeec0) at /var/tmp/portage/kde-plasma/libplasma-6.1.4/work/libplasma-6.1.4/src/plasmaquick/quickviewsharedengine.cpp:214
#19 PlasmaQuick::QuickViewSharedEngine::setSource (this=this@entry=0x555555dbeec0, url=...) at /var/tmp/portage/kde-plasma/libplasma-6.1.4/work/libplasma-6.1.4/src/plasmaquick/quickviewsharedengine.cpp:208
#20 0x000055555559c8cc in DesktopView::DesktopView (this=this@entry=0x555555dbeec0, corona=corona@entry=0x555555795c10, targetScreen=targetScreen@entry=0x5555556b49a0) at /var/tmp/portage/kde-plasma/plasma-workspace-6.1.4-r1/work/plasma-workspace-6.1.4/shell/desktopview.cpp:65
#21 0x00005555555badd9 in ShellCorona::addOutput (this=0x555555795c10, screen=0x5555556b49a0) at /var/tmp/portage/kde-plasma/plasma-workspace-6.1.4-r1/work/plasma-workspace-6.1.4/shell/shellcorona.cpp:1405
#22 0x00005555555cb02a in ShellCorona::load (this=<optimized out>) at /var/tmp/portage/kde-plasma/plasma-workspace-6.1.4-r1/work/plasma-workspace-6.1.4/shell/shellcorona.cpp:842
#23 0x00007ffff54ca9ed in QtPrivate::QSlotObjectBase::call (a=0x7fffffffd2a0, r=0x555555795c10, this=<optimized out>) at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobjectdefs_impl.h:469
#24 doActivate<false> (sender=0x555555aeffe0, signal_index=4, argv=0x7fffffffd2a0) at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobject.cpp:4086
#25 0x00007ffff5489fa7 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7ffff710daa0 <KActivities::Consumer::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fffffffd2a0) at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobject.cpp:4146
#26 0x00007ffff70df955 in KActivities::Consumer::serviceStatusChanged (this=<optimized out>, _t1=<optimized out>) at /var/tmp/portage/kde-plasma/plasma-activities-6.1.4/work/plasma-activities-6.1.4_build/src/lib/PlasmaActivities_autogen/include/moc_consumer.cpp:258
#27 0x00007ffff54ca9ed in QtPrivate::QSlotObjectBase::call (a=0x7fffffffd440, r=0x555555aeffe0, this=<optimized out>) at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobjectdefs_impl.h:469
#28 doActivate<false> (sender=0x555555aff9c0, signal_index=11, argv=0x7fffffffd440) at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobject.cpp:4086
#29 0x00007ffff5489fa7 in QMetaObject::activate (sender=sender@entry=0x555555aff9c0, m=m@entry=0x7ffff710ebc0 <KActivities::ActivitiesCache::staticMetaObject>, local_signal_index=local_signal_index@entry=8, argv=argv@entry=0x7fffffffd440) at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobject.cpp:4146
#30 0x00007ffff70f43dc in KActivities::ActivitiesCache::serviceStatusChanged (_t1=KActivities::Consumer::Running, this=0x555555aff9c0) at /var/tmp/portage/kde-plasma/plasma-activities-6.1.4/work/plasma-activities-6.1.4_build/src/lib/PlasmaActivities_autogen/include/moc_activitiescache_p.cpp:481
#31 KActivities::ActivitiesCache::setAllActivities (this=0x555555aff9c0, _activities=<optimized out>) at /var/tmp/portage/kde-plasma/plasma-activities-6.1.4/work/plasma-activities-6.1.4/src/lib/activitiescache_p.cpp:270
#32 0x00007ffff70f8d82 in KActivities::ActivitiesCache::passInfoFromReply<QList<ActivityInfo>, void (KActivities::ActivitiesCache::*)(QList<ActivityInfo> const&)> (this=0x555555aff9c0, watcher=0x555555a6d5d0, f=(void (KActivities::ActivitiesCache::*)(KActivities::ActivitiesCache * const, const QList<ActivityInfo> &)) 0x7ffff70f3e60 <KActivities::ActivitiesCache::setAllActivities(QList<ActivityInfo> const&)>) at /var/tmp/portage/kde-plasma/plasma-activities-6.1.4/work/plasma-activities-6.1.4/src/lib/activitiescache_p.cpp:180
#33 0x00007ffff54cacf3 in doActivate<false> (sender=0x555555a6d5d0, signal_index=3, argv=0x7fffffffd620) at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobject.cpp:4098
#34 0x00007ffff5489fa7 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7ffff59fa540 <QDBusPendingCallWatcher::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffffffd620) at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobject.cpp:4146
#35 0x00007ffff5963623 in QDBusPendingCallWatcher::finished (this=<optimized out>, _t1=<optimized out>) at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2_build/src/dbus/DBus_autogen/include/moc_qdbuspendingcall.cpp:160
#36 0x00007ffff546dceb in QObject::event (this=0x555555a6d5d0, e=0x555555b055a0) at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobject.cpp:1452
#37 0x00007ffff76f2de5 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x555555a6d5d0, e=0x555555b055a0) at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/widgets/kernel/qapplication.cpp:3287
#38 0x00007ffff54e20e0 in QCoreApplication::notifyInternal2 (receiver=0x555555a6d5d0, event=0x555555b055a0) at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qcoreapplication.cpp:1142
#39 0x00007ffff54e217d in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qcoreapplication.cpp:1583
#40 0x00007ffff550753e in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x555555649ba0) at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qcoreapplication.cpp:1940
#41 0x00007ffff55077a4 in QCoreApplication::sendPostedEvents (receiver=<optimized out>, event_type=<optimized out>) at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qcoreapplication.cpp:1797
#42 0x00007ffff52c2fdf in postEventSourceDispatch (s=0x5555556aea10) at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qeventdispatcher_glib.cpp:244
#43 0x00007ffff401d382 in ??? () at /usr/lib64/libglib-2.0.so.0
#44 0x00007ffff4020407 in ??? () at /usr/lib64/libglib-2.0.so.0
#45 0x00007ffff40209c8 in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#46 0x00007ffff52c16b0 in QEventDispatcherGlib::processEvents (this=0x5555556c3050, flags=...) at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qeventdispatcher_glib.cpp:394
#47 0x00007ffff550c262 in QEventLoop::exec (this=this@entry=0x7fffffffda10, flags=..., flags@entry=...) at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/corelib/global/qflags.h:34
#48 0x00007ffff550c417 in QCoreApplication::exec () at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/corelib/global/qflags.h:74
#49 0x00007ffff5b60720 in QGuiApplication::exec () at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/gui/kernel/qguiapplication.cpp:1926
#50 0x00007ffff766abf9 in QApplication::exec () at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/widgets/kernel/qapplication.cpp:2555
#51 0x0000555555580d1a in main (argc=<optimized out>, argv=<optimized out>) at /var/tmp/portage/kde-plasma/plasma-workspace-6.1.4-r1/work/plasma-workspace-6.1.4/shell/main.cpp:188


Graphics hardware:

00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Wani [Radeon R5/R6/R7 Graphics] (rev c8) (prog-if 00 [VGA controller])
        Subsystem: Acer Incorporated [ALI] Device 1108
        Flags: bus master, fast devsel, latency 0, IRQ 31, IOMMU group 0
        Memory at e0000000 (64-bit, prefetchable) [size=256M]
        Memory at d0800000 (64-bit, prefetchable) [size=8M]
        I/O ports at 4000 [size=256]
        Memory at d1600000 (32-bit, non-prefetchable) [size=256K]
        Expansion ROM at 000c0000 [disabled] [size=128K]
        Capabilities: [48] Vendor Specific Information: Len=08 <?>
        Capabilities: [50] Power Management version 3
        Capabilities: [58] Express Root Complex Integrated Endpoint, IntMsgNum 0
        Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
        Capabilities: [270] Secondary PCI Express
        Capabilities: [2b0] Address Translation Service (ATS)
        Capabilities: [2c0] Page Request Interface (PRI)
        Capabilities: [2d0] Process Address Space ID (PASID)
        Kernel driver in use: amdgpu
        Kernel modules: amdgpu

03:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445 / 530/535 / 620/625 Mobile] (rev 83)
        Subsystem: Acer Incorporated [ALI] Device 1108
        Physical Slot: 0
        Flags: bus master, fast devsel, latency 0, IRQ 33, IOMMU group 2
        Memory at c0000000 (64-bit, prefetchable) [size=256M]
        Memory at d0000000 (64-bit, prefetchable) [size=2M]
        I/O ports at 2000 [size=256]
        Memory at d1400000 (32-bit, non-prefetchable) [size=256K]
        Expansion ROM at d1440000 [disabled] [size=128K]
        Capabilities: [48] Vendor Specific Information: Len=08 <?>
        Capabilities: [50] Power Management version 3
        Capabilities: [58] Express Legacy Endpoint, IntMsgNum 0
        Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
        Capabilities: [150] Advanced Error Reporting
        Capabilities: [270] Secondary PCI Express
        Capabilities: [2b0] Address Translation Service (ATS)
        Capabilities: [2c0] Page Request Interface (PRI)
        Capabilities: [2d0] Process Address Space ID (PASID)
        Kernel driver in use: amdgpu
        Kernel modules: amdgpu

~ $ cat /proc/cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 21
model           : 101
model name      : AMD FX-9800P RADEON R7, 12 COMPUTE CORES 4C+8G
stepping        : 1
microcode       : 0x6006118
cpu MHz         : 1400.000
cache size      : 1024 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 2
apicid          : 16
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good acc_power nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm topoext perfctr_core perfctr_nb bpext ptsc mwaitx cpb hw_pstate ssbd vmmcall fsgsbase bmi1 avx2 smep bmi2 xsaveopt arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov
bugs            : fxsave_leak sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass retbleed
bogomips        : 5392.52
TLB size        : 1536 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm 100mhzsteps hwpstate cpb eff_freq_ro acc_power [13]
[...]
Comment 1 Sam James 2024-09-09 14:38:22 UTC
One of the other backtraces we had in the thread was:
```

Thread 1 "konsole" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ??? ()
#1  0x00007ffff6134fc9 in qt_memfill<unsigned int> (dest=0x555556c5cf40, color=0, count=64)
    at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/gui/painting/qdrawhelper_p.h:916
#2  0x00007ffff613184b in qt_rectfill<unsigned int> (dest=0x555556c5cf40, value=0, x=0, y=0, width=8, height=8, stride=32)
    at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/gui/painting/qdrawhelper_p.h:940
#3  0x00007ffff6125be7 in QImage::fill (this=0x555556c67960, pixel=0)
    at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/gui/image/qimage.cpp:1829
#4  0x00007ffff6125d81 in QImage::fill (this=0x555556c67960, color=...)
    at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/gui/image/qimage.cpp:1885
#5  0x00007ffff6176213 in QRasterPlatformPixmap::fill (this=0x555556c67930, color=...)
    at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/gui/image/qpixmap_raster.cpp:164
#6  0x00007ffff6172382 in QPixmap::fill (this=0x7fffffffd360, color=...)
    at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/gui/image/qpixmap.cpp:878
#7  0x00007fffecee635d in Breeze::Style::toolBarExtensionIcon
    (this=0x555555619e10, standardPixmap=QStyle::SP_ToolBarHorizontalExtensionButton, option=0x0, widget=0x555557276390)
    at /var/tmp/portage/kde-plasma/breeze-6.1.4/work/breeze-6.1.4/kstyle/breezestyle.cpp:8122
#8  0x00007fffecec77a4 in Breeze::Style::standardIconImplementation
    (this=0x555555619e10, standardPixmap=QStyle::SP_ToolBarHorizontalExtensionButton, option=0x0, widget=0x555557276390)
    at /var/tmp/portage/kde-plasma/breeze-6.1.4/work/breeze-6.1.4/kstyle/breezestyle.cpp:2076
#9  0x00007fffece6c51c in Breeze::Style::standardIcon
    (this=0x555555619e10, pixmap=QStyle::SP_ToolBarHorizontalExtensionButton, option=0x0, widget=0x555557276390)
    at /var/tmp/portage/kde-plasma/breeze-6.1.4/work/breeze-6.1.4_build/kstyle6/breeze6_autogen/EWIEGA46WW/../../../../breeze-6.1.4/kstyle/breezestyle.h:166
#10 0x00007ffff7509a1b in QProxyStyle::standardIcon
    (this=0x5555555fde30, standardIcon=QStyle::SP_ToolBarHorizontalExtensionButton, option=0x0, widget=0x555557276390)
    at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/widgets/styles/qproxystyle.cpp:380
#11 0x00007ffff72c6a2a in QMenuBarExtension::QMenuBarExtension (this=0x555555eeeee0, parent=0x555557276390)
    at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/widgets/widgets/qmenubar.cpp:57
#12 0x00007ffff72c9692 in QMenuBarPrivate::init (this=0x55555725a870)
    at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/widgets/widgets/qmenubar.cpp:678
#13 0x00007ffff72c98e6 in QMenuBar::QMenuBar (this=0x555557276390, parent=0x555556975eb0)
    at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/widgets/widgets/qmenubar.cpp:711
#14 0x00007ffff728e7c6 in QMainWindow::menuBar (this=0x555556975eb0)
    at /var/tmp/portage/dev-qt/qtbase-6.7.2-r4/work/qtbase-everywhere-src-6.7.2/src/widgets/widgets/qmainwindow.cpp:470
#15 0x00007ffff7f6de2f in Konsole::MainWindow::setupActions() () at /usr/lib64/libkonsoleapp.so.24.05.2
#16 0x00007ffff7f6fc1d in Konsole::MainWindow::MainWindow() () at /usr/lib64/libkonsoleapp.so.24.05.2
#17 0x00007ffff7f62243 in Konsole::Application::newMainWindow() () at /usr/lib64/libkonsoleapp.so.24.05.2
#18 0x00007ffff7f63588 in Konsole::Application::processWindowArgs(bool&) () at /usr/lib64/libkonsoleapp.so.24.05.2
#19 0x00007ffff7f6540a in Konsole::Application::newInstance() () at /usr/lib64/libkonsoleapp.so.24.05.2
#20 0x0000555555559426 in ??? ()
#21 0x00007ffff505e320 in ??? () at /usr/lib64/libc.so.6
#22 0x00007ffff505e3d9 in __libc_start_main () at /usr/lib64/libc.so.6
#23 0x0000555555559535 in ??? ()
(gdb) 
```

Arsen and I both looked at it and couldn't spot anything obvious in ksvg->qtbase though.
Comment 2 Sam James 2024-09-09 14:55:23 UTC
Are you able to reproduce it under Valgrind by the way? I remember asking on the forums about ASAN + UBSAN but I don't remember if anyone tried it or it got any results.
Comment 3 localtoast 2024-09-09 16:12:27 UTC
(In reply to Sam James from comment #2)
> Are you able to reproduce it under Valgrind by the way? I remember asking on
> the forums about ASAN + UBSAN but I don't remember if anyone tried it or it
> got any results.

I have the following valgrind output, which I doubt is useful. Libc is not compiled with debug symbols yet (truthfully I'm not super keen on doing that if not absolutely necessary), and this is my first ever attempt at debugging anything with valgrind.

==9216== Memcheck, a memory error detector
==9216== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al.
==9216== Using Valgrind-3.23.1.GIT and LibVEX; rerun with -h for copyright info
==9216== Command: plasmashell
==9216== 
vex amd64->IR: unhandled instruction bytes: 0x8F 0xEA 0x78 0x10 0xD0 0x8 0x4 0x0 0x0 0x89
vex amd64->IR:   REX=0 REX.W=0 REX.R=0 REX.X=0 REX.B=0
vex amd64->IR:   VEX=0 VEX.L=0 VEX.nVVVV=0x0 ESC=NONE
vex amd64->IR:   PFX.66=0 PFX.F2=0 PFX.F3=0
==9216== valgrind: Unrecognised instruction at address 0x4014eaf.
==9216==    at 0x4014EAF: get_common_indices.constprop.0 (in /usr/lib64/ld-linux-x86-64.so.2)
==9216==    by 0x4016C77: init_cpu_features.constprop.0 (in /usr/lib64/ld-linux-x86-64.so.2)
==9216==    by 0x4017148: _dl_x86_init_cpu_features (in /usr/lib64/ld-linux-x86-64.so.2)
==9216==    by 0x401ADE7: _dl_sysdep_start (in /usr/lib64/ld-linux-x86-64.so.2)
==9216==    by 0x401C52B: _dl_start (in /usr/lib64/ld-linux-x86-64.so.2)
==9216==    by 0x401B417: ??? (in /usr/lib64/ld-linux-x86-64.so.2)
==9216== Your program just tried to execute an instruction that Valgrind
==9216== did not recognise.  There are two possible reasons for this.
==9216== 1. Your program has a bug and erroneously jumped to a non-code
==9216==    location.  If you are running Memcheck and you just saw a
==9216==    warning about a bad jump, it's probably your program's fault.
==9216== 2. The instruction is legitimate but Valgrind doesn't handle it,
==9216==    i.e. it's Valgrind's fault.  If you think this is the case or
==9216==    you are not sure, please let us know and we'll try to fix it.
==9216== Either way, Valgrind will now raise a SIGILL signal which will
==9216== probably kill your program.
==9216== 
==9216== Process terminating with default action of signal 4 (SIGILL)
==9216==  Illegal opcode at address 0x4014EAF
==9216==    at 0x4014EAF: get_common_indices.constprop.0 (in /usr/lib64/ld-linux-x86-64.so.2)
==9216==    by 0x4016C77: init_cpu_features.constprop.0 (in /usr/lib64/ld-linux-x86-64.so.2)
==9216==    by 0x4017148: _dl_x86_init_cpu_features (in /usr/lib64/ld-linux-x86-64.so.2)
==9216==    by 0x401ADE7: _dl_sysdep_start (in /usr/lib64/ld-linux-x86-64.so.2)
==9216==    by 0x401C52B: _dl_start (in /usr/lib64/ld-linux-x86-64.so.2)
==9216==    by 0x401B417: ??? (in /usr/lib64/ld-linux-x86-64.so.2)
==9216== 
==9216== HEAP SUMMARY:
==9216==     in use at exit: 0 bytes in 0 blocks
==9216==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==9216== 
==9216== All heap blocks were freed -- no leaks are possible
==9216== 
==9216== For lists of detected and suppressed errors, rerun with: -s
==9216== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Comment 4 Sam James 2024-09-09 17:59:32 UTC
That Valgrind issue looks like a bug in Valgrind, see https://bugs.kde.org/show_bug.cgi?id=381819. You can try the patch there or just try ASAN and UBSAN instead.
Comment 5 localtoast 2024-09-10 14:47:27 UTC
(In reply to Sam James from comment #4)
> That Valgrind issue looks like a bug in Valgrind, see
> https://bugs.kde.org/show_bug.cgi?id=381819. You can try the patch there or
> just try ASAN and UBSAN instead.

Thanks for the direction. I patched valgrind and ran again. Still got exactly the same error, but also some output which might be more relevant:


==1135== Memcheck, a memory error detector
==1135== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al.
==1135== Using Valgrind-3.23.1.GIT and LibVEX; rerun with -h for copyright info
==1135== Command: plasmashell
==1135== 
Detected locale "en_US.iso88591" with character encoding "ISO-8859-1", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "en_US.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
==1135== Syscall param writev(vector[0]) points to uninitialised byte(s)
==1135==    at 0x76A59DF: writev (in /usr/lib64/libc.so.6)
==1135==    by 0x4BF3702: ??? (in /usr/lib64/libxcb.so.1.1.0)
==1135==    by 0x4BF3F70: ??? (in /usr/lib64/libxcb.so.1.1.0)
==1135==    by 0x4BF5574: ??? (in /usr/lib64/libxcb.so.1.1.0)
==1135==    by 0x4BF55EE: xcb_wait_for_reply (in /usr/lib64/libxcb.so.1.1.0)
==1135==    by 0xD8BA5D2: QXcbConnection::initializeScreensFromMonitor(xcb_screen_iterator_t*, int, QXcbScreen**, bool) (qxcbconnection_screens.cpp:501)
==1135==    by 0xD8BBCD7: QXcbConnection::initializeScreens(bool) (qxcbconnection_screens.cpp:317)
==1135==    by 0xD8B3018: QXcbConnection::QXcbConnection(QXcbNativeInterface*, bool, unsigned int, char const*) (qxcbconnection.cpp:72)
==1135==    by 0xD8D600D: QXcbIntegration::QXcbIntegration(QList<QString> const&, int&, char**) (qxcbintegration.cpp:170)
==1135==    by 0x48584E7: QXcbIntegrationPlugin::create(QString const&, QList<QString> const&, int&, char**) (qxcbmain.cpp:22)
==1135==    by 0x66F46B7: init_platform(QString const&, QString const&, QString const&, int&, char**) (qguiapplication.cpp:1249)
==1135==    by 0x66F760F: QGuiApplicationPrivate::createPlatformIntegration() (qguiapplication.cpp:1533)
==1135==  Address 0xcf5c115 is 4,533 bytes inside a block of size 21,176 alloc'd
==1135==    at 0x4847B6B: calloc (vg_replace_malloc.c:1675)
==1135==    by 0x4BF30DF: xcb_connect_to_fd (in /usr/lib64/libxcb.so.1.1.0)
==1135==    by 0x4BF7BC8: xcb_connect_to_display_with_auth_info (in /usr/lib64/libxcb.so.1.1.0)
==1135==    by 0x8218699: _XConnectXCB (in /usr/lib64/libX11.so.6.4.0)
==1135==    by 0x8209288: XOpenDisplay (in /usr/lib64/libX11.so.6.4.0)
==1135==    by 0xD8B7D92: QXcbBasicConnection::QXcbBasicConnection(char const*) (qxcbconnection_basic.cpp:77)
==1135==    by 0xD8B2E13: QXcbConnection::QXcbConnection(QXcbNativeInterface*, bool, unsigned int, char const*) (qxcbconnection.cpp:62)
==1135==    by 0xD8D600D: QXcbIntegration::QXcbIntegration(QList<QString> const&, int&, char**) (qxcbintegration.cpp:170)
==1135==    by 0x48584E7: QXcbIntegrationPlugin::create(QString const&, QList<QString> const&, int&, char**) (qxcbmain.cpp:22)
==1135==    by 0x66F46B7: init_platform(QString const&, QString const&, QString const&, int&, char**) (qguiapplication.cpp:1249)
==1135==    by 0x66F760F: QGuiApplicationPrivate::createPlatformIntegration() (qguiapplication.cpp:1533)
==1135==    by 0x66F81E7: QGuiApplicationPrivate::createEventDispatcher() (qguiapplication.cpp:1552)
==1135==  Uninitialised value was created by a stack allocation
==1135==    at 0xD8A2510: ??? (in /usr/lib64/libQt6XcbQpa.so.6.7.2)
==1135== 
vex amd64->IR: unhandled instruction bytes: 0x8F 0xE8 0x70 0xA2 0xC3 0x0 0xC5 0xFB 0x11 0x83
vex amd64->IR:   REX=0 REX.W=0 REX.R=0 REX.X=0 REX.B=0
vex amd64->IR:   VEX=0 VEX.L=0 VEX.nVVVV=0x1 ESC=0F
vex amd64->IR:   PFX.66=0 PFX.F2=0 PFX.F3=0
==1135== valgrind: Unrecognised instruction at address 0x6742559.
==1135==    at 0x6742559: QScreen::QScreen(QPlatformScreen*) (qscreen.cpp:53)
==1135==    by 0x675A218: QWindowSystemInterface::handleScreenAdded(QPlatformScreen*, bool) (qwindowsysteminterface.cpp:716)
==1135==    by 0xD8BBDEF: QXcbConnection::initializeScreens(bool) (qxcbconnection_screens.cpp:347)
==1135==    by 0xD8B3018: QXcbConnection::QXcbConnection(QXcbNativeInterface*, bool, unsigned int, char const*) (qxcbconnection.cpp:72)
==1135==    by 0xD8D600D: QXcbIntegration::QXcbIntegration(QList<QString> const&, int&, char**) (qxcbintegration.cpp:170)
==1135==    by 0x48584E7: QXcbIntegrationPlugin::create(QString const&, QList<QString> const&, int&, char**) (qxcbmain.cpp:22)
==1135==    by 0x66F46B7: init_platform(QString const&, QString const&, QString const&, int&, char**) (qguiapplication.cpp:1249)
==1135==    by 0x66F760F: QGuiApplicationPrivate::createPlatformIntegration() (qguiapplication.cpp:1533)
==1135==    by 0x66F81E7: QGuiApplicationPrivate::createEventDispatcher() (qguiapplication.cpp:1552)
==1135==    by 0x70A7E5D: QCoreApplicationPrivate::init() (qcoreapplication.cpp:905)
==1135==    by 0x66FA86F: QGuiApplicationPrivate::init() (qguiapplication.cpp:1580)
==1135==    by 0x52FF4CC: QApplicationPrivate::init() (qapplication.cpp:472)
==1135== Your program just tried to execute an instruction that Valgrind
==1135== did not recognise.  There are two possible reasons for this.
==1135== 1. Your program has a bug and erroneously jumped to a non-code
==1135==    location.  If you are running Memcheck and you just saw a
==1135==    warning about a bad jump, it's probably your program's fault.
==1135== 2. The instruction is legitimate but Valgrind doesn't handle it,
==1135==    i.e. it's Valgrind's fault.  If you think this is the case or
==1135==    you are not sure, please let us know and we'll try to fix it.
==1135== Either way, Valgrind will now raise a SIGILL signal which will
==1135== probably kill your program.
==1135== 
==1135== Process terminating with default action of signal 4 (SIGILL)
==1135==  Illegal opcode at address 0x6742559
==1135==    at 0x6742559: QScreen::QScreen(QPlatformScreen*) (qscreen.cpp:53)
==1135==    by 0x675A218: QWindowSystemInterface::handleScreenAdded(QPlatformScreen*, bool) (qwindowsysteminterface.cpp:716)
==1135==    by 0xD8BBDEF: QXcbConnection::initializeScreens(bool) (qxcbconnection_screens.cpp:347)
==1135==    by 0xD8B3018: QXcbConnection::QXcbConnection(QXcbNativeInterface*, bool, unsigned int, char const*) (qxcbconnection.cpp:72)
==1135==    by 0xD8D600D: QXcbIntegration::QXcbIntegration(QList<QString> const&, int&, char**) (qxcbintegration.cpp:170)
==1135==    by 0x48584E7: QXcbIntegrationPlugin::create(QString const&, QList<QString> const&, int&, char**) (qxcbmain.cpp:22)
==1135==    by 0x66F46B7: init_platform(QString const&, QString const&, QString const&, int&, char**) (qguiapplication.cpp:1249)
==1135==    by 0x66F760F: QGuiApplicationPrivate::createPlatformIntegration() (qguiapplication.cpp:1533)
==1135==    by 0x66F81E7: QGuiApplicationPrivate::createEventDispatcher() (qguiapplication.cpp:1552)
==1135==    by 0x70A7E5D: QCoreApplicationPrivate::init() (qcoreapplication.cpp:905)
==1135==    by 0x66FA86F: QGuiApplicationPrivate::init() (qguiapplication.cpp:1580)
==1135==    by 0x52FF4CC: QApplicationPrivate::init() (qapplication.cpp:472)
==1135== 
==1135== HEAP SUMMARY:
==1135==     in use at exit: 465,768 bytes in 2,705 blocks
==1135==   total heap usage: 4,531 allocs, 1,826 frees, 723,348 bytes allocated
==1135== 
==1135== LEAK SUMMARY:
==1135==    definitely lost: 0 bytes in 0 blocks
==1135==    indirectly lost: 0 bytes in 0 blocks
==1135==      possibly lost: 3,520 bytes in 6 blocks
==1135==    still reachable: 460,232 bytes in 2,678 blocks
==1135==                       of which reachable via heuristic:
==1135==                         newarray           : 2,000 bytes in 14 blocks
==1135==         suppressed: 0 bytes in 0 blocks
==1135== Rerun with --leak-check=full to see details of leaked memory
==1135== 
==1135== For lists of detected and suppressed errors, rerun with: -s
==1135== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Comment 6 Sam James 2024-09-10 15:00:49 UTC
Ignore everything >= the unrecognised instructions bit as it means Valgrind can't correctly model everything from then on. But the part before is curious. I found bug 488591 at least but it's not the same.

I found https://github.com/i3/i3lock/issues/73 which links to https://bugreports.qt.io/browse/QTBUG-56518. It looks like a mess but not related. So, Valgrind is a dead-end for this bug unfortunately.

ASAN and UBSAN time if you'd be so kind? :)
Comment 7 localtoast 2024-09-10 15:21:09 UTC
(In reply to Sam James from comment #6)
> Ignore everything >= the unrecognised instructions bit as it means Valgrind
> can't correctly model everything from then on. But the part before is
> curious. I found bug 488591 at least but it's not the same.
> 
> I found https://github.com/i3/i3lock/issues/73 which links to
> https://bugreports.qt.io/browse/QTBUG-56518. It looks like a mess but not
> related. So, Valgrind is a dead-end for this bug unfortunately.
> 
> ASAN and UBSAN time if you'd be so kind? :)

Ok so I have to admit that I don't know what you're asking for at this point. A quick Google to appear on the ball tells me these are gdb report modes, and can be enabled by rebuilding something  with -fsanitize makeopts, but I'm unclear what I need to rebuild - gdb, gcc, plasmashell, qtbase, something else?
Comment 8 Sam James 2024-09-10 15:29:40 UTC
See https://wiki.gentoo.org/wiki/AddressSanitizer and https://wiki.gentoo.org/wiki/UndefinedBehaviorSanitizer. Try build ksvg, plasma-workspace, qtbase with them. No need to do glibc/gcc/gdb.
Comment 9 localtoast 2024-09-11 00:33:17 UTC
(In reply to Sam James from comment #8)
> See https://wiki.gentoo.org/wiki/AddressSanitizer and
> https://wiki.gentoo.org/wiki/UndefinedBehaviorSanitizer. Try build ksvg,
> plasma-workspace, qtbase with them. No need to do glibc/gcc/gdb.

I tried to rebuild those three with ASAN and UBSAN. Qtbase was fine, ksvg and plasma-workspace will not build. Originally I got an error about address sanitizer lib not being preloaded partway through ksvg's build process, and then when I fed it to emerge in LD_PRELOAD=/usr/lib/gcc/13/libasan.so, builds fail immediately. KSVG has no error messages for the build, just fails within a second or so and without creating /var/tmp/portage/kde-frameworks/ksvg build directory. It does complain about (I think) emerge having memory leaks via libpython, but that doesn't seem useful or relevant here.
Plasma-workspace fails to build in the same way, but the only output for it is:

Processing thread <id>
Stack at <address> (SP = <long hex number - address?>)
TLS at <address range>
Rerun with 1 suppressed stacks

Then it's repeated once with the same IDs and addresses.
Comment 10 localtoast 2024-09-11 03:30:02 UTC
(In reply to localtoast from comment #5)
> (In reply to Sam James from comment #4)
> > That Valgrind issue looks like a bug in Valgrind, see
> > https://bugs.kde.org/show_bug.cgi?id=381819. You can try the patch there or
> > just try ASAN and UBSAN instead.
> 

For completeness, the gdb and valgrind output of another user experiencing the same problem:

(gdb) run
Starting program: /usr/bin/plasmashell
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffeeff36c0 (LWP 8845)]
[New Thread 0x7fffee7f26c0 (LWP 8848)]
[New Thread 0x7fffed06d6c0 (LWP 8876)]
[New Thread 0x7fffec86c6c0 (LWP 8877)]
[New Thread 0x7fffdffff6c0 (LWP 8878)]
[New Thread 0x7fffdf73c6c0 (LWP 8897)]
[New Thread 0x7fffdef3b6c0 (LWP 8898)]
[New Thread 0x7fffde73a6c0 (LWP 8899)]
[New Thread 0x7fffcbfff6c0 (LWP 8930)]
[New Thread 0x7fffcb7fe6c0 (LWP 8931)]
[New Thread 0x7fffcaffd6c0 (LWP 8932)]
[New Thread 0x7fffca7fc6c0 (LWP 8933)]
[New Thread 0x7fffc9bfb6c0 (LWP 8934)]
[New Thread 0x7fffc93fa6c0 (LWP 8935)]
[New Thread 0x7fffc8bf96c0 (LWP 8936)]
[New Thread 0x7fffbcb1b6c0 (LWP 8937)]
[New Thread 0x7fff9ffff6c0 (LWP 8938)]
[New Thread 0x7fff9f7fe6c0 (LWP 8939)]
[New Thread 0x7fff9effd6c0 (LWP 8940)]
[New Thread 0x7fff9e7fc6c0 (LWP 8943)]
[Thread 0x7fff9e7fc6c0 (LWP 8943) exited]
[Thread 0x7fff9effd6c0 (LWP 8940) exited]
[Thread 0x7fff9f7fe6c0 (LWP 8939) exited]
Couldn't start kglobalaccel from org.kde.kglobalaccel.service: QDBusError("org.freedesktop.DBus.Error.ServiceUnknown", "The name org.kde.kglobalaccel was not provided by any .service files")
kde.plasmashell: Aborting shell load: The activity manager daemon (kactivitymanagerd) is not running.
kde.plasmashell: If this Plasma has been installed into a custom prefix, verify that its D-Bus services dir is known to the system for the daemon to be activatable.
kde.plasmashell: Aborting shell load: The activity manager daemon (kactivitymanagerd) is not running.
kde.plasmashell: If this Plasma has been installed into a custom prefix, verify that its D-Bus services dir is known to the system for the daemon to be activatable.
[New Thread 0x7fff9f7fe6c0 (LWP 8972)]
[New Thread 0x7fff9effd6c0 (LWP 8973)]
[New Thread 0x7fff9e7fc6c0 (LWP 8974)]
[Thread 0x7fff9e7fc6c0 (LWP 8974) exited]
[Thread 0x7fff9effd6c0 (LWP 8973) exited]
[Thread 0x7fff9f7fe6c0 (LWP 8972) exited]
[New Thread 0x7fff9f7fe6c0 (LWP 8975)]
kf.kirigami.platform: Failed to find a Kirigami platform plugin for style "Fusion"

Thread 1 "plasmashell" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0 0x0000000000000000 in ??? ()
#1 0x00007ffff718a21e in KSvg::FrameSvgPrivate::generateFrameBackground
(this=this@entry=0x55555621e2c0, frame=...)
at /usr/src/debug/kde-frameworks/ksvg-6.5.0/ksvg-6.5.0/src/ksvg/framesvg.cpp:619
#2 0x00007ffff718a9f2 in KSvg::FrameSvgPrivate::generateBackground
(this=this@entry=0x55555621e2c0, frame=...)
at /usr/src/debug/kde-frameworks/ksvg-6.5.0/ksvg-6.5.0/src/ksvg/framesvg.cpp:547
#3 0x00007ffff7189a96 in KSvg::FrameSvgPrivate::generateBackground
(this=0x55555621e2c0, frame=...)
at /usr/src/debug/kde-frameworks/ksvg-6.5.0/ksvg-6.5.0/src/ksvg/framesvg.cpp:486
#4 KSvg::FrameSvgPrivate::alphaMask (this=0x55555621e2c0)
at /usr/src/debug/kde-frameworks/ksvg-6.5.0/ksvg-6.5.0/src/ksvg/framesvg.cpp:486
#5 0x00007ffff718bfc0 in KSvg::FrameSvg::mask (this=0x55555621d5c0)
at /usr/src/debug/kde-frameworks/ksvg-6.5.0/ksvg-6.5.0/src/ksvg/framesvg.cpp:342
#6 0x00007fff9d226a5c in KSvg::FrameSvgItem::mask (this=0x555555e1bb90)
at /usr/src/debug/kde-frameworks/ksvg-6.5.0/ksvg-6.5.0/src/declarativeimports/framesvgitem.cpp:500
#7 KSvg::FrameSvgItem::qt_static_metacall
--Type <RET> for more, q to quit, c to continue without paging--
(_o=0x555555e1bb90, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>)
at /usr/src/debug/kde-frameworks/ksvg-6.5.0/ksvg-6.5.0_build/src/declarativeimports/corebindingsplugin_autogen/include/moc_framesvgitem.cpp:486
#8 0x00007fff9d22839f in KSvg::FrameSvgItem::qt_metacall
(this=0x555555e1bb90, _c=QMetaObject::ReadProperty, _id=9, _a=0x7fffffffc2c0)
at /usr/src/debug/kde-frameworks/ksvg-6.5.0/ksvg-6.5.0_build/src/declarativeimports/corebindingsplugin_autogen/include/moc_framesvgitem.cpp:538
#9 0x00007ffff5600da7 in QMetaProperty::read
(this=this@entry=0x7fffffffc3c0, object=object@entry=0x555555e1bb90)
at /usr/src/debug/dev-qt/qtbase-6.7.2-r4/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qmetaobject.cpp:3734
#10 0x00007ffff5585d98 in QObject::property
(this=0x555555e1bb90, name=<optimized out>,
name@entry=0x7ffff7ce8c5a "mask")
at /usr/src/debug/dev-qt/qtbase-6.7.2-r4/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobject.cpp:4316
#11 0x00007ffff7cc4b58 in PlasmaQuick::DialogBackground::mask
(this=<optimized out>)
at /usr/src/debug/kde-plasma/libplasma-6.1.4/libplasma-6.1.4/src/plasmaquick/private/dialogbackground_p.cpp:60
#12 0x00007ffff7ca18a6 in PlasmaQuick::DialogPrivate::updateTheme
--Type <RET> for more, q to quit, c to continue without paging--
(this=0x55555621a770)
at /usr/src/debug/kde-plasma/libplasma-6.1.4/libplasma-6.1.4/src/plasmaquick/dialog.cpp:245
#13 0x00007ffff636330a in QQmlObjectCreator::finalize
(this=0x555555e52930, interrupt=...)
at /usr/src/debug/dev-qt/qtdeclarative-6.7.2/qtdeclarative-everywhere-src-6.7.2/src/qml/qml/qqmlobjectcreator.cpp:1567
#14 0x00007ffff640486b in QQmlComponentPrivate::complete
(enginePriv=0x555555815310, state=state@entry=0x555555ee3bb8)
at /usr/src/debug/dev-qt/qtdeclarative-6.7.2/qtdeclarative-everywhere-src-6.7.2/src/qml/qml/qqmlcomponent.cpp:1172
#15 0x00007ffff6432413 in QQmlComponentPrivate::completeCreate
(this=0x555555ee3b00)
at /usr/src/debug/dev-qt/qtdeclarative-6.7.2/qtdeclarative-everywhere-src-6.7.2/src/qml/qml/qqmlcomponent.cpp:1277
#16 0x00007ffff7cbc77a in PlasmaQuick::SharedQmlEngine::completeInitialization
(this=0x7fffe0006590, initialProperties=<optimized out>)
at /usr/src/debug/kde-plasma/libplasma-6.1.4/libplasma-6.1.4/src/plasmaquick/sharedqmlengine.cpp:239
#17 0x00007ffff7cbc897 in PlasmaQuick::SharedQmlEnginePrivate::scheduleExecutionEnd (this=0x5555562875a0) at /usr/include/qt6/QtCore/qhash.h:836
#18 0x00007ffff7cbeb98 in PlasmaQuick::QuickViewSharedEngine::setSource
(this=0x555556042ef0, url=...)
--Type <RET> for more, q to quit, c to continue without paging--
at /usr/src/debug/kde-plasma/libplasma-6.1.4/libplasma-6.1.4/src/plasmaquick/quickviewsharedengine.cpp:214
#19 PlasmaQuick::QuickViewSharedEngine::setSource
(this=this@entry=0x555556042ef0, url=...)
at /usr/src/debug/kde-plasma/libplasma-6.1.4/libplasma-6.1.4/src/plasmaquick/quickviewsharedengine.cpp:208
#20 0x00005555555a468a in DesktopView::DesktopView
(this=this@entry=0x555556042ef0, corona=corona@entry=0x555555840830, targetScreen=targetScreen@entry=0x5555556bde50)
at /usr/src/debug/kde-plasma/plasma-workspace-6.1.4-r2/plasma-workspace-6.1.4/shell/desktopview.cpp:65
#21 0x00005555555c33a9 in ShellCorona::addOutput
(this=0x555555840830, screen=0x5555556bde50)
at /usr/src/debug/kde-plasma/plasma-workspace-6.1.4-r2/plasma-workspace-6.1.4/shell/shellcorona.cpp:1405
#22 0x00005555555d3199 in ShellCorona::addOutput
(this=0x555555840830, screen=0x5555556bde50)
at /usr/src/debug/kde-plasma/plasma-workspace-6.1.4-r2/plasma-workspace-6.1.4/shell/shellcorona.cpp:1075
#23 ShellCorona::loadDefaultLayout (this=0x555555840830)
at /usr/src/debug/kde-plasma/plasma-workspace-6.1.4-r2/plasma-workspace-6.1.4/shell/shellcorona.cpp:1076
#24 0x00007ffff7a09745 in Plasma::Corona::loadLayout
--Type <RET> for more, q to quit, c to continue without paging--
(this=this@entry=0x555555840830, configName=...)
at /usr/src/debug/kde-plasma/libplasma-6.1.4/libplasma-6.1.4/src/plasma/corona.cpp:144
#25 0x00005555555d3d67 in ShellCorona::load (this=0x555555840830)
at /usr/src/debug/kde-plasma/plasma-workspace-6.1.4-r2/plasma-workspace-6.1.4/shell/shellcorona.cpp:804
#26 0x00007ffff55e28ac in QtPrivate::QSlotObjectBase::call
(this=<optimized out>, r=0x555555840830, a=0x7fffffffce40)
at /usr/src/debug/dev-qt/qtbase-6.7.2-r4/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobjectdefs_impl.h:469
#27 doActivate<false>
(sender=0x555555d79da0, signal_index=4, argv=0x7fffffffce40)
at /usr/src/debug/dev-qt/qtbase-6.7.2-r4/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobject.cpp:4086
#28 0x00007ffff6fe8b55 in KActivities::Consumer::serviceStatusChanged(KActivities::Consumer::ServiceStatus) () at /usr/lib64/libPlasmaActivities.so.6
#29 0x00007ffff55e28ac in QtPrivate::QSlotObjectBase::call
(this=<optimized out>, r=0x555555d79da0, a=0x7fffffffcfd0)
at /usr/src/debug/dev-qt/qtbase-6.7.2-r4/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobjectdefs_impl.h:469
#30 doActivate<false>
(sender=0x555555ee3c70, signal_index=11, argv=0x7fffffffcfd0)
at /usr/src/debug/dev-qt/qtbase-6.7.2-r4/qtbase-everywhere-src-6.7.2/src/cor--Type <RET> for more, q to quit, c to continue without paging--
elib/kernel/qobject.cpp:4086
#31 0x00007ffff6ffdcc4 in ??? () at /usr/lib64/libPlasmaActivities.so.6
#32 0x00007ffff7001f52 in ??? () at /usr/lib64/libPlasmaActivities.so.6
#33 0x00007ffff55e2be3 in doActivate<false>
(sender=0x555555d28b80, signal_index=3, argv=0x7fffffffd1a0)
at /usr/src/debug/dev-qt/qtbase-6.7.2-r4/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobject.cpp:4098
#34 0x00007ffff55a0e47 in QMetaObject::activate
(sender=<optimized out>, m=m@entry=0x7ffff5988560 <QDBusPendingCallWatcher::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffffffd1a0)
at /usr/src/debug/dev-qt/qtbase-6.7.2-r4/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobject.cpp:4146
#35 0x00007ffff58ef6b3 in QDBusPendingCallWatcher::finished
(this=<optimized out>, _t1=<optimized out>)
at /usr/src/debug/dev-qt/qtbase-6.7.2-r4/qtbase-everywhere-src-6.7.2_build/src/dbus/DBus_autogen/include/moc_qdbuspendingcall.cpp:160
#36 0x00007ffff5584694 in QObject::event
(this=0x555555d28b80, e=0x5555556e8260)
at /usr/src/debug/dev-qt/qtbase-6.7.2-r4/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobject.cpp:1452
#37 0x00007ffff77830f5 in QApplicationPrivate::notify_helper
(this=<optimized out>, receiver=0x555555d28b80, e=0x5555556e8260)
--Type <RET> for more, q to quit, c to continue without paging--
at /usr/src/debug/dev-qt/qtbase-6.7.2-r4/qtbase-everywhere-src-6.7.2/src/widgets/kernel/qapplication.cpp:3287
#38 0x00007ffff55fa580 in QCoreApplication::notifyInternal2
(receiver=0x555555d28b80, event=0x5555556e8260)
at /usr/src/debug/dev-qt/qtbase-6.7.2-r4/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qcoreapplication.cpp:1142
#39 0x00007ffff55fa62d in QCoreApplication::sendEvent
(receiver=<optimized out>, event=<optimized out>)
at /usr/src/debug/dev-qt/qtbase-6.7.2-r4/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qcoreapplication.cpp:1583
#40 0x00007ffff561ee4e in QCoreApplicationPrivate::sendPostedEvents
(receiver=0x0, event_type=0, data=0x555555653ba0)
at /usr/src/debug/dev-qt/qtbase-6.7.2-r4/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qcoreapplication.cpp:1940
#41 0x00007ffff561f054 in QCoreApplication::sendPostedEvents
(receiver=<optimized out>, event_type=<optimized out>)
at /usr/src/debug/dev-qt/qtbase-6.7.2-r4/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qcoreapplication.cpp:1797
#42 0x00007ffff53d039f in postEventSourceDispatch (s=0x5555558860b0)
at /usr/src/debug/dev-qt/qtbase-6.7.2-r4/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qeventdispatcher_glib.cpp:244
#43 0x00007ffff3e168ea in ??? () at /usr/lib64/libglib-2.0.so.0
#44 0x00007ffff3e19a5f in ??? () at /usr/lib64/libglib-2.0.so.0
--Type <RET> for more, q to quit, c to continue without paging--
#45 0x00007ffff3e1a020 in g_main_context_iteration ()
at /usr/lib64/libglib-2.0.so.0
#46 0x00007ffff53ce7ad in QEventDispatcherGlib::processEvents
(this=0x555555904e90, flags=...)
at /usr/src/debug/dev-qt/qtbase-6.7.2-r4/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qeventdispatcher_glib.cpp:394
#47 0x00007ffff5623c02 in QEventLoop::exec
(this=this@entry=0x7fffffffd590, flags=..., flags@entry=...)
at /usr/src/debug/dev-qt/qtbase-6.7.2-r4/qtbase-everywhere-src-6.7.2/src/corelib/global/qflags.h:34
#48 0x00007ffff5623db5 in QCoreApplication::exec ()
at /usr/src/debug/dev-qt/qtbase-6.7.2-r4/qtbase-everywhere-src-6.7.2/src/corelib/global/qflags.h:74
#49 0x00007ffff5b14738 in QGuiApplication::exec ()
at /usr/src/debug/dev-qt/qtbase-6.7.2-r4/qtbase-everywhere-src-6.7.2/src/gui/kernel/qguiapplication.cpp:1926
#50 0x00007ffff76f3df9 in QApplication::exec ()
at /usr/src/debug/dev-qt/qtbase-6.7.2-r4/qtbase-everywhere-src-6.7.2/src/widgets/kernel/qapplication.cpp:2555
#51 0x0000555555588e6a in main (argc=<optimized out>, argv=<optimized out>)
at /usr/src/debug/kde-plasma/plasma-workspace-6.1.4-r2/plasma-workspace-6.1.4/shell/main.cpp:188
(gdb)

---


valgrind plasmashell :(
==13531== Memcheck, a memory error detector
==13531== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al.
==13531== Using Valgrind-3.23.1.GIT and LibVEX; rerun with -h for copyright info
==13531== Command: plasmashell
==13531==

==13531== Syscall param writev(vector[0]) points to uninitialised byte(s)
==13531== at 0x794873F: writev (in /lib64/libc.so.6)
==13531== by 0x4C2B710: ??? (in /usr/lib64/libxcb.so.1.1.0)
==13531== by 0x4C2CF40: ??? (in /usr/lib64/libxcb.so.1.1.0)
==13531== by 0x4C2D60C: ??? (in /usr/lib64/libxcb.so.1.1.0)
==13531== by 0x4C2D69E: xcb_wait_for_reply (in /usr/lib64/libxcb.so.1.1.0)
==13531== by 0xDC09860: QXcbConnection::initializeScreensFromMonitor(xcb_screen_iterator_t*, int, QXcbScreen**, bool) (qxcbconnection_screens.cpp:501)
==13531== by 0xDC0B1EF: QXcbConnection::initializeScreens(bool) (qxcbconnection_screens.cpp:317)
==13531== by 0xDC01B16: QXcbConnection::QXcbConnection(QXcbNativeInterface*, bool, unsigned int, char const*) (qxcbconnection.cpp:72)
==13531== by 0xDC25CFD: QXcbIntegration::QXcbIntegration(QList<QString> const&, int&, char**) (qxcbintegration.cpp:170)
==13531== by 0x485B4E7: QXcbIntegrationPlugin::create(QString const&, QList<QString> const&, int&, char**) (qxcbmain.cpp:22)
==13531== by 0x6902AF7: init_platform(QString const&, QString const&, QString const&, int&, char**) (qguiapplication.cpp:1249)
==13531== by 0x69059C4: QGuiApplicationPrivate::createPlatformIntegration() (qguiapplication.cpp:1533)
==13531== Address 0xd4c9be5 is 4,533 bytes inside a block of size 21,176 alloc'd
==13531== at 0x4849B7B: calloc (vg_replace_malloc.c:1675)
==13531== by 0x4C2B0FD: xcb_connect_to_fd (in /usr/lib64/libxcb.so.1.1.0)
==13531== by 0x4C306C4: xcb_connect_to_display_with_auth_info (in /usr/lib64/libxcb.so.1.1.0)
==13531== by 0x852A889: _XConnectXCB (in /usr/lib64/libX11.so.6.4.0)
==13531== by 0x851AB97: XOpenDisplay (in /usr/lib64/libX11.so.6.4.0)
==13531== by 0xDC06FE0: QXcbBasicConnection::QXcbBasicConnection(char const*) (qxcbconnection_basic.cpp:77)
==13531== by 0xDC01911: QXcbConnection::QXcbConnection(QXcbNativeInterface*, bool, unsigned int, char const*) (qxcbconnection.cpp:62)
==13531== by 0xDC25CFD: QXcbIntegration::QXcbIntegration(QList<QString> const&, int&, char**) (qxcbintegration.cpp:170)
==13531== by 0x485B4E7: QXcbIntegrationPlugin::create(QString const&, QList<QString> const&, int&, char**) (qxcbmain.cpp:22)
==13531== by 0x6902AF7: init_platform(QString const&, QString const&, QString const&, int&, char**) (qguiapplication.cpp:1249)
==13531== by 0x69059C4: QGuiApplicationPrivate::createPlatformIntegration() (qguiapplication.cpp:1533)
==13531== by 0x6906507: QGuiApplicationPrivate::createEventDispatcher() (qguiapplication.cpp:1552)
==13531==
vex amd64->IR: unhandled instruction bytes: 0x8F 0xE8 0x70 0xA2 0xC3 0x0 0xC5 0xFB 0x11 0x83
vex amd64->IR: REX=0 REX.W=0 REX.R=0 REX.X=0 REX.B=0
vex amd64->IR: VEX=0 VEX.L=0 VEX.nVVVV=0x1 ESC=0F
vex amd64->IR: PFX.66=0 PFX.F2=0 PFX.F3=0
==13531== valgrind: Unrecognised instruction at address 0x6950f5c.
==13531== at 0x6950F5C: QScreen::QScreen(QPlatformScreen*) (qscreen.cpp:53)
==13531== by 0x6969CE6: QWindowSystemInterface::handleScreenAdded(QPlatformScreen*, bool) (qwindowsysteminterface.cpp:716)
==13531== by 0xDC0B307: QXcbConnection::initializeScreens(bool) (qxcbconnection_screens.cpp:347)
==13531== by 0xDC01B16: QXcbConnection::QXcbConnection(QXcbNativeInterface*, bool, unsigned int, char const*) (qxcbconnection.cpp:72)
==13531== by 0xDC25CFD: QXcbIntegration::QXcbIntegration(QList<QString> const&, int&, char**) (qxcbintegration.cpp:170)
==13531== by 0x485B4E7: QXcbIntegrationPlugin::create(QString const&, QList<QString> const&, int&, char**) (qxcbmain.cpp:22)
==13531== by 0x6902AF7: init_platform(QString const&, QString const&, QString const&, int&, char**) (qguiapplication.cpp:1249)
==13531== by 0x69059C4: QGuiApplicationPrivate::createPlatformIntegration() (qguiapplication.cpp:1533)
==13531== by 0x6906507: QGuiApplicationPrivate::createEventDispatcher() (qguiapplication.cpp:1552)
==13531== by 0x7312635: QCoreApplicationPrivate::init() (qcoreapplication.cpp:905)
==13531== by 0x6908EFD: QGuiApplicationPrivate::init() (qguiapplication.cpp:1580)
==13531== by 0x53EE614: QApplicationPrivate::init() (qapplication.cpp:472)
==13531== Your program just tried to execute an instruction that Valgrind
==13531== did not recognise. There are two possible reasons for this.
==13531== 1. Your program has a bug and erroneously jumped to a non-code
==13531== location. If you are running Memcheck and you just saw a
==13531== warning about a bad jump, it's probably your program's fault.
==13531== 2. The instruction is legitimate but Valgrind doesn't handle it,
==13531== i.e. it's Valgrind's fault. If you think this is the case or
==13531== you are not sure, please let us know and we'll try to fix it.
==13531== Either way, Valgrind will now raise a SIGILL signal which will
==13531== probably kill your program.
==13531==
==13531== Process terminating with default action of signal 4 (SIGILL)
==13531== Illegal opcode at address 0x6950F5C
==13531== at 0x6950F5C: QScreen::QScreen(QPlatformScreen*) (qscreen.cpp:53)
==13531== by 0x6969CE6: QWindowSystemInterface::handleScreenAdded(QPlatformScreen*, bool) (qwindowsysteminterface.cpp:716)
==13531== by 0xDC0B307: QXcbConnection::initializeScreens(bool) (qxcbconnection_screens.cpp:347)
==13531== by 0xDC01B16: QXcbConnection::QXcbConnection(QXcbNativeInterface*, bool, unsigned int, char const*) (qxcbconnection.cpp:72)
==13531== by 0xDC25CFD: QXcbIntegration::QXcbIntegration(QList<QString> const&, int&, char**) (qxcbintegration.cpp:170)
==13531== by 0x485B4E7: QXcbIntegrationPlugin::create(QString const&, QList<QString> const&, int&, char**) (qxcbmain.cpp:22)
==13531== by 0x6902AF7: init_platform(QString const&, QString const&, QString const&, int&, char**) (qguiapplication.cpp:1249)
==13531== by 0x69059C4: QGuiApplicationPrivate::createPlatformIntegration() (qguiapplication.cpp:1533)
==13531== by 0x6906507: QGuiApplicationPrivate::createEventDispatcher() (qguiapplication.cpp:1552)
==13531== by 0x7312635: QCoreApplicationPrivate::init() (qcoreapplication.cpp:905)
==13531== by 0x6908EFD: QGuiApplicationPrivate::init() (qguiapplication.cpp:1580)
==13531== by 0x53EE614: QApplicationPrivate::init() (qapplication.cpp:472)
==13531==
==13531== HEAP SUMMARY:
==13531== in use at exit: 466,778 bytes in 2,711 blocks
==13531== total heap usage: 4,822 allocs, 2,111 frees, 749,577 bytes allocated
==13531==
==13531== LEAK SUMMARY:
==13531== definitely lost: 0 bytes in 0 blocks
==13531== indirectly lost: 0 bytes in 0 blocks
==13531== possibly lost: 3,552 bytes in 6 blocks
==13531== still reachable: 461,210 bytes in 2,684 blocks
==13531== of which reachable via heuristic:
==13531== newarray : 2,128 bytes in 14 blocks
==13531== suppressed: 0 bytes in 0 blocks
==13531== Rerun with --leak-check=full to see details of leaked memory
==13531==
==13531== Use --track-origins=yes to see where uninitialised values come from
==13531== For lists of detected and suppressed errors, rerun with: -s
==13531== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
[1] 13531 illegal hardware instruction valgrind plasmashell
valgrind plasmashell 19.08s user 1.88s system 94% cpu 22.264 total
Comment 11 Sam James 2024-09-11 14:45:01 UTC
Bleh, OK. I defer to the maintainers then.
Comment 12 localtoast 2024-09-17 13:18:02 UTC
It appears that this is either a bug within qtbase, a bug resulting from how ksvg and other KDE applications use qtbase, a CPU bug or a combination of factors. We have discovered that the users reporting this issue were building packages with -march=native supplied to GCC, where native=bdver4. Rebuilding the Gentoo package dev-qt/qtbase with either -march=x86-64-v2 or -march omitted entirely will entirely eliminate the segfaults. Interestingly, -march=x86-64-v3 still results in segfaults.
Anyway, I will file a bug with QT for documentation purposes, referring to the forum thread linked, and this bug.
Comment 13 Sergey Okhapkin 2024-09-17 23:01:07 UTC
-march=tigerlake which is a superset of march=x86-64-v4 works OK. I confirm that qtbase compiled on bdver4 host fails with -march=x86-64-v3 but works with -march=x86-64-v2.