https://bugs.kde.org/show_bug.cgi?id=525410

            Bug ID: 525410
           Summary: KIconTheme crash on switching themes and icons with
                    Koi: malloc_consolidate(): unaligned fastbin chunk
                    detected
    Classification: Frameworks and Libraries
           Product: frameworks-kiconthemes
      Version First 6.29.0
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

DESCRIPTION

I use a night/day theme+icons swithing application called Koi
https://github.com/baduhai/Koi
It is configured to switch Plasma style, colors, and icons from Breeze Light at
day and Breeze Dark at night.

Plasma shell frequently crashes when the switching occurs.
It used to crash in krunner (bug 514440), but now it crashes in KIconLoader → 
KIconTheme constructor → KConfigGroup::readPathEntry →
KConfigPrivate::lookupData → KEntryMap::getEntry.

The crash is relatively rare and could not be reliably reproduced manually. It
is usually triggered only on auto-switching.

Since libc says the following:

#10 0x00007f245ae8bca5 in malloc_printerr (str=str@entry=0x7f245afc4728
"malloc_consolidate(): unaligned fastbin chunk detected") at malloc.c:5895

I guess the heap is corrupted somewhere.


STEPS TO REPRODUCE
1. Configure Koi to switch between Breeze Light and Breeze Dark (Plasma style,
colors, and icons)
2. Wait until the nighttime switch occurs

OBSERVED RESULT

Plasmashell crashes, not all the time


EXPECTED RESULT

Plasmashell does not crash

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 43
KDE Plasma Version: 6.7.4
KDE Frameworks Version: 6.29.0
Qt Version: 6.10.3
Kernel Version: 7.1.13-100.fc43.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × 13th Gen Intel® Core™ i5-1340P
Memory: 32 GiB of RAM (30,9 GiB usable)
Graphics Processor: Intel® Iris® Xe Graphics
Manufacturer: Intel(R) Client Systems
Product Name: NUC13ANKi5

ADDITIONAL INFORMATION


Program terminated with signal SIGABRT, Aborted.
#0  0x00007f245ae81a2c in __pthread_kill_implementation () from
/lib64/libc.so.6

#0  __pthread_kill_implementation (threadid=<optimized out>,
signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007f245ae81af3 in __pthread_kill_internal (threadid=<optimized out>,
signo=6) at pthread_kill.c:89
#2  0x00007f245ae27bde in __GI_raise (sig=6) at ../sysdeps/posix/raise.c:26
#3  0x00007f245e4ce05a in KCrash::defaultCrashHandler(int) () at
/lib64/libKF6Crash.so.6
#4  0x00007f245ae27d10 in <signal handler called> () at /lib64/libc.so.6
#5  __pthread_kill_implementation (threadid=<optimized out>,
signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#6  0x00007f245ae81af3 in __pthread_kill_internal (threadid=<optimized out>,
signo=6) at pthread_kill.c:89
#7  0x00007f245ae27bde in __GI_raise (sig=sig@entry=6) at
../sysdeps/posix/raise.c:26
#8  0x00007f245ae0f6d0 in __GI_abort () at abort.c:77
#9  0x00007f245ae1073b in __libc_message_impl (fmt=fmt@entry=0x7f245afc17ea
"%s\n") at ../sysdeps/posix/libc_fatal.c:138
#10 0x00007f245ae8bca5 in malloc_printerr (str=str@entry=0x7f245afc4728
"malloc_consolidate(): unaligned fastbin chunk detected") at malloc.c:5895
#11 0x00007f245ae8c83c in malloc_consolidate (av=av@entry=0x7f245aff6ac0
<main_arena>) at malloc.c:4964
#12 0x00007f245ae8ede8 in _int_malloc (av=av@entry=0x7f245aff6ac0 <main_arena>,
bytes=bytes@entry=1064) at malloc.c:4174
#13 0x00007f245ae8f899 in __libc_malloc2 (bytes=1064) at malloc.c:3458
#14 0x00007f245b64d6d0 in QArrayData::allocate2(QArrayData**, long long,
QArrayData::AllocationOption) () at /lib64/libQt6Core.so.6
#15 0x00007f245b60c0a2 in QString::QString(long long, Qt::Initialization) () at
/lib64/libQt6Core.so.6
#16 0x00007f245b6231a2 in QUtf8::convertToUnicode(QByteArrayView) () at
/lib64/libQt6Core.so.6
#17 0x00007f245b604ede in QString::fromUtf8(QByteArrayView) () at
/lib64/libQt6Core.so.6
#18 0x00007f245cf8cf65 in QString::fromUtf8
    (utf8=0x55643b508470
"actions/16@2x,actions/16@3x,actions/22@2x,actions/22@3x,actions/24@2x,actions/24@3x,actions/32@2x,actions/32@3x,animations/16@2x,animations/16@3x,apps/16@2x,apps/16@3x,apps/22@2x,apps/22@3x,devices/16"...,
size=<optimized out>) at /usr/include/qt6/QtCore/qbytearrayview.h:138
#19 KEntryMap::getEntry (this=<optimized out>, group=<optimized out>, key=...,
defaultValue=..., flags=..., expand=0x7ffc4ed7fd6f)
    at
/usr/src/debug/kf6-kconfig-6.29.0-1.fc43.x86_64/src/core/kconfigdata.cpp:229
#20 KConfigPrivate::lookupData (this=<optimized out>, group=<optimized out>,
key=..., flags=..., expand=0x7ffc4ed7fd6f) at
/usr/src/debug/kf6-kconfig-6.29.0-1.fc43.x86_64/src/core/kconfig.cpp:1165
#21 0x00007f245cf9bde8 in KConfigGroup::readPathEntry
(this=this@entry=0x7ffc4ed7ff50, key=key@entry=0x7f245c650e65
"ScaledDirectories", aDefault=...)
    at
/usr/src/debug/kf6-kconfig-6.29.0-1.fc43.x86_64/src/core/kconfiggroup.cpp:784
#22 0x00007f245cf9df61 in KConfigGroup::readPathEntry
(this=this@entry=0x7ffc4ed7ff50, key=key@entry=0x7f245c650e65
"ScaledDirectories", aDefault=...)
    at
/usr/src/debug/kf6-kconfig-6.29.0-1.fc43.x86_64/src/core/kconfiggroup.cpp:801
#23 0x00007f245c6425ff in KIconTheme::KIconTheme
    (this=0x55643977de40, name=<optimized out>, appName=<optimized out>,
basePathHint=<optimized out>, this=<optimized out>, name=<optimized out>,
appName=<optimized out>, basePathHint=<optimized out>)
    at
/usr/src/debug/kf6-kiconthemes-6.29.0-1.fc43.x86_64/src/kicontheme.cpp:448
#24 0x00007f245c645650 in KIconLoaderPrivate::initIconThemes
(this=0x5564388f7fa0) at
/usr/src/debug/kf6-kiconthemes-6.29.0-1.fc43.x86_64/src/kiconloader.cpp:443
#25 0x00007f245c62e26d in KIconLoaderPrivate::initIconThemes
(this=0x5564388f7fa0) at
/usr/src/debug/kf6-kiconthemes-6.29.0-1.fc43.x86_64/src/kiconloader.cpp:436
#26 KIconLoaderPrivate::init (this=0x5564388f7fa0, _appname=<optimized out>,
extraSearchPaths=<optimized out>) at
/usr/src/debug/kf6-kiconthemes-6.29.0-1.fc43.x86_64/src/kiconloader.cpp:420
#27 0x00007f245c63c7fb in KIconLoader::newIconLoader (this=0x556437ef99e0) at
/usr/src/debug/kf6-kiconthemes-6.29.0-1.fc43.x86_64/src/kiconloader.cpp:1506
#28 0x00007f245c62de0b in KIconLoaderPrivate::_k_refreshIcons
(this=0x5564388f7fa0, group=4) at
/usr/src/debug/kf6-kiconthemes-6.29.0-1.fc43.x86_64/src/kiconloader.cpp:376
#29 0x00007f245b56951a in void doActivate<false>(QObject*, int, void**) () at
/lib64/libQt6Core.so.6
#30 0x00007f245c638097 in QMetaObject::activate<void, int>
    (sender=0x7f245c6594c0
<_ZZN13QGlobalStaticIN14QtGlobalStatic6HolderIN12_GLOBAL__N_118Q_QGS_s_globalDataEEEE8instanceEvE6holder.lto_priv.0>,
mo=<optimized out>, local_signal_index=0, ret=0x0)
    at /usr/include/qt6/QtCore/qobjectdefs.h:319
#31 KIconLoaderGlobalData::iconChanged (this=0x7f245c6594c0
<_ZZN13QGlobalStaticIN14QtGlobalStatic6HolderIN12_GLOBAL__N_118Q_QGS_s_globalDataEEEE8instanceEvE6holder.lto_priv.0>,
_t1=<optimized out>)
    at
/usr/src/debug/kf6-kiconthemes-6.29.0-1.fc43.x86_64/redhat-linux-build/src/KF6IconThemes_autogen/include/kiconloader.moc:118
#32 KIconLoaderGlobalData::qt_static_metacall
    (_o=0x7f245c6594c0
<_ZZN13QGlobalStaticIN14QtGlobalStatic6HolderIN12_GLOBAL__N_118Q_QGS_s_globalDataEEEE8instanceEvE6holder.lto_priv.0>,
_c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7ffc4ed80758)
    at
/usr/src/debug/kf6-kiconthemes-6.29.0-1.fc43.x86_64/redhat-linux-build/src/KF6IconThemes_autogen/include/kiconloader.moc:74
#33 KIconLoaderGlobalData::qt_metacall
    (this=0x7f245c6594c0
<_ZZN13QGlobalStaticIN14QtGlobalStatic6HolderIN12_GLOBAL__N_118Q_QGS_s_globalDataEEEE8instanceEvE6holder.lto_priv.0>,
_c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7ffc4ed80758)
    at
/usr/src/debug/kf6-kiconthemes-6.29.0-1.fc43.x86_64/redhat-linux-build/src/KF6IconThemes_autogen/include/kiconloader.moc:104
#34 0x00007f245bb54f5e in QDBusConnectionPrivate::deliverCall(QObject*,
QDBusMessage const&, QList<QMetaType> const&, int) () at /lib64/libQt6DBus.so.6
#35 0x00007f245b55af1c in QObject::event(QEvent*) () at /lib64/libQt6Core.so.6
#36 0x00007f245da3de9f in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() at /lib64/libQt6Widgets.so.6
#37 0x00007f245b4fdd88 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() at /lib64/libQt6Core.so.6
#38 0x00007f245b501979 in QCoreApplicationPrivate::sendPostedEvents(QObject*,
int, QThreadData*) () at /lib64/libQt6Core.so.6
#39 0x00007f245b821f0f in postEventSourceDispatch(_GSource*, int (*)(void*),
void*) () at /lib64/libQt6Core.so.6
#40 0x00007f2459ef5363 in g_main_context_dispatch_unlocked.lto_priv () at
/lib64/libglib-2.0.so.0
#41 0x00007f2459efe2b8 in g_main_context_iterate_unlocked.isra () at
/lib64/libglib-2.0.so.0
#42 0x00007f2459efe463 in g_main_context_iteration () at
/lib64/libglib-2.0.so.0
#43 0x00007f245b82141d in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
at /lib64/libQt6Core.so.6
#44 0x00007f245b50ad63 in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at
/lib64/libQt6Core.so.6
#45 0x00007f245b506649 in QCoreApplication::exec() () at /lib64/libQt6Core.so.6
#46 0x00005564147b1a05 in main ()

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to