Friday, February 8, 2013

KDE 4.10.0 plasma-desktop crashes and qt frustrations

While on my machine KDE 4.10.0 runs perfectly fine, unfortunately a lot of Gentoo users see immediate crashes of plasma-desktop - which makes the graphical desktop environment completely unuseable. We know more or less what happened in the meantime, just not how to properly fix it...
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.
The links:
The bugfixing situation:
  • 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.
Right now, the only option we (as Gentoo KDE team) have is wait for someone to pick up the phone. Either from KDE (to properly use the old codepath or provide some alternative), or from Qt (to fix the bug or apply a workaround)...

Sorry & stay tuned.

18 comments:

  1. Thanks for the comprehensive overview, Andreas. It's good to see people are working on it :)

    ReplyDelete
  2. I have the bug 311751 and solved (for me) compiling qt-core qith -Os
    Finding 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!

    ReplyDelete
  3. This is not only a Gentoo problem! I also happens on my Kubuntu 64 bit laptop (HP HDX 18).

    Thanks for the overview!

    ReplyDelete
  4. 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.

    ReplyDelete
  5. I also happens on my Slackware 64 bit desktop too (AMD® Phenom X4 9150e Quad Core 1.80GHz).

    Thanks for the overview!

    ReplyDelete
  6. I 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!)

    ReplyDelete
  7. Before 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...

    ReplyDelete
  8. Thanks for sharing this, very informative (and now I know why my laptop became a bit sluggish :) )

    ReplyDelete
  9. This bug is fixed in Gentoo starting with kde-base/plasma-workspace-4.10.0-r2.

    ReplyDelete
  10. Just did update and running like a dream. No problems..

    ReplyDelete
  11. Upgraded 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.

    ReplyDelete
  12. If it only happens with Compiler Optimization, it sounds more like a GCC Bug to me.

    ReplyDelete
  13. I sorry, i was to stupid to read, it does _not_ happen if -Os is used :D just forgot what i wrote -.-

    ReplyDelete
  14. Based 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.

    ReplyDelete
    Replies
    1. Well, graphite and LTO can probably cause all sorts of weirdness. -O2 however is the generally recommended default.

      Delete
  15. What is the status of this bug now? Is it fixed in the current version of kde or qt?

    It is May 27, the message was created at February.

    ReplyDelete
    Replies
    1. 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