Bug 211401 - Applications crash at startup when running as a different user [QDataStream::operator>>, KServiceFactory::KServiceFactory, KServiceFactory::self]
Summary: Applications crash at startup when running as a different user [QDataStream::...
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kdecore (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 206225 211323 214934 215420 215460 215742 216028 216704 216724 217781 218305 219251 219910 220019 220784 220924 220954 221670 222908 224402 224657 226101 226225 230375 232156 232309 236451 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-10-22 03:23 UTC by Alam
Modified: 2015-09-19 22:17 UTC (History)
31 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alam 2009-10-22 03:23:54 UTC
Application that crashed: kwrite
Version of the application: 4.3.2 (KDE 4.3.2)
KDE Version: 4.3.2 (KDE 4.3.2)
Qt Version: 4.5.2
Operating System: Linux 2.6.31.1-56.fc12.x86_64 x86_64

What I was doing when the application crashed:
Application crashed, when just run it.
following packaged installed. 
system is fresh installed
kdebase-4.3.2-3.fc12.x86_64
qt-4.5.2-25.fc12.x86_64
pango-1.26.0-1.fc12.x86_64


 -- Backtrace:
Application: के-राइट (kwrite), signal: Segmentation fault
[KCrash Handler]
#5  0x00007f62b8e8d77c in QDataStream::operator>>(int&) () from /usr/lib64/libQtCore.so.4
#6  0x00007f62ba168f1f in KServiceFactory::KServiceFactory() () from /usr/lib64/libkdecore.so.5
#7  0x00007f62ba1691fa in KServiceFactory::self() () from /usr/lib64/libkdecore.so.5
#8  0x00007f62ba16162d in KService::serviceByDesktopName(QString const&) () from /usr/lib64/libkdecore.so.5
#9  0x00007f62bb9c69b2 in KTextEditor::EditorChooser::editor(QString const&, bool) () from /usr/lib64/libktexteditor.so.4
#10 0x00007f62bbbe93af in KDialog::setButtons(QFlags<KDialog::ButtonCode>) () from /usr/lib64/libkdeinit4_kwrite.so
#11 0x00007f62bbbebedf in kdemain () from /usr/lib64/libkdeinit4_kwrite.so
#12 0x00007f62b809ab4d in __libc_start_main () from /lib64/libc.so.6
#13 0x00000000004006c9 in _start ()

Reported using DrKonqi
Comment 1 Dario Andres 2009-10-22 14:59:42 UTC
- Do you have user permissions in /var/tmp/kdecache-$USER/  ?
- Does running "kbuildsycoca4 --noincremental" as user fixes this ?
- Does reinstalling "kdelibs", "kdebase" ("kdebase-apps" and "kdebase-runtime") fixes this ?
I guess you are not using SSH (like bug 211323), but you are using Fedora too.. that may be the connection.
Thanks
Comment 2 Christoph Feck 2009-11-20 15:56:58 UTC
*** Bug 215420 has been marked as a duplicate of this bug. ***
Comment 3 Christoph Feck 2009-11-23 02:55:31 UTC
Happens with many applications, probably started from a different user account, reassigning to kdelibs.
Comment 4 Christoph Feck 2009-11-23 02:56:18 UTC
*** Bug 215460 has been marked as a duplicate of this bug. ***
Comment 5 Christoph Feck 2009-11-23 02:56:42 UTC
*** Bug 215742 has been marked as a duplicate of this bug. ***
Comment 6 Dario Andres 2009-11-25 02:02:21 UTC
*** Bug 216028 has been marked as a duplicate of this bug. ***
Comment 7 Christoph Feck 2009-11-30 02:04:56 UTC
*** Bug 216704 has been marked as a duplicate of this bug. ***
Comment 8 Christoph Feck 2009-11-30 02:06:43 UTC
*** Bug 216724 has been marked as a duplicate of this bug. ***
Comment 9 Christoph Feck 2009-12-08 22:52:25 UTC
A backtrace with debugging symbols enabled would be nice. Please install them, and try to reproduce the issue.

See also http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports
Comment 10 Dario Andres 2009-12-12 23:57:40 UTC
From bug 217781:
---
#5  QDataStream::operator>> (this=0x0, i=@0x7fffeab00f4c) at
io/qdatastream.cpp:715
#6  0x00007f4cff57578f in KServiceFactory::KServiceFactory (this=0x7530d0) at
/usr/src/debug/kdelibs-4.3.4/kdecore/services/kservicefactory.cpp:44
#7  0x00007f4cff575a52 in self (this=<value optimized out>) at
/usr/src/debug/kdelibs-4.3.4/kdecore/sycoca/ksycocafactory.h:200
#8  KServiceFactory::self (this=<value optimized out>) at
/usr/src/debug/kdelibs-4.3.4/kdecore/services/kservicefactory.cpp:75
#9  0x00007f4cff56da1d in KService::serviceByDesktopName (_name=<value
optimized out>) at
/usr/src/debug/kdelibs-4.3.4/kdecore/services/kservice.cpp:616
#10 0x00007f4d0127b192 in KTextEditor::EditorChooser::editor (postfix=<value
optimized out>, fallBackToKatePart=true) at
/usr/src/debug/kdelibs-4.3.4/interfaces/ktexteditor/editorchooser.cpp:129
#11 0x00007f4d017f9cff in KWrite::KWrite (this=0x752180, doc=0x0,
__in_chrg=<value optimized out>, __vtt_parm=<value optimized out>) at
/usr/src/debug/kdebase-4.3.4/apps/kwrite/kwritemain.cpp:67
#12 0x00007f4d017fc80f in kdemain (argc=<value optimized out>, argv=<value
optimized out>) at /usr/src/debug/kdebase-4.3.4/apps/kwrite/kwritemain.cpp:715
Comment 11 Dario Andres 2009-12-12 23:57:47 UTC
*** Bug 217781 has been marked as a duplicate of this bug. ***
Comment 12 Dario Andres 2009-12-12 23:59:06 UTC
*** Bug 206225 has been marked as a duplicate of this bug. ***
Comment 13 Dario Andres 2009-12-12 23:59:19 UTC
*** Bug 214934 has been marked as a duplicate of this bug. ***
Comment 14 Dominik Haumann 2009-12-13 04:57:21 UTC
Is this really a KWrite issue? Looks like a crash in kdecore... and this=0x0 in QDataStream...
Comment 15 Dario Andres 2009-12-13 13:29:15 UTC
The bug report is already on kdelibs/kdecore... as it affected other apps too...
Comment 16 Christoph Feck 2009-12-19 09:33:38 UTC
*** Bug 219251 has been marked as a duplicate of this bug. ***
Comment 17 Christoph Feck 2009-12-19 09:55:21 UTC
I see the following problem:

In KSycocaFactory constructor, the m_stream is only initialized when the sycoca is not building. In KServiceFactory constructor, this stream is used after the same check, but I am not sure if between those two checks the value of isBuilding() could change.
Comment 18 Christoph Feck 2009-12-19 10:19:32 UTC
*** Bug 211323 has been marked as a duplicate of this bug. ***
Comment 19 David Faure 2009-12-19 12:08:13 UTC
Christoph: this can't be an issue. isBuilding() only true in kbuildsycoca4 and always false in every other KDE application that uses ksycoca.

Are there actual steps to reproduce this bug?
Comment 20 Dario Andres 2009-12-24 14:00:26 UTC
*** Bug 219910 has been marked as a duplicate of this bug. ***
Comment 21 Dario Andres 2009-12-24 14:07:50 UTC
*** Bug 218305 has been marked as a duplicate of this bug. ***
Comment 22 Christoph Feck 2009-12-26 03:00:50 UTC
*** Bug 220019 has been marked as a duplicate of this bug. ***
Comment 23 Christoph Feck 2009-12-31 15:48:21 UTC
*** Bug 220784 has been marked as a duplicate of this bug. ***
Comment 24 Christoph Feck 2010-01-01 23:22:09 UTC
*** Bug 220924 has been marked as a duplicate of this bug. ***
Comment 25 Christoph Feck 2010-01-02 12:42:41 UTC
*** Bug 220954 has been marked as a duplicate of this bug. ***
Comment 26 Christoph Feck 2010-01-07 17:13:07 UTC
*** Bug 221670 has been marked as a duplicate of this bug. ***
Comment 27 Christoph Feck 2010-01-16 00:43:41 UTC
*** Bug 222908 has been marked as a duplicate of this bug. ***
Comment 28 Sebastian Sauer 2010-01-18 00:32:50 UTC
SVN commit 1076301 by sebsauer:

backport r1048522 by kuemmel from trunk to 4.3 branch;
don't crash
BUG:211401



 M  +2 -0      kservicefactory.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1076301
Comment 29 Sebastian Sauer 2010-01-18 00:38:22 UTC
Fixed in 4.3.5 and 4.4.0.
Comment 30 Christoph Feck 2010-01-18 01:05:26 UTC
If the assert isn't compiled to a no-op, this still "crashes".
Comment 31 Christoph Feck 2010-01-27 00:43:15 UTC
*** Bug 224402 has been marked as a duplicate of this bug. ***
Comment 32 Christoph Feck 2010-01-28 20:57:27 UTC
*** Bug 224657 has been marked as a duplicate of this bug. ***
Comment 33 Dario Andres 2010-02-10 21:09:48 UTC
*** Bug 226101 has been marked as a duplicate of this bug. ***
Comment 34 Jonathan Thomas 2010-02-11 00:24:18 UTC
*** Bug 226225 has been marked as a duplicate of this bug. ***
Comment 35 Christoph Feck 2010-03-11 22:51:24 UTC
*** Bug 230375 has been marked as a duplicate of this bug. ***
Comment 36 Christoph Feck 2010-03-25 22:06:27 UTC
*** Bug 232156 has been marked as a duplicate of this bug. ***
Comment 37 Christoph Feck 2010-03-27 07:36:55 UTC
*** Bug 232309 has been marked as a duplicate of this bug. ***
Comment 38 Olivier Trichet 2010-05-24 17:15:19 UTC
*** Bug 236451 has been marked as a duplicate of this bug. ***
Comment 39 David Faure 2011-06-07 21:41:03 UTC
Git commit 5205232fe23d0a2997a308eee85524a3caad3763 by David Faure.
Committed on 07/06/2011 at 13:26.
Pushed by dfaure into branch 'KDE/4.6'.

Fix DBus timeout when kbuilsycoca takes too much time to run

... or when a kuniqueapplication takes time to start.

This should fix a large number of bugs where ksycoca code crashes
due to not waiting enough for kbuildsycoca.

I'll also get a patch into future versions of Qt to make the timeout
configurable in QDBusAbstractInterface, so that we don't have to port
all the possibly-long dbus calls to QDBusConnection like in this patch.

CCBUG: 211401

M  +1    -1    kdecore/kernel/ktoolinvocation.cpp     
M  +7    -4    kdeui/kernel/kuniqueapplication.cpp     

http://commits.kde.org/kdelibs/5205232fe23d0a2997a308eee85524a3caad3763
Comment 40 David Faure 2015-09-19 22:17:32 UTC
And now in KF 5.15, ksycoca rebuilds the cache itself, no DBus involved anymore.