Bug 284770

Summary: KSharedDataCache crashes on architecture change
Product: [Unmaintained] kdelibs Reporter: Oswald Buddenhagen <ossi>
Component: kshareddatacacheAssignee: Michael Pyne <mpyne>
Status: RESOLVED WORKSFORME    
Severity: crash CC: justin.zobel, mathieu.clabaut, mpyne
Priority: NOR    
Version: 4.9-Git   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=309824
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Oswald Buddenhagen 2011-10-23 11:21:22 UTC
Version:           Git (using Devel) 
OS:                Linux

i switched my system from i686 to x86_64. now every application crashes on startup:

Program received signal SIGBUS, Bus error.
0x00007ffff5b8702f in lock (this=0x6539c0) at /home/ossi/src/kde/trunk/kdelibs/kdecore/util/kshareddatacache.cpp:1123
1123            if (KDE_ISLIKELY(shm && shm->shmLock.type == m_expectedType)) {
(gdb) bt
#0  0x00007ffff5b8702f in lock (this=0x6539c0) at /home/ossi/src/kde/trunk/kdelibs/kdecore/util/kshareddatacache.cpp:1123
#1  KSharedDataCache::Private::CacheLocker::cautiousLock (this=0x7fffffffd398) at /home/ossi/src/kde/trunk/kdelibs/kdecore/util/kshareddatacache.cpp:1146
#2  0x00007ffff5b87295 in CacheLocker (this=0x7fffffffd398, _d=<optimized out>) at /home/ossi/src/kde/trunk/kdelibs/kdecore/util/kshareddatacache.cpp:1221
#3  KSharedDataCache::Private::CacheLocker::CacheLocker (this=0x7fffffffd398, _d=<optimized out>) at /home/ossi/src/kde/trunk/kdelibs/kdecore/util/kshareddatacache.cpp:1167
#4  0x00007ffff5b85513 in KSharedDataCache::find (this=0x66c540, key=..., destination=0x7fffffffd438) at /home/ossi/src/kde/trunk/kdelibs/kdecore/util/kshareddatacache.cpp:1492
#5  0x00007ffff733d5f2 in KIconLoaderPrivate::findCachedPixmapWithPath (this=0x6714d0, key=..., data=..., path=...) at /home/ossi/src/kde/trunk/kdelibs/kdeui/icons/kiconloader.cpp:860
#6  0x00007ffff733ed4c in KIconLoader::loadIcon (this=0x63b7c0, _name=<optimized out>, group=KIconLoader::Desktop, size=16, state=0, overlays=..., path_store=0x0, canReturnNull=false)
    at /home/ossi/src/kde/trunk/kdelibs/kdeui/icons/kiconloader.cpp:1222
#7  0x00007ffff733a166 in KIconEngine::pixmap (this=<optimized out>, size=..., mode=<optimized out>, state=<optimized out>)
    at /home/ossi/src/kde/trunk/kdelibs/kdeui/icons/kiconengine.cpp:104
#8  0x00007ffff60e0ed2 in QIcon::pixmap (this=<optimized out>, size=<optimized out>, mode=<optimized out>, state=<optimized out>)
    at /home/ossi/src/troll/qt-47/src/gui/image/qicon.cpp:676
#9  0x00007ffff60d7f64 in QWidgetPrivate::setWindowIcon_sys (this=0x66fa80, forceReset=false) at /home/ossi/src/troll/qt-47/src/gui/kernel/qwidget_x11.cpp:1459
#10 0x00007ffff609f11c in QWidget::event (this=0x63a8e0, event=0x7fffffffdf00) at /home/ossi/src/troll/qt-47/src/gui/kernel/qwidget.cpp:8411
#11 0x00007ffff606398a in notify_helper (e=0x7fffffffdf00, receiver=0x63a8e0, this=0x636ee0) at /home/ossi/src/troll/qt-47/src/gui/kernel/qapplication.cpp:4509
#12 QApplicationPrivate::notify_helper (this=0x636ee0, receiver=0x63a8e0, e=0x7fffffffdf00) at /home/ossi/src/troll/qt-47/src/gui/kernel/qapplication.cpp:4481
#13 0x00007ffff606a576 in QApplication::notify (this=0x7fffffffe4c0, receiver=0x63a8e0, e=0x7fffffffdf00) at /home/ossi/src/troll/qt-47/src/gui/kernel/qapplication.cpp:4474
#14 0x00007ffff73749bd in KApplication::notify (this=0x7fffffffe4c0, receiver=0x63a8e0, event=0x7fffffffdf00) at /home/ossi/src/kde/trunk/kdelibs/kdeui/kernel/kapplication.cpp:311
#15 0x00007ffff5449eee in QCoreApplication::notifyInternal (this=0x7fffffffe4c0, receiver=0x63a8e0, event=<optimized out>)
    at /home/ossi/src/troll/qt-47/src/corelib/kernel/qcoreapplication.cpp:787
#16 0x00007ffff60657da in QApplication::setWindowIcon (icon=...) at /home/ossi/src/troll/qt-47/src/gui/kernel/qapplication.cpp:2112
#17 0x00007ffff7373e79 in KApplicationPrivate::parseCommandLine (this=0x66fe70) at /home/ossi/src/kde/trunk/kdelibs/kdeui/kernel/kapplication.cpp:839
#18 0x00007ffff7374aa4 in KApplicationPrivate::init (this=0x66fe70, GUIenabled=true) at /home/ossi/src/kde/trunk/kdelibs/kdeui/kernel/kapplication.cpp:478
#19 0x00007ffff73754f1 in KApplication::KApplication (this=0x7fffffffe4c0, GUIenabled=true, cData=...) at /home/ossi/src/kde/trunk/kdelibs/kdeui/kernel/kapplication.cpp:387
#20 0x00007ffff7379ff4 in KUniqueApplication::KUniqueApplication (this=0x7fffffffe4c0, GUIenabled=true, configUnique=<optimized out>)
    at /home/ossi/src/kde/trunk/kdelibs/kdeui/kernel/kuniqueapplication.cpp:314
#21 0x00000000004054cf in main (argc=2, argv=0x7fffffffe718) at /home/ossi/src/kde/trunk/kde-baseapps/kdepasswd/kdepasswd.cpp:61

from a quick check, the problem is that the cache header contains fields with arch-specific size and does not encode the arch in any way.

Reproducible: Always

Steps to Reproduce:
gdb --args kdepasswd --nofork    # or something like that.


Expected Results:  
(this form is exceedingly anal)
Comment 1 Michael Pyne 2011-10-23 12:27:33 UTC
> from a quick check, the problem is that the cache header contains fields with
arch-specific size and does not encode the arch in any way.

Hmm... quite. :(

The "quick" fix is just to remove all *.kcache files under the KDE cache directory but I suppose I will have to handle this case as well.
Comment 2 Mathieu Clabaut 2011-11-22 12:56:24 UTC
*** Bug 286341 has been marked as a duplicate of this bug. ***
Comment 3 Justin Zobel 2020-12-13 05:21:59 UTC
Thank you for the crash report.

As it has been a while since this was reported, can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved.

I have set the bug status to "needsinfo" pending your response, please change back to "reported" or "resolved/worksforme" when you respond, thank you.
Comment 4 Bug Janitor Service 2020-12-28 04:34:37 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2021-01-12 04:34:13 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!