Bug 334640

Summary: Krunner crashed directly after login
Product: [Frameworks and Libraries] kdelibs Reporter: Attila <bugs.kde.attila>
Component: kshareddatacacheAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: crash CC: 411skitrip, alexander.lohnau, andi, bugs.kde.attila, christoph.ruessler, gijsbert, ioannis_s, mpyne, rdieter, steven.r.king, travneff
Priority: NOR Keywords: drkonqi, triaged
Version: 4.12.4   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: New crash information added by DrKonqi
New crash information added by DrKonqi
Crash reporter log
New crash information added by DrKonqi
Backtrace of crash

Description Attila 2014-05-12 08:12:53 UTC
Application: krunner (4.11.8)
KDE Platform Version: 4.12.4
Qt Version: 4.8.5
Operating System: Linux 3.13.10-200.fc20.i686+PAE i686
Distribution: "Fedora release 20 (Heisenbug)"

-- Information about the crash:
- What I was doing when the application crashed:

I did nothing extraordinary. After login, when the splash screen disappears, krunner crashes with segmentation fault.

The crash can be reproduced sometimes.

-- Backtrace:
Application: Oberfläche zur Ausführung von Befehlen (krunner), signal: Segmentation fault
Using host libthread_db library "/lib/libthread_db.so.1".
[KCrash Handler]
#6  0x4632f678 in __lll_unlock_elision () from /lib/libpthread.so.0
#7  0x46328c27 in pthread_mutex_unlock () from /lib/libpthread.so.0
#8  0x4d21efdf in pthreadLock::unlock() () from /lib/libkdecore.so.5
#9  0x4d21e6b9 in KSharedDataCache::find(QString const&, QByteArray*) const () from /lib/libkdecore.so.5
#10 0x4dfb270b in KIconLoaderPrivate::findCachedPixmapWithPath(QString const&, QPixmap&, QString&) () from /lib/libkdeui.so.5
#11 0x4dfb2b00 in KIconLoader::loadIcon(QString const&, KIconLoader::Group, int, int, QStringList const&, QString*, bool) const () from /lib/libkdeui.so.5
#12 0x4dfa9e10 in KIconEngine::pixmap(QSize const&, QIcon::Mode, QIcon::State) () from /lib/libkdeui.so.5
#13 0x479fef73 in QIcon::pixmap(QSize const&, QIcon::Mode, QIcon::State) const () from /lib/libQtGui.so.4
#14 0x479ef16b in QWidgetPrivate::setWindowIcon_sys(bool) () from /lib/libQtGui.so.4
#15 0x479996f8 in QWidget::create(unsigned long, bool, bool) () from /lib/libQtGui.so.4
#16 0x47999c00 in QWidgetPrivate::createWinId(unsigned long) () from /lib/libQtGui.so.4
#17 0x47999d0d in QWidget::winId() const () from /lib/libQtGui.so.4
#18 0x4e168984 in KWindowSystemPrivate::KWindowSystemPrivate(int) () from /lib/libkdeui.so.5
#19 0x4e169c23 in KWindowSystem::init(int) () from /lib/libkdeui.so.5
#20 0x4e169efe in KWindowSystem::connectNotify(char const*) () from /lib/libkdeui.so.5
#21 0x4713be86 in QObject::connect(QObject const*, char const*, QObject const*, char const*, Qt::ConnectionType) () from /lib/libQtCore.so.4
#22 0x4e026887 in KStartupInfo::KStartupInfo(int, QObject*) () from /lib/libkdeui.so.5
#23 0x4d925119 in StartupId::StartupId(QWidget*, char const*) () from /lib/libkdeinit4_krunner.so
#24 0x4d90b95e in KRunnerApp::initializeStartupNotification() () from /lib/libkdeinit4_krunner.so
#25 0x4d90cae4 in KRunnerApp::initialize() () from /lib/libkdeinit4_krunner.so
#26 0x4d90d536 in KRunnerApp::KRunnerApp() () from /lib/libkdeinit4_krunner.so
#27 0x4d90d5be in KRunnerApp::self() () from /lib/libkdeinit4_krunner.so
#28 0x4d90dad5 in kdemain () from /lib/libkdeinit4_krunner.so
#29 0x0804871c in main ()

Reported using DrKonqi
Comment 1 Attila 2014-05-16 06:41:04 UTC
Created attachment 86662 [details]
New crash information added by DrKonqi

krunner (4.11.9) on KDE Platform 4.12.5 using Qt 4.8.6

I have this crash every day after first start and login.

-- Backtrace (Reduced):
#8  0xb6251f7f in pthreadLock::unlock() () from /lib/libkdecore.so.5
#9  0xb6251659 in KSharedDataCache::find(QString const&, QByteArray*) const () from /lib/libkdecore.so.5
#10 0xb6ff252b in KIconLoaderPrivate::findCachedPixmapWithPath(QString const&, QPixmap&, QString&) () from /lib/libkdeui.so.5
#11 0xb6ff2920 in KIconLoader::loadIcon(QString const&, KIconLoader::Group, int, int, QStringList const&, QString*, bool) const () from /lib/libkdeui.so.5
#12 0xb6fe9c30 in KIconEngine::pixmap(QSize const&, QIcon::Mode, QIcon::State) () from /lib/libkdeui.so.5
Comment 2 Christoph Feck 2014-06-13 17:11:58 UTC
*** Bug 336156 has been marked as a duplicate of this bug. ***
Comment 3 Christoph Feck 2014-06-13 17:15:38 UTC
*** Bug 334846 has been marked as a duplicate of this bug. ***
Comment 4 Christoph Feck 2014-06-13 17:16:12 UTC
*** Bug 334687 has been marked as a duplicate of this bug. ***
Comment 5 Attila 2014-06-24 06:10:08 UTC
Created attachment 87358 [details]
New crash information added by DrKonqi

plasma-desktop (4.11.9) on KDE Platform 4.12.5 using Qt 4.8.6

- What I was doing when the application crashed:

After login, when the splash screen disappears, plasma-desktop crashes with segmentation fault.

-- Backtrace (Reduced):
#8  0x43b1afdf in pthreadLock::unlock() () from /lib/libkdecore.so.5
#9  0x43b1599d in KSharedDataCache::insert(QString const&, QByteArray const&) () from /lib/libkdecore.so.5
#10 0x448d7513 in KIconLoaderPrivate::insertCachedPixmapWithPath(QString const&, QPixmap const&, QString const&) () from /lib/libkdeui.so.5
#11 0x448d80ff in KIconLoader::loadIcon(QString const&, KIconLoader::Group, int, int, QStringList const&, QString*, bool) const () from /lib/libkdeui.so.5
#12 0x44a9242f in KWindowSystem::icon(unsigned long, int, int, bool, int) () from /lib/libkdeui.so.5
Comment 6 Andrew 2014-08-29 09:39:40 UTC
Created attachment 88484 [details]
Crash reporter log

Happened while KDE startup, did nothing special. Fedora 20 x64, kdelibs-4.13.3-1.fc20.x86_64
Comment 7 Christoph Rüßler 2014-12-03 10:54:08 UTC
Created attachment 89822 [details]
New crash information added by DrKonqi

krunner (4.11.12) on KDE Platform 4.14.2 using Qt 4.8.6

- What I was doing when the application crashed:

After logging in, I waited for the desktop to be started. Nothing but krunner crashed.

-- Backtrace (Reduced):
#6  0x00007fa90a773838 in _xend () at ../nptl/sysdeps/unix/sysv/linux/x86/elision-unlock.c:33
#7  __lll_unlock_elision (lock=0x7fa8fd6e0008, private=128) at ../nptl/sysdeps/unix/sysv/linux/x86/elision-unlock.c:29
#8  0x00007fa912686b06 in unlock (this=0x2641d30) at ../../kdecore/util/kshareddatacache.cpp:1245
#9  ~CacheLocker (this=<synthetic pointer>, __in_chrg=<optimized out>) at ../../kdecore/util/kshareddatacache.cpp:1317
#10 KSharedDataCache::insert (this=0x2643110, key=..., data=...) at ../../kdecore/util/kshareddatacache.cpp:1595
Comment 8 Milian Wolff 2015-06-02 07:33:10 UTC
I also get this extremely often with KDELibs 4.14.8, for me it's the kwallet service that's crashing.

Application: KDE Wallet Service (kwalletd), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[KCrash Handler]
#6  0x00007f07c7650080 in __lll_unlock_elision () from /usr/lib/libpthread.so.0
#7  0x00007f07c6cfc5d2 in KSharedDataCache::find(QString const&, QByteArray*) const () from /usr/lib/libkdecore.so.5
#8  0x00007f07c71a6476 in ?? () from /usr/lib/libkdeui.so.5
#9  0x00007f07c71a683c in KIconLoader::loadIcon(QString const&, KIconLoader::Group, int, int, QStringList const&, QString*, bool) const () from /usr/lib/libkdeui.so.5
#10 0x00007f07c719d9ef in ?? () from /usr/lib/libkdeui.so.5
#11 0x00007f07c58ca535 in QIcon::pixmap(QSize const&, QIcon::Mode, QIcon::State) const () from /usr/lib/libQtGui.so.4
#12 0x00007f07c58bbdaf in QWidgetPrivate::setWindowIcon_sys(bool) () from /usr/lib/libQtGui.so.4
#13 0x00007f07c586f573 in QWidget::setWindowIcon(QIcon const&) () from /usr/lib/libQtGui.so.4
#14 0x00007f07c7172801 in KPasswordDialog::KPasswordDialog(QWidget*, QFlags<KPasswordDialog::KPasswordDialogFlag> const&, QFlags<KDialog::ButtonCode>) () from /usr/lib/libkdeui.so.5
#15 0x00007f07c8093dfa in ?? () from /usr/lib/libkdeinit4_kwalletd.so
#16 0x00007f07c8095f63 in ?? () from /usr/lib/libkdeinit4_kwalletd.so
#17 0x00007f07c80977e6 in ?? () from /usr/lib/libkdeinit4_kwalletd.so
#18 0x00007f07c80983d8 in ?? () from /usr/lib/libkdeinit4_kwalletd.so
#19 0x00007f07c64ef071 in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#20 0x00007f07c58249fc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#21 0x00007f07c582b458 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#22 0x00007f07c71f483a in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#23 0x00007f07c64d5e4d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#24 0x00007f07c64d9211 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#25 0x00007f07c6504e13 in ?? () from /usr/lib/libQtCore.so.4
#26 0x00007f07c1ea99fd in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#27 0x00007f07c1ea9ce0 in ?? () from /usr/lib/libglib-2.0.so.0
#28 0x00007f07c1ea9d8c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#29 0x00007f07c6504f5d in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#30 0x00007f07c58c8326 in ?? () from /usr/lib/libQtGui.so.4
#31 0x00007f07c64d49a1 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#32 0x00007f07c64d4d05 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#33 0x00007f07c64da2a9 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#34 0x00007f07c8089803 in kdemain () from /usr/lib/libkdeinit4_kwalletd.so
#35 0x00007f07c7cf6790 in __libc_start_main () from /usr/lib/libc.so.6
#36 0x0000000000400719 in _start ()
Comment 9 Milian Wolff 2015-06-02 08:02:25 UTC
I just found https://bbs.archlinux.org/viewtopic.php?id=197100 pointing to https://www.archlinux.org/news/changes-to-intel-microcodeupdates/ . Indeed, I was missing that on my arch box here and adding the opcode updater fixed the issue for me.

@everyone else: can you make sure to update your microcodes and check whether the problem still occurs?
Comment 10 Christoph Rüßler 2015-08-15 09:50:22 UTC
I just made sure my machine had the newest Intel microcodes installed (by following http://askubuntu.com/questions/545925/how-to-update-intel-microcode-properly).

Judging by the fact that the crash has not occured for a rather long time now, this issue seems to be solved on my machine.
Comment 11 Andreas Messer 2016-03-11 18:47:55 UTC
The microcode update just hides the problem. I suppose it disabled the TSX feature for your CPU. As far as I know there have been some bugs in the early implementations. On my new Skylake Xeon TSX is available and for me on almost every login a Bunch of KDE application crashes. They run properly after restarting them manually.
I have looked a little bit into the KShareDataCache code. It looks to me that there are a lot of places for exceptions or error returns which might leave the mutex in some locked or unlocked state when it is recreated afterwards. TSX seems to be very sensitive against wrong usage of mutexes.
For tests I have disabled TSX mutexes by setting the mutex type to "Error Checking Mutex". I did not observe any crashes since then. Here is the change I made:
--- a/kdecore/util/kshareddatacache_p.h
+++ b/kdecore/util/kshareddatacache_p.h
@@ -199,6 +199,9 @@
         // Initialize attributes, enable process-shared primitives, and setup
         // the mutex.
         if (::sysconf(_SC_THREAD_PROCESS_SHARED) >= 200112L && pthread_mutexattr_init(&mutexAttr) == 0) {
+            // Use error check mutex to disable TSX mutex
+            pthread_mutexattr_settype(&mutexAttr, PTHREAD_MUTEX_ERRORCHECK);
+
             if (pthread_mutexattr_setpshared(&mutexAttr, PTHREAD_PROCESS_SHARED) == 0 &&
                 pthread_mutex_init(&m_mutex, &mutexAttr) == 0)
             {
Comment 12 Andreas Messer 2016-03-11 18:49:19 UTC
Created attachment 97848 [details]
Backtrace of crash

Here is a backtrace of a crash
Comment 13 Elvis Angelaccio 2016-12-24 16:02:31 UTC
*** Bug 365358 has been marked as a duplicate of this bug. ***
Comment 14 Elvis Angelaccio 2016-12-24 16:03:01 UTC
*** Bug 369373 has been marked as a duplicate of this bug. ***
Comment 15 Andrew Crouthamel 2018-09-26 22:23:00 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 set the bug status 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 16 Attila 2018-09-27 09:31:31 UTC
(In reply to Andrew Crouthamel from comment #15)
> 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.
 
Hi,

it's been 4 years ago since I have reported this bug. I think you can close it.