Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 626070 - dev-qt/qtdeclarative-5.7.1 with gcc-6 crashes at runtime
Summary: dev-qt/qtdeclarative-5.7.1 with gcc-6 crashes at runtime
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL: https://bugreports.qt.io/browse/QTBUG...
Whiteboard:
Keywords:
: 635024 (view as bug list)
Depends on:
Blocks: gcc-6
  Show dependency tree
 
Reported: 2017-07-24 18:19 UTC by Szymon Szypulski
Modified: 2017-10-23 11:16 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Szymon Szypulski 2017-07-24 18:19:42 UTC
After upgrading plasma to 5.10.4 plasmashell refused to start with message - "KCrash: Application 'plasmashell' crashing...". 

gdb plasmashell showed

Thread 1 "plasmashell" received signal SIGSEGV, Segmentation fault.
0x00007f21a14e7bda in QV4::ExecutionEngine::newArrayObject(int) () from /usr/lib64/libQt5Qml.so.5

And backtrace: 

#0  0x00007fa9ef22fbda in QV4::ExecutionEngine::newArrayObject(int) () from /usr/lib64/libQt5Qml.so.5
#1  0x00007fa9ef35eedb in ?? () from /usr/lib64/libQt5Qml.so.5
#2  0x00007fa9ef2e96f0 in QQmlComponentPrivate::beginCreate(QQmlContextData*) () from /usr/lib64/libQt5Qml.so.5
#3  0x00007fa9ef2e6fcf in QQmlComponent::create(QQmlContext*) () from /usr/lib64/libQt5Qml.so.5
#4  0x00007fa9f18a633c in PlasmaQuick::ContainmentView::ContainmentView(Plasma::Corona*, QWindow*) () from /usr/lib64/libKF5PlasmaQuick.so.5
#5  0x000000000042a564 in ?? ()
#6  0x000000000043ed80 in ?? ()
#7  0x0000000000447267 in ?? ()
#8  0x00007fa9ecf3e243 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5
#9  0x00007fa9f1100051 in KActivities::Consumer::serviceStatusChanged(KActivities::Consumer::ServiceStatus) () from /usr/lib64/libKF5Activities.so.5
#10 0x00007fa9f11015db in ?? () from /usr/lib64/libKF5Activities.so.5
#11 0x00007fa9ecf3df6e in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5                                                                 
#12 0x00007fa9f10fff11 in ?? () from /usr/lib64/libKF5Activities.so.5                                                                                                          
#13 0x00007fa9f10f924f in ?? () from /usr/lib64/libKF5Activities.so.5                                                                                                          
#14 0x00007fa9f10f94c8 in ?? () from /usr/lib64/libKF5Activities.so.5                                                                                                          
#15 0x00007fa9f1100954 in ?? () from /usr/lib64/libKF5Activities.so.5                                                                                                          
#16 0x00007fa9ecf3df6e in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5                                                                 
#17 0x00007fa9f1e9a59f in QDBusPendingCallWatcher::finished(QDBusPendingCallWatcher*) () from /usr/lib64/libQt5DBus.so.5                                                       
#18 0x00007fa9f1e9a698 in ?? () from /usr/lib64/libQt5DBus.so.5                                                                                                                
#19 0x00007fa9ecf3efa9 in QObject::event(QEvent*) () from /usr/lib64/libQt5Core.so.5                                                                                           
#20 0x00007fa9ed7697b4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5                                                          
#21 0x00007fa9ed771430 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5                                                                        
#22 0x00007fa9ecf1035a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5                                                              
#23 0x00007fa9ecf130f6 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/libQt5Core.so.5                                            
#24 0x00007fa9ecf68833 in ?? () from /usr/lib64/libQt5Core.so.5                                                                                                                
#25 0x00007fa9e7fd76e7 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#26 0x00007fa9e7fd7940 in ?? () from /usr/lib64/libglib-2.0.so.0
#27 0x00007fa9e7fd79ec in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#28 0x00007fa9ecf688af in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#29 0x00007fa9ecf0ea12 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#30 0x00007fa9ecf1774c in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#31 0x000000000041cde2 in ?? ()
#32 0x00007fa9ec5351e1 in __libc_start_main () from /lib64/libc.so.6
#33 0x000000000041d16a in _start ()

I have thought it is the same as https://bugreports.qt.io/browse/QTBUG-52057. But 5.7.1 has QMAKE_CFGGFLAGS with -fno-delete-null-pointer-checks -fno-lifetime-dse (https://github.com/qt/qtdeclarative/blob/5.7/src/qml/qml.pro#L21). However AFTER changing (+ re-emerge) CXXFLAGS="${CFLAGS} -fno-delete-null-pointer-checks -fno-lifetime-dse" in make.conf plasmashell starts fine.

Maybe this issue is 'local' to Gentoo?

Reproducible: Always

Steps to Reproduce:
1. Bump GCC to 6.3.0
2. Bump KDE Plasma to 5.10.4 (especially plasma-workspace)
Actual Results:  
Plasma is crashing with message - "KCrash: Application 'plasmashell' crashing..."


emerge --info
Portage 2.3.6 (python 3.4.6-final-0, default/linux/amd64/13.0, gcc-6.3.0, glibc-2.24-r3, 4.12.1-gentoo x86_64)
=================================================================
System uname: Linux-4.12.1-gentoo-x86_64-Intel-R-_Core-TM-_i5-6300U_CPU_@_2.40GHz-with-gentoo-2.4.1
KiB Mem:    16290820 total,   9795724 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 24 Jul 2017 05:30:01 +0000
sh bash 4.4_p12
ld GNU ld (Gentoo 2.27 p1.0) 2.27
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.2::gentoo
dev-lang/python:          2.7.13::gentoo, 3.4.6::gentoo, 3.5.2::gentoo, 3.6.1-r1::gentoo
dev-util/cmake:           3.9.0::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1::gentoo
sys-apps/openrc:          0.28::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r3::gentoo
sys-devel/automake:       1.13.4-r1::gentoo, 1.15.1::gentoo
sys-devel/binutils:       2.27::gentoo, 2.28-r2::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo, 6.3.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.24-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

gen2-overlay
    location: /usr/local/portage
    masters: gentoo

brother-overlay
    location: /var/lib/layman/brother-overlay                                                                                                                                                
    masters: gentoo                                                                                                                                                                          
    priority: 50                                                                                                                                                                             
                                                                                                                                                                                             
Installed sets: @mygentoo                                                                                                                                                                    
ACCEPT_KEYWORDS="amd64 ~amd64"                                                                                                                                                               
ACCEPT_LICENSE="* -@EULA Google-TOS RAR"                                                                                                                                                     
CBUILD="x86_64-pc-linux-gnu"                                                                                                                                                                 
CFLAGS="-march=native -O2 -pipe -fno-delete-null-pointer-checks -fno-lifetime-dse"                                                                                                           
CHOST="x86_64-pc-linux-gnu"                                                                                                                                                                  
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0"                                             
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-delete-null-pointer-checks -fno-lifetime-dse"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="pl_PL.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl acpi alsa amd64 bash-completion berkdb bindist bzip2 cli consolekit cracklib crypt cryptsetup cxx dbus dri fontconfig fortran gdbm glamor iconv icu infinality ipv6 jpeg kipi mmx modules multilib ncurses nls nptl ogg openmp pam pcre pcre16 policykit qt5 readline seccomp session sse sse2 ssl ssse3 tcpd touchpad truetype udev unicode vaapi vdpau vorbis xattr xkb zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" L10N="pl" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="pl" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby23 ruby24" USERLAND="GNU" VIDEO_CARDS="i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Andreas Sturmlechner gentoo-dev 2017-07-25 09:08:32 UTC
I doubt that has anything to do with gcc-6 as it works just fine on two machines here. Szymon, do you have anything (upstream-bug) to back that up?
Comment 2 Szymon Szypulski 2017-07-25 09:13:34 UTC
QTBUG-52057 was only similar case I have found. But it supposed to be fixed in 5.7.1 (CMAKE_CXXFLAGS include -fno-lifetime-dse). After all, I did not change anything else intentionally. 

I do not have any other related upstream bug.
Comment 3 Michael Palimaka (kensington) gentoo-dev 2017-08-24 13:04:34 UTC
We were able to reproduce this in #gentoo-kde today.

From src/qml/qml.pro:
greaterThan(QT_GCC_MAJOR_VERSION, 5) {
    # Our code is bad. Temporary workaround.
    QMAKE_CXXFLAGS += -fno-delete-null-pointer-checks -fno-lifetime-dse
}

which I suppose we blow away when we override in the eclass.
Comment 4 Michael Palimaka (kensington) gentoo-dev 2017-08-24 13:15:34 UTC
Suggested patch:
@@ -3,7 +3,7 @@
 
 EAPI=6
 PYTHON_COMPAT=( python2_7 python3_{4,5} )
-inherit python-any-r1 qt5-build
+inherit flag-o-matic python-any-r1 toolchain-funcs qt5-build
 
 DESCRIPTION="The QML and Quick modules for the Qt5 framework"
 
@@ -34,6 +34,12 @@ RDEPEND="${COMMON_DEPEND}
 "
 
 src_prepare() {
+       # this is supposed to be handled by the build system (src/qml/qml.pro),
+       # fails because we override QMAKE_CXXFLAGS. bug 626070
+        if tc-is-gcc && [[ $(gcc-major-version) -ge 6 ]]; then
+                append-cxxflags -fno-delete-null-pointer-checks -fno-lifetime-dse
+        fi
+
        use jit || PATCHES+=("${FILESDIR}/${PN}-5.4.2-disable-jit.patch")
Comment 5 Michael Palimaka (kensington) gentoo-dev 2017-09-11 13:15:44 UTC
In overlay: https://gitweb.gentoo.org/proj/qt.git/commit/?id=4512a456df71b4e9efb59b9952cc74ea565d9a03
Comment 6 Davide Pesavento gentoo-dev 2017-09-12 16:59:27 UTC
The workaround should be applied to 5.6.x and 5.7.x only.
5.8 and later versions are not affected http://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=60c4810c73e41e3c4b930206b9f0a5c56a2b9026
Comment 7 Michael Palimaka (kensington) gentoo-dev 2017-09-13 12:12:17 UTC
Oops, reverted, thanks
Comment 8 Larry the Git Cow gentoo-dev 2017-09-25 13:53:00 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2093a67d115b1d878be6372038927710b2af1027

commit 2093a67d115b1d878be6372038927710b2af1027
Author:     Michael Palimaka <kensington@gentoo.org>
AuthorDate: 2017-09-25 13:52:30 +0000
Commit:     Michael Palimaka <kensington@gentoo.org>
CommitDate: 2017-09-25 13:52:50 +0000

    dev-qt/qtdeclarative: revision bump fixes crash when built with GCC 6
    
    Closes: https://bugs.gentoo.org/626070
    Package-Manager: Portage-2.3.8, Repoman-2.3.3

 dev-qt/qtdeclarative/qtdeclarative-5.7.1-r1.ebuild | 62 ++++++++++++++++++++++
 1 file changed, 62 insertions(+)
Comment 9 Michael Palimaka (kensington) gentoo-dev 2017-10-23 11:16:08 UTC
*** Bug 635024 has been marked as a duplicate of this bug. ***