Bug 206047 - Plasma crashed for no apparent reason (malloc, QByteArray::resize,..., KTemporaryFile, KLockFile::lock, KPixmapCache::find)
Summary: Plasma crashed for no apparent reason (malloc, QByteArray::resize,..., KTempo...
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: Plasma Bugs List
Depends on:
Reported: 2009-09-02 22:00 UTC by Alan Moore
Modified: 2010-10-14 00:27 UTC (History)
2 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Alan Moore 2009-09-02 22:00:29 UTC
Application that crashed: plasma-desktop
Version of the application: 0.3
KDE Version: 4.3.1 (KDE 4.3.1)
Qt Version: 4.5.2
Operating System: Linux 2.6.28-15-server i686
Distribution: Ubuntu 9.04

What I was doing when the application crashed:
I was not doing anything plasma-related in particular, just surfing the web on firefox.  Plasma suddenly crashed and reloaded, and I was prompted to file a bug report.

 -- Backtrace:
Application: Plasma Workspace (kdeinit4), signal: Aborted
[Current thread is 0 (LWP 29984)]

Thread 3 (Thread 0xa65a1b90 (LWP 29985)):
#0  0xb8050424 in __kernel_vsyscall ()
#1  0xb65640e5 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2  0xb67442ed in pthread_cond_wait () from /lib/tls/i686/cmov/libc.so.6
#3  0xb7e4a172 in QWaitCondition::wait (this=0xa79ab60, mutex=0xa79ab5c, time=4294967295) at thread/qwaitcondition_unix.cpp:87
#4  0xb7787ac2 in QHostInfoAgent::run (this=0xa79ab50) at kernel/qhostinfo.cpp:260
#5  0xb7e49132 in QThreadPrivate::start (arg=0xa79ab50) at thread/qthread_unix.cpp:188
#6  0xb65604ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#7  0xb673549e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 2 (Thread 0xa5b73b90 (LWP 30365)):
#0  0xb8050424 in __kernel_vsyscall ()
#1  0xb6744643 in ?? () from /lib/tls/i686/cmov/libc.so.6
#2  0xb66c5f5d in ?? () from /lib/tls/i686/cmov/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 0xb606da10 (LWP 29984)):
[KCrash Handler]
#6  0xb8050424 in __kernel_vsyscall ()
#7  0xb667c6d0 in raise () from /lib/tls/i686/cmov/libc.so.6
#8  0xb667e098 in abort () from /lib/tls/i686/cmov/libc.so.6
#9  0xb66ba24d in ?? () from /lib/tls/i686/cmov/libc.so.6
#10 0xb66c1009 in ?? () from /lib/tls/i686/cmov/libc.so.6
#11 0xb66c2b8d in ?? () from /lib/tls/i686/cmov/libc.so.6
#12 0xb66c49c5 in malloc () from /lib/tls/i686/cmov/libc.so.6
#13 0xb7e438ed in qMalloc (size=16404) at global/qmalloc.cpp:55
#14 0xb7e4c6b3 in QByteArray::resize (this=0xf, size=0) at tools/qbytearray.cpp:1336
#15 0xb7ed7d6a in QIODevicePrivate (this=0xabab140) at ../../include/QtCore/private/../../../src/corelib/tools/qringbuffer_p.h:206
#16 0xb7ecf4af in QFilePrivate (this=0xabab140) at io/qfile.cpp:93
#17 0xb7ee99d2 in QTemporaryFilePrivate (this=0xabab140) at io/qtemporaryfile.cpp:432
#18 0xb7eeaeda in QTemporaryFile (this=0xbf86a814) at io/qtemporaryfile.cpp:511
#19 0xb7c89d22 in KTemporaryFile (this=0xbf86a814, componentData=@0xa69c0f0) at /build/buildd/kde4libs-4.3.1/kdecore/io/ktemporaryfile.cpp:44
#20 0xb7dbe0d1 in KLockFile::lock (this=0xb103658, options={i = -1081693740}) at /build/buildd/kde4libs-4.3.1/kdecore/io/klockfile_unix.cpp:136
#21 0xb7593e16 in KPixmapCache::find (this=0x8ef7178, key=@0xbf86acf4, pix=@0xbf86ac68) at /build/buildd/kde4libs-4.3.1/kdeui/util/kpixmapcache.cpp:79
#22 0xb74e3cbb in KIconCache::find (this=0x8ef7178, key=@0xbf86acf4, pix=@0xbf86ac68) at /build/buildd/kde4libs-4.3.1/kdeui/icons/kiconcache.cpp:292
#23 0xb74e4fa0 in KIconCache::find (this=0x8ef7178, key=@0xbf86acf4, pix=@0xbf86ac68, path=0x0) at /build/buildd/kde4libs-4.3.1/kdeui/icons/kiconcache.cpp:277
#24 0xb74d7b16 in KIconLoader::loadIcon (this=0x8eb8eb8, _name=@0xae07678, group=KIconLoader::Desktop, size=32, state=0, overlays=@0xae0767c, path_store=0x0, canReturnNull=false)
    at /build/buildd/kde4libs-4.3.1/kdeui/icons/kiconloader.cpp:1139
#25 0xb74ceef0 in KIconEngine::pixmap (this=0xae07bc8, size=@0xbf86ae90, mode=QIcon::Normal, state=QIcon::Off) at /build/buildd/kde4libs-4.3.1/kdeui/icons/kiconengine.cpp:119
#26 0xb6a9f596 in QIcon::pixmap (this=0xbf86ae98, size=@0xbf86ae90, mode=QIcon::Normal, state=QIcon::Off) at image/qicon.cpp:713
#27 0xa86556c8 in ?? () from /usr/lib/kde4/plasma_applet_daisy.so
#28 0xa8655e5c in ?? () from /usr/lib/kde4/plasma_applet_daisy.so
#29 0xa8666b32 in ?? () from /usr/lib/kde4/plasma_applet_daisy.so
#30 0xb7f531b8 in QMetaObject::activate (sender=0x8f9eeb0, from_signal_index=7, to_signal_index=7, argv=0xbf86b08c) at kernel/qobject.cpp:3113
#31 0xb7f53e42 in QMetaObject::activate (sender=0x8f9eeb0, m=0xb76c024c, local_signal_index=3, argv=0xbf86b08c) at kernel/qobject.cpp:3187
#32 0xb76574a3 in KWindowSystem::activeWindowChanged (this=0x8f9eeb0, _t1=75497557) at /build/buildd/kde4libs-4.3.1/obj-i486-linux-gnu/kdeui/kwindowsystem.moc:134
#33 0xb765a1a1 in KWindowSystemPrivate::x11Event (this=0x8fa6370, ev=0xbf86c70c) at /build/buildd/kde4libs-4.3.1/kdeui/windowmanagement/kwindowsystem_x11.cpp:143
#34 0xb750ab79 in KApplication::x11EventFilter (this=0x8eb38b0, _event=0xbf86c70c) at /build/buildd/kde4libs-4.3.1/kdeui/kernel/kapplication.cpp:911
#35 0xb3c72c37 in PlasmaApp::x11EventFilter (this=0x8eb38b0, event=0xbf86c70c) at /build/buildd/kdebase-workspace-4.3.1/plasma/shells/desktop/plasmaapp.cpp:490
#36 0xb6a5de5e in qt_x11EventFilter (ev=0xbf86c70c) at kernel/qapplication_x11.cpp:375
#37 0xb6a706df in QApplication::x11ProcessEvent (this=0x8eb38b0, event=0xbf86c70c) at kernel/qapplication_x11.cpp:3271
#38 0xb6a9d37a in x11EventSourceDispatch (s=0x8ebc1f8, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#39 0xb65adb88 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#40 0xb65b10eb in ?? () from /usr/lib/libglib-2.0.so.0
#41 0xb65b1268 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#42 0xb7f692f8 in QEventDispatcherGlib::processEvents (this=0x8eb90f0, flags={i = -1081685816}) at kernel/qeventdispatcher_glib.cpp:327
#43 0xb6a9ca75 in QGuiEventDispatcherGlib::processEvents (this=0x8eb90f0, flags={i = -1081685768}) at kernel/qguieventdispatcher_glib.cpp:202
#44 0xb7f3c1fa in QEventLoop::processEvents (this=0xbf86c970, flags={i = -1081685704}) at kernel/qeventloop.cpp:149
#45 0xb7f3c642 in QEventLoop::exec (this=0xbf86c970, flags={i = -1081685640}) at kernel/qeventloop.cpp:201
#46 0xb7f3eae9 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888
#47 0xb69fabb7 in QApplication::exec () at kernel/qapplication.cpp:3525
#48 0xb3c5d310 in kdemain (argc=1, argv=0x8e8c308) at /build/buildd/kdebase-workspace-4.3.1/plasma/shells/desktop/main.cpp:50
#49 0x0804e27d in launch (argc=1, _name=0x8e3957c "/usr/bin/plasma-desktop", args=0x8e39594 "", cwd=0x0, envc=0, envs=0x8e39598 "", reset_env=false, tty=0x0, avoid_loops=false, 
    startup_id_str=0x805136d "0") at /build/buildd/kde4libs-4.3.1/kinit/kinit.cpp:677
#50 0x0804ea5d in handle_launcher_request (sock=7, who=<value optimized out>) at /build/buildd/kde4libs-4.3.1/kinit/kinit.cpp:1169
#51 0x0804efe5 in handle_requests (waitForPid=0) at /build/buildd/kde4libs-4.3.1/kinit/kinit.cpp:1362
#52 0x0804fbca in main (argc=2, argv=0xbf86d164, envp=0xbf86d170) at /build/buildd/kde4libs-4.3.1/kinit/kinit.cpp:1793

Reported using DrKonqi
Comment 1 Dario Andres 2009-09-02 22:21:32 UTC
Mh, the crash seems related to the Daisy widget, however it points to something in kdelibs ...

Comment 2 Christoph Feck 2010-01-09 18:28:21 UTC
Since the size 16404 is appropiate, malloc detected a memory corruption. This could happen anywhere, not just in calls leading to this backtrace. As such, this bug report is useless.
Comment 3 Christoph Feck 2010-10-14 00:27:08 UTC
(I quickly reviewed the backtrace of this crash, and it appears to be caused by KIconCache memory corruption. If this is not the case, please reopen.)

Closing all KIconCache crashes as fixed, because the KIconLoader in KDE SC 4.5 now uses KSharedDataCache to cache icons, and it is believed that the new class is less prone to random crashes or memory corruption.

If you still can reproduce a crash with version 4.5, please report it separately. If you cannot upgrade to 4.5 yet, you should be able to work around this crash by deleting the icon cache files in /var/tmp/kdecache-<user>/kpc