Opened 13 years ago

Closed 12 years ago

#31332 closed defect (fixed)

kdeinit4 broken after upgrade

Reported by: macports@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: Cc: ak.ml@…, mac.ports.fishspit@…, mkr@…, mtughan@…, thatsafact@…, mkae (Marko Käning)
Port: kdelibs4

Description

Updated to KDE 4.7.1 packages yesterday and can't run any KDE apps since then. kdeinit4 crashes on startup which prevents apps from working properly.

I have reset permissions on the prefs dir, verified dbus is running, rebooted the system, etc all to no avail. I've tried starting kdeinit4 manually as well as allowing app launch to trigger it, result is always the same.

I get a few lines in my system.log in the moments its alive before crashing:

Sep 20 01:46:35 Lapzilla /Applications/MacPorts/KDE4/kdeinit4.app/Contents/MacOS/kdeinit4[3395]: Process 3394 was forked to 3395 without calling exec(). This is not supported by FileManager. Aborting.
Sep 20 01:46:35 Lapzilla /Applications/MacPorts/KDE4/kdeinit4.app/Contents/MacOS/kdeinit4[3397]: Process 3394 was forked to 3397 without calling exec(). This is not supported by FileManager. Aborting.
Sep 20 01:46:35 Lapzilla [0x0-0xc40c4].org.kde.kdeinit4[0]: kdeinit4: (klauncher /usr/local/lib/kde4/libexec/klauncher) Pipe closed unexpectedlykdeinit4: Pipe closed unexpectedly: No such file or directory
Sep 20 01:46:35 Lapzilla ReportCrash[3396]: Saved crash report for kdeinit4[3395] version ??? (???) to /Users/uname/Library/Logs/DiagnosticReports/kdeinit4_2011-09-20-014635_Lapzilla.crash
Sep 20 01:46:36 Lapzilla [0x0-0xc40c4].org.kde.kdeinit4[0]: kdeinit4: (kded4 /Applications/MacPorts/KDE4/kded4.app/Contents/MacOS/kded4) Pipe closed unexpectedlykdeinit4: Pipe closed unexpectedly: No such file or directory
Sep 20 01:46:36 Lapzilla [0x0-0xc40c4].org.kde.kdeinit4[0]: kdeinit4: Communication error with launcher. Exiting!
Sep 20 01:46:36 Lapzilla ReportCrash[3396]: Saved crash report for kdeinit4[3397] version ??? (???) to /Users/uname/Library/Logs/DiagnosticReports/kdeinit4_2011-09-20-014636_Lapzilla.crash

System is running 10.6.8 with all updates, current macports with all ports freshly updated. No problems at KDE 4.7.0, problems started with update to 4.7.1.

Attachments (5)

kdeinit4_2011-09-20-085623_yvanMacPro.crash (27.1 KB) - added by yvan.strahm@… 13 years ago.
kdeinit4_2011-09-20-014635_Lapzilla.crash (27.1 KB) - added by macports@… 13 years ago.
kdeinit4_2011-09-22-092437_lhikan.crash (35.4 KB) - added by mtughan@… 13 years ago.
kdeinit4_2011-09-22-173245_Richard-Allens-MacBook.crash (27.0 KB) - added by thatsafact@… 13 years ago.
MacBook 10.6.8
workaround-kdeinit4-crash.patch (4.6 KB) - added by ak.ml@… 13 years ago.
Updated workaround-kdeinit4-crash.patch

Download all attachments as: .zip

Change History (34)

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

Cc: ak.ml@… added

Cc Me!

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

klauncher /usr/local/lib/kde4/libexec/klauncher

/usr/local... not good. Do you have Homebrew?

Could you attach the content of: /Users/uname/Library/Logs/DiagnosticReports/kdeinit4_2011-09-20-014635_Lapzilla.crash?

Have you tried:

kbuildsycoca4 --noincremental

Changed 13 years ago by yvan.strahm@…

comment:3 Changed 13 years ago by yvan.strahm@…

same problem here, I tried the kbuild command

[yvans@pcus476 ~]$  kbuildsycoca4 --noincremental
kbuildsycoca4 running..

And I don't have Homebrew. I have attached a crash file

Thanks for any help/hints

Cheers

Changed 13 years ago by macports@…

comment:4 in reply to:  2 ; Changed 13 years ago by macports@…

Replying to ak.ml@…:

klauncher /usr/local/lib/kde4/libexec/klauncher

/usr/local... not good. Do you have Homebrew?

Could you attach the content of: /Users/uname/Library/Logs/DiagnosticReports/kdeinit4_2011-09-20-014635_Lapzilla.crash?

Have you tried:

kbuildsycoca4 --noincremental

Log file has been attached. I tried running kbuildsycoca4 as suggested. After it finishes, running kdeimit4 yields the same result.

Nothing wrong with /usr/local/, that's where everything should be. I've used darwinports/macports many more years than the /usr/local ban has been in place and its still easier to just go with it than reinstall everything in /opt. I've yet to have a single problem that can be blamed on not using /opt so everyone needs to forget that FUD.

comment:5 in reply to:  4 ; Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to macports@…:

Nothing wrong with /usr/local/, that's where everything should be. I've used darwinports/macports many more years than the /usr/local ban has been in place and its still easier to just go with it than reinstall everything in /opt. I've yet to have a single problem that can be blamed on not using /opt so everyone needs to forget that FUD.

There is no FUD; there are hundreds of instances in our issue tracker and on our mailing lists of software in /usr/local interfering with users' MacPorts software so we will not waste our time trying to support that. End of story. Move /usr/local aside, clean and try again. If problems persist, then we can talk.

comment:6 Changed 13 years ago by mac.ports.fishspit@…

Cc: mac.ports.fishspit@… added

Cc Me!

comment:7 Changed 13 years ago by mac.ports.fishspit@…

I have the same problem with a freshly reinstalled macports install in /opt.

comment:8 in reply to:  5 ; Changed 13 years ago by macports@…

Replying to ryandesign@…:

Replying to macports@…:

Nothing wrong with /usr/local/, that's where everything should be. I've used darwinports/macports many more years than the /usr/local ban has been in place and its still easier to just go with it than reinstall everything in /opt. I've yet to have a single problem that can be blamed on not using /opt so everyone needs to forget that FUD.

There is no FUD; there are hundreds of instances in our issue tracker and on our mailing lists of software in /usr/local interfering with users' MacPorts software so we will not waste our time trying to support that. End of story. Move /usr/local aside, clean and try again. If problems persist, then we can talk.

There's nothing else in /usr/local to interfere with macports. Admit you are too stupid to solve the real problem and stop blaming everything on the path. If your shitheap is really so fragile that the wrong path will bring it all tumbling down, then y'all have fucked up badly.

comment:9 in reply to:  8 Changed 13 years ago by blb@…

Replying to macports@…:

There's nothing else in /usr/local to interfere with macports...

If you can provide patches which allow gcc/ld/llvm/clang to build as it does now but without looking in /usr/local, great! Otherwise, I strongly suggest you take a step back and make sure you understand the problem.

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

If there were already not enough ground for closing this ticket, I think that #31253 and #31302 are duplicates of this.
It's just that their titles should be updated to reflect that the problem is with kdeinit4 / klauncher from kdelibs4 and not skrooge or kdenlive.
Or maybe close the three tickets and open a new one. I can provide similar crashes and probably find in syslog the fork without exec lines.
I've had this issue with kate, dolphin or konqueror, and potentially all KDE apps using DBus are affected.

comment:11 in reply to:  10 Changed 13 years ago by macports@…

Replying to ak.ml@…:

If there were already not enough ground for closing this ticket, I think that #31253 and #31302 are duplicates of this.
It's just that their titles should be updated to reflect that the problem is with kdeinit4 / klauncher from kdelibs4 and not skrooge or kdenlive.
Or maybe close the three tickets and open a new one. I can provide similar crashes and probably find in syslog the fork without exec lines.
I've had this issue with kate, dolphin or konqueror, and potentially all KDE apps using DBus are affected.

I saw those tickets but they seemed to be stagnant and focused wrong. So I created a new ticket with kdeinit in the title to draw attention to the real problem. As you are the only one that seems to be working on a resolution, take the tickets whatever direction you think best to organize it. You have the crash reports from people both in /opt and /usr/local, which are almost identical, and you can generate your own, so at this point I just await news and will be available to test patches.

comment:12 Changed 13 years ago by mkr@…

Cc: mkr@… added

Cc Me!

comment:13 Changed 13 years ago by mtughan@…

Cc: mtughan@… added

Cc Me!

comment:14 Changed 13 years ago by mtughan@…

Here's the same crash on my new Lion install. Fresh install and build a couple days ago.

Sep 22 09:24:36 lhikan kdeinit4[46794]: Process 46793 was forked to 46794 without calling exec(). This is not supported by FileManager. Aborting.
Sep 22 09:24:36 lhikan [0x0-0xc20c2].org.kde.kdeinit4[0]: kdeinit4: (klauncher /opt/local/lib/kde4/libexec/klauncher) Pipe closed unexpectedlykdeinit4: Pipe closed unexpectedly: No such file or directory
Sep 22 09:24:36 lhikan kdeinit4[46796]: Process 46793 was forked to 46796 without calling exec(). This is not supported by FileManager. Aborting.
Sep 22 09:24:37 lhikan ReportCrash[46795]: Saved crash report for kdeinit4[46794] version ??? (???) to /Users/mtughan/Library/Logs/DiagnosticReports/kdeinit4_2011-09-22-092437_lhikan.crash
Sep 22 09:24:37 lhikan ReportCrash[46795]: Removing excessive log: /Users/mtughan/Library/Logs/DiagnosticReports/kdeinit4_2011-09-21-112937-2_lhikan.crash
Sep 22 09:24:37 lhikan com.apple.mtmd[93]: low priority thinning needed for volume Lhikan (/) with 16.1 <= 20.0 pct free space 
Sep 22 09:24:37 lhikan [0x0-0xc20c2].org.kde.kdeinit4[0]: kdeinit4: (kded4 /Applications/MacPorts/KDE4/kded4.app/Contents/MacOS/kded4) Pipe closed unexpectedlykdeinit4: Pipe closed unexpectedly: No such file or directory
Sep 22 09:24:37 lhikan [0x0-0xc20c2].org.kde.kdeinit4[0]: kdeinit4: Communication error with launcher. Exiting!

Will attach the crash log in a second.

Changed 13 years ago by mtughan@…

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

It would be nice if the ticket could be assigned to the kdelibs4 maintainers who wrote workaround-kdeinit4-crash.patch.
Similar klauncher "fork without exec" bug or USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER tickets are in Trac: #21973, #25178, ...

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

I have a workaround for this issue. The bottom line is:

  • Activate kdelibs4 @4.7.0_1
  • Launch kdeinit4 and therefore klauncher
  • Activate kdelibs4 @4.7.1_0

This worked for me.
Tell me if this worked for you especially if you recompile kdelibs4 @4.7.0_1 since qt4-mac was updated between KDE 4.7.0 and 4.7.1.

Detailed procedure

Pre-requisite

You need to have an activable (i.e. installed but inactive) kdelibs4 @4.7.0_1.

Assuming you're on Snow Leopard, haven't used any variant and installed MacPorts in /opt/local:

$ port -v installed kdelibs4
The following ports are currently installed:
  kdelibs4 @4.7.0_1 platform='darwin 10' archs='x86_64'
  kdelibs4 @4.7.1_0 (active) platform='darwin 10' archs='x86_64'
$ ls -1 /opt/local/var/macports/software/kdelibs4
kdelibs4-4.7.0_1.darwin_10.x86_64.tbz2
kdelibs4-4.7.1_0.darwin_10.x86_64.tbz2

If kdelibs4 @4.7.0_1 is not installed:

  1. You have a (TimeMachine) backup of kdelibs4-4.7.0_1.darwin_10.x86_64.tbz2 (the file name should match kdelibs4-4.7.0_1*.tbz2).
    Copy your backup to /opt/local/var/macports/software/kdelibs4.
    Sign the archive following ShareArchives2 (Steps 1 & 2) or instructions in /opt/local/etc/macports/pubkeys.conf.default.
    Once done you can install:
    sudo port install file:///opt/local/var/macports/software/kdelibs4/kdelibs4-4.7.0_1.darwin_10.x86_64.tbz2
    
  2. You don't have a backup.
    You will need to InstallingOlderPort with r82908 for the svn revision and http://svn.macports.org/repository/macports/trunk/dports/kde/kdelibs4 for the svn URL.

Workaround

Before (DBus shows no klauncher):

$ qdbus
:1.235
org.freedesktop.DBus

Main step:

sudo port activate kdelibs4 @4.7.0_1
open /Applications/MacPorts/KDE4/kdeinit4.app
sudo port activate kdelibs4 @4.7.1_0

After (klauncher should show up in DBus):

$ qdbus
:1.236
 org.kde.klauncher
:1.237
org.freedesktop.DBus

Changed 13 years ago by thatsafact@…

MacBook 10.6.8

comment:17 Changed 13 years ago by thatsafact@…

Cc: thatsafact@… added

Cc Me!

comment:18 in reply to:  16 ; Changed 13 years ago by thatsafact@…

Replying to ak.ml@…:

Thanks, this got Dolphin and Konquerer (sort of) working for me. Kate and some other apps have dependancies on 4.7.1 stuff and fail...

I have a workaround for this issue. The bottom line is:

  • Activate kdelibs4 @4.7.0_1
  • Launch kdeinit4 and therefore klauncher
  • Activate kdelibs4 @4.7.1_0

This worked for me.
Tell me if this worked for you especially if you recompile kdelibs4 @4.7.0_1 since qt4-mac was updated between KDE 4.7.0 and 4.7.1.

Detailed procedure

Pre-requisite

You need to have an activable (i.e. installed but inactive) kdelibs4 @4.7.0_1.

Assuming you're on Snow Leopard, haven't used any variant and installed MacPorts in /opt/local:

$ port -v installed kdelibs4
The following ports are currently installed:
  kdelibs4 @4.7.0_1 platform='darwin 10' archs='x86_64'
  kdelibs4 @4.7.1_0 (active) platform='darwin 10' archs='x86_64'
$ ls -1 /opt/local/var/macports/software/kdelibs4
kdelibs4-4.7.0_1.darwin_10.x86_64.tbz2
kdelibs4-4.7.1_0.darwin_10.x86_64.tbz2

If kdelibs4 @4.7.0_1 is not installed:

  1. You have a (TimeMachine) backup of kdelibs4-4.7.0_1.darwin_10.x86_64.tbz2 (the file name should match kdelibs4-4.7.0_1*.tbz2).
    Copy your backup to /opt/local/var/macports/software/kdelibs4.
    Sign the archive following ShareArchives2 (Steps 1 & 2) or instructions in /opt/local/etc/macports/pubkeys.conf.default.
    Once done you can install:
    sudo port install file:///opt/local/var/macports/software/kdelibs4/kdelibs4-4.7.0_1.darwin_10.x86_64.tbz2
    
  2. You don't have a backup.
    You will need to InstallingOlderPort with r82908 for the svn revision and http://svn.macports.org/repository/macports/trunk/dports/kde/kdelibs4 for the svn URL.

Workaround

Before (DBus shows no klauncher):

$ qdbus
:1.235
org.freedesktop.DBus

Main step:

sudo port activate kdelibs4 @4.7.0_1
open /Applications/MacPorts/KDE4/kdeinit4.app
sudo port activate kdelibs4 @4.7.1_0

After (klauncher should show up in DBus):

$ qdbus
:1.236
 org.kde.klauncher
:1.237
org.freedesktop.DBus

comment:19 Changed 13 years ago by chris.lagan@…

This process works fine for me. I assume that these 3 commands needs to be run after every reboot until the bug is patched. I had installed 4.7.0 before so it was simple to revert to 4.7.0 to 4.7.1 for kdelibs4

Using kate, amarok, dolphin etc, all ok on 4.7.1 versions. thank you akaplan for narrowing down the problem. this means i can still update everything to the latest versions. however, I assume that i need to keep a backup of kdelibs4 4.7.0 until it is fixed

thanks

comment:20 in reply to:  18 Changed 13 years ago by ak.ml@…

Replying to thatsafact@…:

Replying to ak.ml@…:

Thanks, this got Dolphin and Konquerer (sort of) working for me. Kate and some other apps have dependancies on 4.7.1 stuff and fail...

Don't forget to activate kdelibs4 to 4.7.1 ont kdeinit4 and klauncher run.

Changed 13 years ago by ak.ml@…

Updated workaround-kdeinit4-crash.patch

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

I've attached an updated workaround-kdeinit4-crash.patch which should solve this issue.

The cause was in kinit/kinit.cpp:

kDebug(7016) << "kdeinit4: launch() setting argv: " << cstr.data();

which needs to be commented or removed.

comment:22 in reply to:  21 ; Changed 13 years ago by pou.sepehrdad@…

Replying to ak.ml@…:

I've attached an updated workaround-kdeinit4-crash.patch which should solve this issue.

The cause was in kinit/kinit.cpp:

kDebug(7016) << "kdeinit4: launch() setting argv: " << cstr.data();

which needs to be commented or removed.

Sorry for my naive question, but how do you apply the .patch file?

comment:23 in reply to:  22 ; Changed 13 years ago by ak.ml@…

Sorry for my naive question, but how do you apply the .patch file?

The update is mainly intended for the maintainers. But if you want to test it, you'll have to set up a local Portfile repository as described in §4.6 of MacPorts' Guide.
Then you'll need to copy the kdelibs4 main directory in you local directory. The main directory is given by:

port dir kdelibs4

Inside the copied directory you'll need to replace workaround-kdeinit4-crash.patch by the version attached to this ticket, and increase the revision number of the Portfile file or add a line with

revision 1

Then perform a selfupdate and upgrade.
If you do, please report back to this ticket and indicate if this worked for you or not (mention your OS version).

comment:24 in reply to:  23 Changed 13 years ago by pou.sepehrdad@…

Replying to ak.ml@…:

Sorry for my naive question, but how do you apply the .patch file?

The update is mainly intended for the maintainers. But if you want to test it, you'll have to set up a local Portfile repository as described in §4.6 of MacPorts' Guide.
Then you'll need to copy the kdelibs4 main directory in you local directory. The main directory is given by:

port dir kdelibs4

Inside the copied directory you'll need to replace workaround-kdeinit4-crash.patch by the version attached to this ticket, and increase the revision number of the Portfile file or add a line with

revision 1

Then perform a selfupdate and upgrade.
If you do, please report back to this ticket and indicate if this worked for you or not (mention your OS version).

Thanks alot! In fact, before you reply, I replaced the old workaround with the new one you specified in /opt/local/var/macports/sources/rsync.macports.org/release/ports/kde/kdelibs4/files/. Then I uninstalled kdelibs4 and installed it again and it works perfectly now. Your method upgrade it, so it should be much faster. I went through all the hassle of compile from scratch which was really time consuming. I am on Mac OS 10.6.8. So now, it works on my OS version.

comment:25 Changed 13 years ago by mkae (Marko Käning)

Cc: mk@… added

Cc Me!

comment:26 in reply to:  21 Changed 13 years ago by macports@…

Replying to ak.ml@…:

I've attached an updated workaround-kdeinit4-crash.patch which should solve this issue.

The cause was in kinit/kinit.cpp:

kDebug(7016) << "kdeinit4: launch() setting argv: " << cstr.data();

which needs to be commented or removed.

This updated patch works for me. kdeinit4 now runs fine after rebuilding kdelibs4 and I can once again run ktorrent and kdenlive. Thanks for the effort ak. Hopefully maintainers can pick this up for everyone else.

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

The updated workaround-kdeinit4-crash.patch has been committed and is available in the latest kdelibs4 revision. Just run selfupdate then upgrade as usual.

comment:28 Changed 13 years ago by mkae (Marko Käning)

Hey, the latest update to kdelibs4@4.7.1_1 actually also fixed a weird effect I noticed with kmymoney4(-devel) ports. There the homepage was always screwed up - obviously due to a missing CSS.

Now, with the supplied workaround patch all works fine again.

Thanks guys!

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

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