Summary: | sys-devel/binutils-2.25: ld.gold mishandles COPY relocs (which breaks QT and triggers segfaults) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Marcin Mirosław <bug> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | Adrian.Bassett, ansla80, franz.trischberger, jlec, qt, ziebell_marco |
Priority: | Normal | Keywords: | PATCH, UPSTREAM |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=e9c1bdad269c0c3352eebcc9481ed65144001b0b;hp=0ed4b0bf3d2ca248778a2ffbcb2c5cafbfdd64dc | ||
See Also: | https://sourceware.org/bugzilla/show_bug.cgi?id=16992 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Marcin Mirosław
2015-05-12 14:51:44 UTC
Try without ccache instead. How did you enable linking with gold? emerge --info shows "GNU ld", and I don't see -fuse-ld=gold in your cxxflags either... Hmm, I just did: # binutils-config --linker ld.gold rebuilded qtocore, in this configuration I had problem, when I did: # binutils-config --linker ld.bfd and recompiled qtcore it works. Can you attach a backtrace of the crash please? see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces Is this backtrace usefull or should I recompile other qt* packages? (To get this backtrace I recompiled qtcore and kde-base/drkonqi). # gdb -q /usr/lib64/kde4/libexec/drkonqi 'core-1431453914-107-11-!usr!lib64!kde4!libexec!drkonqi-7812' Reading symbols from /usr/lib64/kde4/libexec/drkonqi...Reading symbols from /usr/lib64/debug//usr/lib64/kde4/libexec/drkonqi.debug...done. done. [New LWP 7812] warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"? [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Core was generated by `/usr/lib64/kde4/libexec/drkonqi -display :0 --appname kdmgreet --signal 11 --pi'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f6fa570999a in length (this=0x7f6fa5942118 <QLinkedListData::shared_null+24>) at /var/tmp/portage/dev-qt/qtcore-4.8.6-r2/work/qt-everywhere-opensource-src-4.8.6/src/corelib/tools/qbytearray.h:356 356 /var/tmp/portage/dev-qt/qtcore-4.8.6-r2/work/qt-everywhere-opensource-src-4.8.6/src/corelib/tools/qbytearray.h: No such file or directory. (gdb) thread apply all bt full Thread 1 (Thread 0x7f6fa965c7c0 (LWP 7812)): #0 0x00007f6fa570999a in length (this=0x7f6fa5942118 <QLinkedListData::shared_null+24>) at /var/tmp/portage/dev-qt/qtcore-4.8.6-r2/work/qt-everywhere-opensource-src-4.8.6/src/corelib/tools/qbytearray.h:356 No locals. #1 qstrcmp (str1=..., str2=...) at /var/tmp/portage/dev-qt/qtcore-4.8.6-r2/work/qt-everywhere-opensource-src-4.8.6/src/corelib/tools/qbytearray.cpp:347 l1 = <optimized out> l2 = <optimized out> ret = <optimized out> #2 0x00007f6fa59f9c19 in ?? () from /usr/lib64/libkdecore.so.5 No symbol table info available. #3 0x0000000000000000 in ?? () No symbol table info available. (gdb) In dmesg I got: [Tue May 12 20:05:13 2015] drkonqi[7812]: segfault at 9 ip 00007f6fa570999a sp 00007fffa2bb7600 error 4 in libQtCore.so.4.8.6[7f6fa568e000+2b3000] WOHOO!!! Thx alot! I had the same issue (on a friends computer) and nearly lost my mind (and a friend...) We already discussed migration away from kde4 to another DE and now I see this report. After installing just qtcore with ld.bfd and all issues are gone. Issues usually were crashes or inifinite loop (e.g. in meinproc4, which made it impossible to reinstall kdelibs) - all in qstrcmp. Here is the bt for ark: (gdb) bt #0 qstrcmp (str1=..., str2=...) at /var/tmp/portage/dev-qt/qtcore-4.8.6-r2/work/qt-everywhere-opensource-src-4.8.6/src/corelib/tools/qbytearray.cpp:347 #1 0x00007ffff6737fd5 in operator< (k2=..., k1=...) at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdecore/config/kconfigdata.h:126 #2 qMapLessThanKey<KEntryKey> (key2=..., key1=...) at /usr/include/qt4/QtCore/qmap.h:107 #3 findNode (akey=..., this=0x63fca0) at /usr/include/qt4/QtCore/qmap.h:487 #4 find (akey=..., this=0x63fca0) at /usr/include/qt4/QtCore/qmap.h:608 #5 KEntryMap::findEntry (this=this@entry=0x63fca0, group=..., key=..., flags=...) at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdecore/config/kconfigdata.cpp:79 #6 0x00007ffff6731bdb in getEntryOption (option=KEntryMap::EntryImmutable, flags=..., key=..., group=..., this=0x63fca0) at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdecore/config/kconfigdata.h:206 #7 KConfig::isGroupImmutableImpl (this=this@entry=0x6400c0, aGroup=...) at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdecore/config/kconfig.cpp:766 #8 0x00007ffff6737888 in KConfigBase::isGroupImmutable (this=this@entry=0x6400c0, aGroup=...) at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdecore/config/kconfigbase.cpp:96 #9 0x00007ffff673f623 in KConfigGroup::KConfigGroup (this=0x7fffffffaa30, master=0x6400c0, _group=...) at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdecore/config/kconfiggroup.cpp:468 #10 0x00007ffff67e165e in KStandardDirs::addCustomized (this=0x63f4c0, config=0x6400c0) at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdecore/kernel/kstandarddirs.cpp:1949 #11 0x00007ffff67d8147 in KComponentDataPrivate::lazyInit (this=0x63f520, component=...) at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdecore/kernel/kcomponentdata.cpp:142 #12 0x00007ffff67d83ce in KComponentData::KComponentData (this=0x63ee40, name=..., catalog=..., registerAsMain=KComponentData::SkipMainComponentRegistration) at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdecore/kernel/kcomponentdata.cpp:82 #13 0x00007ffff67d6fde in initFakeComponent () at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdecore/kernel/kglobal.cpp:118 #14 operator-> (this=<optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdecore/kernel/kglobal.cpp:129 #15 KGlobal::config () at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdecore/kernel/kglobal.cpp:142 #16 0x00007ffff76ba951 in KApplicationPrivate::preqapplicationhack () at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdeui/kernel/kapplication.cpp:411 #17 0x00007ffff76bd10c in KApplication::KApplication (this=0x7fffffffb6b0, GUIenabled=true) at /var/tmp/portage/kde-base/kdelibs-4.14.7/work/kdelibs-4.14.7/kdeui/kernel/kapplication.cpp:345 #18 0x000000000040a747 in main (argc=1, argv=0x7fffffffb7e8) at /var/tmp/portage/kde-base/ark-4.14.3-r1/work/ark-4.14.3/app/main.cpp:108 @Franz, attach the emerge --info for that machine please. Portage 2.2.18 (python 3.3.5-final-0, default/linux/amd64/13.0/desktop, gcc-4.9.2, glibc-2.20-r2, 3.19.7-gentoo x86_64) ================================================================= System uname: Linux-3.19.7-gentoo-x86_64-Intel-R-_Core-TM-_i7-2600K_CPU_@_3.40GHz-with-gentoo-2.2 KiB Mem: 7884632 total, 1842644 free KiB Swap: 8388604 total, 8388444 free Timestamp of repository gentoo: Sun, 10 May 2015 05:00:01 +0000 sh bash 4.2_p53 ld GNU ld (Gentoo 2.25 p1.0) 2.25 distcc 3.1 x86_64-pc-linux-gnu [disabled] ccache version 3.1.9 [disabled] app-shells/bash: 4.2_p53::gentoo dev-java/java-config: 2.2.0::gentoo dev-lang/perl: 5.20.2::gentoo dev-lang/python: 2.7.9-r2::gentoo, 3.3.5-r1::gentoo, 3.4.1::gentoo dev-util/ccache: 3.1.9-r4::gentoo dev-util/cmake: 3.2.2::gentoo dev-util/pkgconfig: 0.28-r2::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.15.1::gentoo sys-apps/sandbox: 2.6-r1::gentoo sys-devel/autoconf: 2.69::gentoo sys-devel/automake: 1.11.6-r1::gentoo, 1.13.4::gentoo sys-devel/binutils: 2.25::gentoo sys-devel/gcc: 4.9.2::gentoo sys-devel/gcc-config: 1.7.3::gentoo sys-devel/libtool: 2.4.6-r1::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers) sys-libs/glibc: 2.20-r2::gentoo Repositories: gentoo location: /var/repositories/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 dlang location: /var/repositories/dlang sync-type: git sync-uri: https://github.com/gentoo/dlang.git masters: gentoo ff2000 location: /var/repositories/ff2000 sync-type: git sync-uri: git://github.com/ff2000/gentoo-overlay.git masters: gentoo gnome location: /var/repositories/gnome sync-type: git sync-uri: https://anongit.gentoo.org/git/proj/gnome.git masters: gentoo kde location: /var/repositories/kde sync-type: git sync-uri: git://github.com/gentoo/kde.git masters: gentoo local location: /var/repositories/local masters: gentoo qt location: /var/repositories/qt sync-type: git sync-uri: https://anongit.gentoo.org/git/proj/qt.git masters: gentoo ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=corei7-avx -O2 -pipe -ggdb" 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=corei7-avx -O2 -pipe -ggdb" DISTDIR="/var/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 splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="de_DE.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j10" 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" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac acl acpi alsa amd64 apm berkdb bluray branding bzip2 cairo cdda cdr cli cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm iconv introspection ipv6 jpeg jpeg2k kde lcms mad mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nls nptl nvidia ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support qt4 readline sdl semantic-desktop session spell sse sse2 sse3 sse4 sse4_1 ssl ssse3 startup-notification svg systemd tcpd theora threads tiff truetype udev udisks unicode upower usb vaapi vorbis vpx wayland wxwidgets x264 xcb xcomposite xml xscreensaver xv xvid zlib zsh-completion" 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="auth_digest authn_file dav dav_fs authz_groupfile" CALLIGRA_FEATURES="krita words sheets" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de de_DE" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" SANE_BACKENDS="epson epson2" USERLAND="GNU" VIDEO_CARDS="i915 i965 intel" 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: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON What's the output of `objdump -CR /usr/lib64/qt4/libQtCore.so | grep COPY`? # objdump -CR /usr/lib64/qt4/libQtCore.so | grep COPY # (In reply to Marcin Mirosław from comment #9) > # objdump -CR /usr/lib64/qt4/libQtCore.so | grep COPY > # On the *crashing* library, i.e. do it on a libQtCore.so build with gold. I did it on library builded with ld.gold. I'm using splitdebug with debugcompress, maybe this is problem? # objdump -CR /usr/lib64/debug/usr/lib64/qt4/libQtCore.so.4.8.6.debug | grep COPY objdump: /usr/lib64/debug/usr/lib64/qt4/libQtCore.so.4.8.6.debug: Invalid operation Looks a lot like https://sourceware.org/bugzilla/show_bug.cgi?id=17895 Any chance you could try this binutils patch? https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=e9c1bdad269c0c3352eebcc9481ed65144001b0b;hp=0ed4b0bf3d2ca248778a2ffbcb2c5cafbfdd64dc err sorry... my brain is turned off at the moment... run objdump -CR on the *application* that links against libQtCore... Does it means that I should giv up with using gold? https://sourceware.org/bugzilla/show_bug.cgi?id=17895#c1 I patched binutils, recompiled qtcore and drkonqi, I don't have segfault. Because I'm doing this on remote host I can't check I can login to KDE. But I can see X is working so everythong should be ok. With ld.gold and binutils patched: # objdump -CR /usr/lib64/kde4/libexec/drkonqi |grep COPY 0000000000478700 R_X86_64_COPY KAssistantDialog::staticMetaObject 0000000000478a80 R_X86_64_COPY QHashData::shared_null 0000000000478ac0 R_X86_64_COPY vtable for QSpacerItem 00000000004788a0 R_X86_64_COPY typeinfo for QObject 0000000000478b80 R_X86_64_COPY vtable for __cxxabiv1::__class_type_info 0000000000478880 R_X86_64_COPY typeinfo for KDialog 0000000000478c60 R_X86_64_COPY typeinfo for QDBusAbstractAdaptor 0000000000478c80 R_X86_64_COPY typeinfo for QSyntaxHighlighter 0000000000478c00 R_X86_64_COPY KProcess::staticMetaObject 0000000000478980 R_X86_64_COPY typeinfo for KJob 0000000000478640 R_X86_64_COPY QString::shared_null 0000000000478c40 R_X86_64_COPY QDBusAbstractAdaptor::staticMetaObject 0000000000478b50 R_X86_64_COPY QVariant::handler 00000000004789c0 R_X86_64_COPY QListData::shared_null 00000000004789a0 R_X86_64_COPY QByteArray::shared_null 00000000004786c0 R_X86_64_COPY QWidget::staticMetaObject 0000000000478940 R_X86_64_COPY typeinfo for QStackedWidget 0000000000478780 R_X86_64_COPY QStackedWidget::staticMetaObject 0000000000478b60 R_X86_64_COPY QString::codecForCStrings 0000000000478a00 R_X86_64_COPY QMapData::shared_null 0000000000478660 R_X86_64_COPY KDialog::staticMetaObject 0000000000478960 R_X86_64_COPY typeinfo for QLabel 0000000000478820 R_X86_64_COPY typeinfo for KAssistantDialog 0000000000478840 R_X86_64_COPY typeinfo for QWidget 0000000000478740 R_X86_64_COPY QLabel::staticMetaObject 0000000000478680 R_X86_64_COPY QObject::staticMetaObject 00000000004787c0 R_X86_64_COPY vtable for __cxxabiv1::__si_class_type_info 00000000004788c0 R_X86_64_COPY vtable for __cxxabiv1::__vmi_class_type_info 00000000004786a0 R_X86_64_COPY KJob::staticMetaObject with ld.gold and unpatched binutils: # objdump -CR /usr/lib64/kde4/libexec/drkonqi |grep COPY 0000000000478700 R_X86_64_COPY KAssistantDialog::staticMetaObject 0000000000478a80 R_X86_64_COPY QHashData::shared_null 0000000000478ac0 R_X86_64_COPY vtable for QSpacerItem 00000000004788a0 R_X86_64_COPY typeinfo for QObject 0000000000478b80 R_X86_64_COPY vtable for __cxxabiv1::__class_type_info 0000000000478880 R_X86_64_COPY typeinfo for KDialog 0000000000478c60 R_X86_64_COPY typeinfo for QDBusAbstractAdaptor 0000000000478c80 R_X86_64_COPY typeinfo for QSyntaxHighlighter 0000000000478c00 R_X86_64_COPY KProcess::staticMetaObject 0000000000478980 R_X86_64_COPY typeinfo for KJob 0000000000478640 R_X86_64_COPY QString::shared_null 0000000000478c40 R_X86_64_COPY QDBusAbstractAdaptor::staticMetaObject 0000000000478b50 R_X86_64_COPY QVariant::handler 00000000004789c0 R_X86_64_COPY QListData::shared_null 00000000004789a0 R_X86_64_COPY QByteArray::shared_null 00000000004786c0 R_X86_64_COPY QWidget::staticMetaObject 0000000000478940 R_X86_64_COPY typeinfo for QStackedWidget 0000000000478780 R_X86_64_COPY QStackedWidget::staticMetaObject 0000000000478b60 R_X86_64_COPY QString::codecForCStrings 0000000000478a00 R_X86_64_COPY QMapData::shared_null 0000000000478660 R_X86_64_COPY KDialog::staticMetaObject 0000000000478960 R_X86_64_COPY typeinfo for QLabel 0000000000478820 R_X86_64_COPY typeinfo for KAssistantDialog 0000000000478840 R_X86_64_COPY typeinfo for QWidget 0000000000478740 R_X86_64_COPY QLabel::staticMetaObject 0000000000478680 R_X86_64_COPY QObject::staticMetaObject 00000000004787c0 R_X86_64_COPY vtable for __cxxabiv1::__si_class_type_info 00000000004788c0 R_X86_64_COPY vtable for __cxxabiv1::__vmi_class_type_info 00000000004786a0 R_X86_64_COPY KJob::staticMetaObject (In reply to Marcin Mirosław from comment #15) > I patched binutils, recompiled qtcore and drkonqi, I don't have segfault. > Because I'm doing this on remote host I can't check I can login to KDE. But > I can see X is working so everythong should be ok. Excellent, thanks for testing. @toolchain, can we backport the patch to binutils-2.25? (In reply to Davide Pesavento from comment #17) shouldn't be too hard to get this into binutils *** Bug 549366 has been marked as a duplicate of this bug. *** *** Bug 549900 has been marked as a duplicate of this bug. *** Thanks Mike. We're getting several duplicates, do you have an ETA on pushing a revbump with the patch? i had another patch i was working on for cross-compiling. that's fixed now, so i've pulled this in for 2.25-r1: http://sources.gentoo.org/gentoo/src/patchsets/binutils/2.25/88_all_gold-copy-relocs.patch?rev=1.1 Works for me. Thank you. *** Bug 549622 has been marked as a duplicate of this bug. *** |