The problem:
- plasma-desktop uses a new code path in 4.10, which triggers a Qt bug leading to immediate SIGSEGV.
- The Qt bug only becomes fatal for some compiler options, and only on 64bit systems (amd64).
- The Qt bug may be a fundamental architectural problem that needs proper thought.
- Gentoo bug 450818: "x11-libs/qt-core-4.8.4: QDeclarativeVMEMetaObject::metaCall SIGSEGV when called from QMetaObject::metaCall"
- KDE bug 311751: "QML system tray crashes plasma-desktop on startup"
- Qt bug 29082: "QDeclarativeVMEMetaObject::metaCall SIGSEGV when called from QMetaObject::metaCall"
- Qt code review 46228: "Avoid calling metacall directly from the property animation code"
- Reverting the commit to plasma-workspace that introduced the problem makes the crash go away, but plasma-desktop starts hogging 100% CPU after a while. (This is done in plasma-workspace-4.10.0-r1 as a stopgap measure.) Kinda makes sense since the commit was there to fix a problem - now we hit the original problem.
- The bug seems not to occur if Qt is compiled with CFLAGS="-Os". Cause unknown.
- David E. Narváez aka dmaggot wrote a patch for Qt that fixes this particular codepath but likely does not solve the global problem.
- So far comments from Qt upstream indicate that this is in their opinion not the right way to fix the problem.
- Our Gentoo Qt team understandably only wants to apply a patch if it has been accepted upstream.
Sorry & stay tuned.
Thanks for the comprehensive overview, Andreas. It's good to see people are working on it :)
ReplyDeleteI have the bug 311751 and solved (for me) compiling qt-core qith -Os
ReplyDeleteFinding this solution while plasma was off (==screen blank with only browser and a konsole) was a bit frustrating.... I hope a good solution will be found soon!
This is not only a Gentoo problem! I also happens on my Kubuntu 64 bit laptop (HP HDX 18).
ReplyDeleteThanks for the overview!
I love bureaucracy. KDE should get their act together and try to work around serious Qt bugs if they care even a little about their users.
ReplyDeleteI also happens on my Slackware 64 bit desktop too (AMD® Phenom X4 9150e Quad Core 1.80GHz).
ReplyDeleteThanks for the overview!
same with kubuntu 12.04 64 bits.
ReplyDeleteI run Arch and my KDE 4.10 crashes on right clicks(first it was on systray only but now I learnt it can crash anywhere else too!)
ReplyDeleteBefore you say "I have the same bug", please have a look at a backtrace and compare it with the ones in the bug reports linked above. Unfortunately there are many ways how plasma-desktop can crash...
ReplyDeleteThanks for sharing this, very informative (and now I know why my laptop became a bit sluggish :) )
ReplyDeleteThis bug is fixed in Gentoo starting with kde-base/plasma-workspace-4.10.0-r2.
ReplyDeleteJust did update and running like a dream. No problems..
ReplyDeleteUpgraded from KDE 4.9.5 to 4.10.0 in Gentoo yesterday and all seems to be working fine. Thanks go, in particular, to David E. Narváez for his qt-core patch.
ReplyDeleteIf it only happens with Compiler Optimization, it sounds more like a GCC Bug to me.
ReplyDeleteI sorry, i was to stupid to read, it does _not_ happen if -Os is used :D just forgot what i wrote -.-
ReplyDeleteBased on my own experience - all packages from $(qlist -IC dev-qt) MUST BE compiled with easy flags (-Os). Using agressive flags, graphite or LTO causes whole QT (and KDE) crash.
ReplyDeleteWell, graphite and LTO can probably cause all sorts of weirdness. -O2 however is the generally recommended default.
DeleteWhat is the status of this bug now? Is it fixed in the current version of kde or qt?
ReplyDeleteIt is May 27, the message was created at February.
It is fixed in Gentoo since dev-qt/qtcore-4.8.4-r3; the fix will be part of the Qt release 4.8.5 once it comes out.
Delete