Opened 13 years ago

Closed 12 years ago

#30578 closed defect (wontfix)

KDE programs not starting (KDE 4.7.0)

Reported by: jgosmann (Jan Gosmann) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.0.1
Keywords: kde Cc: nerdling (Jeremy Lavergne), sharky@…, mkae (Marko Käning), michaelld (Michael Dickens), m214089, ak.ml@…, tobias.luetticke@…
Port: kde4-baseapps

Description (last modified by mf2k (Frank Schima))

It seems that not even a single KDE program is starting. gdb reveals that they are waiting for a semaphore or mutex:

(gdb) backtrace
#0  0x00007fff89f05a6a in __semwait_signal ()
#1  0x00007fff89f09881 in _pthread_cond_wait ()
#2  0x000000010175c0cb in QMutexPrivate::wait ()
#3  0x0000000101759ddf in QMutex::lock ()
#4  0x00000001013b8a6f in KDebug::hasNullOutput ()
#5  0x000000010141e1d3 in getBundle ()
#6  0x000000010141f094 in checkExecutable ()
#7  0x000000010141f4b8 in KStandardDirs::findExe ()
#8  0x000000010141fca9 in KStandardDirs::KStandardDirsPrivate::createSpecialResource ()
#9  0x0000000101420b9f in KStandardDirs::KStandardDirsPrivate::resourceDirs ()
#10 0x000000010142207a in KStandardDirs::resourceDirs ()
#11 0x0000000101424ddb in KStandardDirs::saveLocation ()
#12 0x00000001014258dd in KStandardDirs::locateLocal ()
#13 0x0000000101425b89 in KStandardDirs::locateLocal ()
#14 0x00000001013db02a in KTemporaryFile::KTemporaryFile ()
#15 0x0000000101549669 in KLockFile::lock ()
#16 0x000000010134a5cd in KConfigIniBackend::lock ()
#17 0x000000010132d98d in KConfigPrivate::lockLocal ()
#18 0x0000000101330fe4 in KConfig::sync ()
#19 0x00000001013bc652 in KDebugPrivate::writeGroupForNamedArea ()
#20 0x00000001013b8e5e in KDebug::registerArea ()
#21 0x0000000101558fb0 in ksdcArea ()
#22 0x0000000101559295 in ensureFileAllocated ()
#23 0x000000010155d530 in KSharedDataCache::Private::mapSharedMemory ()
#24 0x0000000101559770 in KSharedDataCache::KSharedDataCache ()
#25 0x0000000100dcf0c6 in KIconLoaderPrivate::init ()
#26 0x0000000100dcf901 in KIconLoader::KIconLoader ()
#27 0x0000000100dcfb12 in KIconLoader::global ()
#28 0x0000000100dc6513 in KIcon::KIcon ()
#29 0x0000000100e34b14 in KApplicationPrivate::parseCommandLine ()
#30 0x0000000100e35655 in KApplicationPrivate::init ()
#31 0x0000000100e36c31 in KApplication::KApplication ()
#32 0x0000000100012f21 in KonquerorApplication::KonquerorApplication ()
#33 0x00000001000cf598 in kdemain ()
#34 0x0000000100007ec4 in start ()

I have KDE 4.7.0 installed.

I am not completely sure whether this is a MacPorts problem or whether I should report this problem in the KDE bug tracker.

If you need more information I, tell me and I will try to provide it. (But I won't be able to do so until next week.)

Change History (15)

comment:1 Changed 13 years ago by jgosmann (Jan Gosmann)

Sorry, I messed up the gdb output. Here it is again properly formatted:

(gdb) backtrace
#0  0x00007fff89f05a6a in __semwait_signal ()
#1  0x00007fff89f09881 in _pthread_cond_wait ()
#2  0x000000010175c0cb in QMutexPrivate::wait ()
#3  0x0000000101759ddf in QMutex::lock ()
#4  0x00000001013b8a6f in KDebug::hasNullOutput ()
#5  0x000000010141e1d3 in getBundle ()
#6  0x000000010141f094 in checkExecutable ()
#7  0x000000010141f4b8 in KStandardDirs::findExe ()
#8  0x000000010141fca9 in KStandardDirs::KStandardDirsPrivate::createSpecialResource ()
#9  0x0000000101420b9f in KStandardDirs::KStandardDirsPrivate::resourceDirs ()
#10 0x000000010142207a in KStandardDirs::resourceDirs ()
#11 0x0000000101424ddb in KStandardDirs::saveLocation ()
#12 0x00000001014258dd in KStandardDirs::locateLocal ()
#13 0x0000000101425b89 in KStandardDirs::locateLocal ()
#14 0x00000001013db02a in KTemporaryFile::KTemporaryFile ()
#15 0x0000000101549669 in KLockFile::lock ()
#16 0x000000010134a5cd in KConfigIniBackend::lock ()
#17 0x000000010132d98d in KConfigPrivate::lockLocal ()
#18 0x0000000101330fe4 in KConfig::sync ()
#19 0x00000001013bc652 in KDebugPrivate::writeGroupForNamedArea ()
#20 0x00000001013b8e5e in KDebug::registerArea ()
#21 0x0000000101558fb0 in ksdcArea ()
#22 0x0000000101559295 in ensureFileAllocated ()
#23 0x000000010155d530 in KSharedDataCache::Private::mapSharedMemory ()
#24 0x0000000101559770 in KSharedDataCache::KSharedDataCache ()
#25 0x0000000100dcf0c6 in KIconLoaderPrivate::init ()
#26 0x0000000100dcf901 in KIconLoader::KIconLoader ()
#27 0x0000000100dcfb12 in KIconLoader::global ()
#28 0x0000000100dc6513 in KIcon::KIcon ()
#29 0x0000000100e34b14 in KApplicationPrivate::parseCommandLine ()
#30 0x0000000100e35655 in KApplicationPrivate::init ()
#31 0x0000000100e36c31 in KApplication::KApplication ()
#32 0x0000000100012f21 in KonquerorApplication::KonquerorApplication ()
#33 0x00000001000cf598 in kdemain ()
#34 0x0000000100007ec4 in start ()

comment:2 Changed 13 years ago by nerdling (Jeremy Lavergne)

Cc: snc@… sharky@… jan@… mk@… michaelld@… added; snc@… removed
Keywords: kde added

comment:3 Changed 13 years ago by nerdling (Jeremy Lavergne)

We'd have to find out what beat this function to locking the mutex.

http://www.jp.kde.org/~ichi/qt/qmutex.html#lock

I'd report it to KDE, they know their software better than we do.

comment:4 Changed 13 years ago by mf2k (Frank Schima)

Description: modified (diff)

comment:5 Changed 13 years ago by m214089

Cc: luis.kornblueh@… added

Cc Me!

comment:6 Changed 13 years ago by jgosmann (Jan Gosmann)

Can you post a link to the report in the KDE bug tracker?

comment:7 Changed 13 years ago by ak.ml@…

I had the same issue, and I think I solved it by launching kdeinit.app as it was suggested after each kde install (disappeared at r59663).

open /Applications/MacPorts/KDE4/kdeinit4.app

But first you might consider cleaning the KDE cache and maybe the temporary KDE directory. Looking at the stack trace and at my hang files, I think the icon cache might be the cause here. For the paths:

kde4-config --path cache
kde4-config --path tmp

comment:8 Changed 13 years ago by jgosmann (Jan Gosmann)

Thanks a lot! Launching kdeinit4.app solved the problem for me.

comment:9 in reply to:  7 Changed 13 years ago by mkae (Marko Käning)

Replying to ak.ml@…:

I had the same issue, and I think I solved it by launching kdeinit.app as it was suggested after each kde install (disappeared at r59663).

You are right, instead this line should have been removed from that user message:

    ui_msg "#  'sudo chown -R \$USER ~/Library/Preferences/KDE'  " 

since that directory shouldn't have non-$USER permissions anymore (see https://bugs.kde.org/show_bug.cgi?id=233892 and http://trac.macports.org/ticket/26982 ).

comment:10 Changed 13 years ago by ak.ml@…

Cc: ak.ml@… added

Cc Me!

comment:11 Changed 13 years ago by macports@…

I'll try to submit a patch for this, but in the mean time:

This is because KDebug is not re-entrant safe, but when you first log a message to the debug output, it does some work which in turn causes debug messages to be written. At this point it deadlocks.

One (but not necessarily the correct) solution to this is to make KDebugPrivate::mutex recursive, by modifying the KDebugPrivate constructor (kdecore/io/kdebug.cpp:220) to construct it passing in QMutex::Recursive as a parameter.

comment:12 Changed 13 years ago by tobias.luetticke@…

Cc: tobias.luetticke@… added

Cc Me!

comment:13 Changed 12 years ago by jmroot (Joshua Root)

Cc: jan@… removed

Is this still a problem with 4.8.2?

comment:14 Changed 12 years ago by jgosmann (Jan Gosmann)

As stated before the problem was solved for me by starting kdeinit4.app and right now (with KDE 4.8.3_2) I can still start KDE applications.

comment:15 Changed 12 years ago by mkae (Marko Käning)

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.