Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 584818

Summary: <dev-qt/qtdeclarative-5.6.1 crashes when built with gcc-6 (KCrash: Application 'plasmashell' crashing)
Product: Gentoo Linux Reporter: Peter Levine <plevine457>
Component: [OLD] GCC PortingAssignee: Qt Bug Alias <qt>
Status: RESOLVED FIXED    
Severity: normal CC: octoploid, plevine457
Priority: Normal Keywords: UPSTREAM
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 582084    
Attachments: emerge --info
xsession-errors

Description Peter Levine 2016-06-02 04:32:00 UTC
If dev-qt/qtdeclarative-5.6.0 (USE="jit widgets xml") is built with gcc-6.1.0, the KDE plasma5 splash animation hangs at the the end for about 30 seconds and fades to a black screen.  The only visible element is the movable mouse cursor.

The following extra lines exist in ~/.xsession-errors:

> KCrash: Attempting to start /usr/bin/plasmashell from kdeinit
> KCrash: Application 'plasmashell' crashing...
> KCrash: Attempting to start /usr/lib64/libexec/drkonqi from kdeinit
> KCrash: Attempting to start /usr/bin/krunner from kdeinit
> KCrash: Application 'krunner' crashing...
> KCrash: Attempting to start /usr/lib64/libexec/drkonqi from kdeinit
Comment 1 Peter Levine 2016-06-02 04:33:25 UTC
Created attachment 436130 [details]
emerge --info
Comment 2 Peter Levine 2016-06-02 04:38:12 UTC
Created attachment 436132 [details]
xsession-errors
Comment 3 Mark Wright gentoo-dev 2016-06-02 05:33:18 UTC
There is a suggestion to try here:
https://bugs.gentoo.org/show_bug.cgi?id=581434#c4
Comment 4 Davide Pesavento gentoo-dev 2016-06-02 11:25:01 UTC
There are a few known upstream bugs in qtdeclarative related to gcc6...

https://bugreports.qt.io/browse/QTBUG-52057
https://bugreports.qt.io/browse/QTBUG-53373
Comment 5 Peter Levine 2016-06-02 17:28:34 UTC
I can confirm "-flifetime-dse=1" fixes the issue but it's a band-aid over the problem.

I tried to compile with "-fsanitize=undefined" in my CXXFLAGS and "-lubsan" in my LDFLAGS but the build fails with:

> .obj/qquickimageparticle.o(.data.rel+0x2b18): error: undefined reference to 'typeinfo for QQuickSprite'
Comment 6 Peter Levine 2016-06-02 17:49:10 UTC
Apparently, it's patched upstream as a temporary workaround:

http://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=18e77550f149722e0554f24ddfa326e03a9fef10

I can confirm that it resolves this issue.
Comment 7 octoploid 2016-06-03 06:33:33 UTC
-fno-delete-null-pointer-checks fixes a totally different kind of issue
than -flifetime-dse=1. They are not related at all.

Furthemore -fsanitize=undefined will _not_ point out any -flifetime-dse=2 issues.

So one could argue that it was premature to enable this optimization before there was a correspondent sanitizer.
Comment 8 Peter Levine 2016-06-03 17:47:49 UTC
(In reply to octoploid from comment #7)
> -fno-delete-null-pointer-checks fixes a totally different kind of issue
> than -flifetime-dse=1. They are not related at all.

If I'm reading it right, according to:

https://bugreports.qt.io/browse/QTBUG-52057?focusedCommentId=321609&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-321609

"-fno-delete-null-pointer-checks" solves the problem on x86_64 but not on i686 and "-fno-lifetime-dse" seems to fix the issue on both.

So a GCC bug may be involved as well.
Comment 9 octoploid 2016-06-11 05:42:28 UTC
(In reply to Peter Levine from comment #8)
> So a GCC bug may be involved as well.

No, QT invokes undefined behavior in both cases. So it is clearly _not_ a gcc bug.
Once the UB gets fixed in QT, there will be no more crashes...
Comment 10 Davide Pesavento gentoo-dev 2016-06-14 19:32:30 UTC
5.6.1, which contains a workaround, is now in tree.