Bug 17895

Summary: gold linked Qt4 causes segfaults and hanging applications
Product: binutils Reporter: Heiko Becker <heirecka>
Component: goldAssignee: Cary Coutant <ccoutant>
Status: RESOLVED DUPLICATE    
Severity: normal CC: ian, markus
Priority: P2    
Version: 2.25   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description Heiko Becker 2015-01-28 16:25:33 UTC
If I build Qt4 (4.8.6) with the gold linker everything using qt either segfaults or hangs early on startup. I'm not sure if this a bug in binutils or qt but since it worked for me, as far as I can tell, with 2.24 I start reporting here. Furthermore Qt5 doesn't show the same behaviour.

If I rebuild using bfd everything's back to normal.

Below are two backtraces, one from soprano, one from qt's linguist:

onto2vocabularyclass --name NCO --encoding trig --namespace Nepomuk::Vocabulary --export-module nepomuk /usr/share/ontology/nie/nco.trig

(gdb) bt
#0  0x00007f5dc962a670 in __read_nocancel () from /lib64/libc.so.6
#1  0x00007f5dc9b5dc81 in qt_safe_read (maxlen=16384, data=0x7fff8fbf3aa0, fd=6)
    at ../../include/QtCore/private/../../../../../qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qcore_unix_p.h:276
#2  QFSFileEnginePrivate::readFdFh (this=this@entry=0x1693330, 
    data=data@entry=0x7fff8fbf3aa0 "[Desktop Entry]\nEncoding=UTF-8\nX-Soprano-Library=soprano_nquadparser\nX-Soprano-Plugin-Author=Sebastian Trueg\nX-Soprano-Plugin-EMail=trueg@kde.org\nX-Soprano-Plugin-Website=http://soprano.sourceforge.ne"..., 
    len=len@entry=16384)
    at /var/tmp/paludis/build/x11-libs-qt-4.8.6-r4/work/qt-everywhere-opensource-src-4.8.6/src/corelib/io/qfsfileengine.cpp:649
#3  0x00007f5dc9b65baf in QFSFileEnginePrivate::nativeRead (this=0x1693330, 
    data=0x7fff8fbf3aa0 "[Desktop Entry]\nEncoding=UTF-8\nX-Soprano-Library=soprano_nquadparser\nX-Soprano-Plugin-Author=Sebastian Trueg\nX-Soprano-Plugin-EMail=trueg@kde.org\nX-Soprano-Plugin-Website=http://soprano.sourceforge.ne"..., len=16384)
    at /var/tmp/paludis/build/x11-libs-qt-4.8.6-r4/work/qt-everywhere-opensource-src-4.8.6/src/corelib/io/qfsfileengine_unix.cpp:514
#4  0x00007f5dc9b15cfa in QFile::readData (this=<optimized out>, 
    data=0x7fff8fbf3aa0 "[Desktop Entry]\nEncoding=UTF-8\nX-Soprano-Library=soprano_nquadparser\nX-Soprano-Plugin-Author=Sebastian Trueg\nX-Soprano-Plugin-EMail=trueg@kde.org\nX-Soprano-Plugin-Website=http://soprano.sourceforge.ne"..., len=16384)
    at /var/tmp/paludis/build/x11-libs-qt-4.8.6-r4/work/qt-everywhere-opensource-src-4.8.6/src/corelib/io/qfile.cpp:1751
#5  0x00007f5dc9b1ce36 in QIODevice::read (this=0x7fff8fbf7cb0, 
    data=data@entry=0x7fff8fbf3aa0 "[Desktop Entry]\nEncoding=UTF-8\nX-Soprano-Library=soprano_nquadparser\nX-Soprano-Plugin-Author=Sebastian Trueg\nX-Soprano-Plugin-EMail=trueg@kde.org\nX-Soprano-Plugin-Website=http://soprano.sourceforge.ne"..., 
    maxSize=maxSize@entry=16384)
    at /var/tmp/paludis/build/x11-libs-qt-4.8.6-r4/work/qt-everywhere-opensource-src-4.8.6/src/corelib/io/qiodevice.cpp:867
#6  0x00007f5dc9b2cf39 in QTextStreamPrivate::fillReadBuffer (this=this@entry=0x1694790, maxBytes=maxBytes@entry=-1)
    at /var/tmp/paludis/build/x11-libs-qt-4.8.6-r4/work/qt-everywhere-opensource-src-4.8.6/src/corelib/io/qtextstream.cpp:552
#7  0x00007f5dc9b2d8a7 in QTextStreamPrivate::scan (this=this@entry=0x1694790, ptr=ptr@entry=0x7fff8fbf7b88, 
    length=length@entry=0x7fff8fbf7b6c, maxlen=0, delimiter=delimiter@entry=QTextStreamPrivate::EndOfLine)
    at /var/tmp/paludis/build/x11-libs-qt-4.8.6-r4/work/qt-everywhere-opensource-src-4.8.6/src/corelib/io/qtextstream.cpp:789
---Type <return> to continue, or q <return> to quit---
#8  0x00007f5dc9b2e227 in QTextStream::readLine (this=<optimized out>, maxlen=<optimized out>)
    at /var/tmp/paludis/build/x11-libs-qt-4.8.6-r4/work/qt-everywhere-opensource-src-4.8.6/src/corelib/io/qtextstream.cpp:1672
#9  0x00007f5dc9e83247 in Soprano::IniFile::open(QString const&) () from /usr/lib64/libsoprano.so.4
#10 0x00007f5dc9e84264 in Soprano::DesktopFile::open(QString const&) () from /usr/lib64/libsoprano.so.4
#11 0x00007f5dc9e84a70 in Soprano::SopranoPluginFile::open(QString const&) () from /usr/lib64/libsoprano.so.4
#12 0x00007f5dc9e32d03 in Soprano::PluginManager::loadPlugin(QString const&) () from /usr/lib64/libsoprano.so.4
#13 0x00007f5dc9e33da0 in Soprano::PluginManager::loadAllPlugins() () from /usr/lib64/libsoprano.so.4
#14 0x00007f5dc9e34646 in Soprano::PluginManager::discoverParserForSerialization(Soprano::RdfSerialization, QString const&) ()
   from /usr/lib64/libsoprano.so.4
#15 0x0000000000403fe2 in main ()

linguist:

(gdb) bt
#0  0x00007ffff6cd5a07 in raise () from /lib64/libc.so.6
#1  0x00007ffff6cd6d78 in abort () from /lib64/libc.so.6
#2  0x00007ffff70c23bf in qt_message_output (msgType=msgType@entry=QtFatalMsg, buf=<optimized out>)
    at /var/tmp/paludis/build/x11-libs-qt-4.8.6-r4/work/qt-everywhere-opensource-src-4.8.6/src/corelib/global/qglobal.cpp:2359
#3  0x00007ffff70c2529 in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (
    msgType=msgType@entry=QtFatalMsg, msg=msg@entry=0x7ffff7bc3e98 "QPixmap: Must construct a QApplication before a QPaintDevice", 
    ap=ap@entry=0x7fffffffd5c8)
    at /var/tmp/paludis/build/x11-libs-qt-4.8.6-r4/work/qt-everywhere-opensource-src-4.8.6/src/corelib/global/qglobal.cpp:2405
#4  0x00007ffff70c2dac in qFatal (msg=msg@entry=0x7ffff7bc3e98 "QPixmap: Must construct a QApplication before a QPaintDevice")
    at /var/tmp/paludis/build/x11-libs-qt-4.8.6-r4/work/qt-everywhere-opensource-src-4.8.6/src/corelib/global/qglobal.cpp:2588
#5  0x00007ffff75ccd30 in qt_pixmap_thread_test ()
    at /var/tmp/paludis/build/x11-libs-qt-4.8.6-r4/work/qt-everywhere-opensource-src-4.8.6/src/gui/image/qpixmap.cpp:102
#6  0x00007ffff75cdc19 in QPixmap::QPixmap (this=0x5e1ba8)
    at /var/tmp/paludis/build/x11-libs-qt-4.8.6-r4/work/qt-everywhere-opensource-src-4.8.6/src/gui/image/qpixmap.cpp:174
#7  0x00007ffff757ffa6 in QCursorData::QCursorData (this=0x5e1b90, s=<optimized out>)
    at /var/tmp/paludis/build/x11-libs-qt-4.8.6-r4/work/qt-everywhere-opensource-src-4.8.6/src/gui/kernel/qcursor_x11.cpp:77
#8  0x00007ffff750f16f in QCursorData::initialize ()
    at /var/tmp/paludis/build/x11-libs-qt-4.8.6-r4/work/qt-everywhere-opensource-src-4.8.6/src/gui/kernel/qcursor.cpp:403
#9  0x00007ffff7581ca9 in QX11Data::xdndSetup ()
    at /var/tmp/paludis/build/x11-libs-qt-4.8.6-r4/work/qt-everywhere-opensource-src-4.8.6/src/gui/kernel/qdnd_x11.cpp:708
#10 0x00007ffff7571d84 in qt_init (priv=priv@entry=0x57a460, display=display@entry=0x0, visual=visual@entry=0, 
    colormap=colormap@entry=0)
    at /var/tmp/paludis/build/x11-libs-qt-4.8.6-r4/work/qt-everywhere-opensource-src-4.8.6/src/gui/kernel/qapplication_x11.cpp:2006
#11 0x00007ffff75022a8 in QApplicationPrivate::construct (this=0x57a460, dpy=dpy@entry=0x0, visual=visual@entry=0, 
    cmap=cmap@entry=0)
    at /var/tmp/paludis/build/x11-libs-qt-4.8.6-r4/work/qt-everywhere-opensource-src-4.8.6/src/gui/kernel/qapplication.cpp:842
---Type <return> to continue, or q <return> to quit---
#12 0x00007ffff750251f in QApplication::QApplication (this=0x7fffffffddd0, argc=@0x7fffffffdc8c: 1, argv=0x7fffffffe328, 
    _internal=17041414)
    at /var/tmp/paludis/build/x11-libs-qt-4.8.6-r4/work/qt-everywhere-opensource-src-4.8.6/src/gui/kernel/qapplication.cpp:741
#13 0x000000000042ac27 in main (argc=1, argv=0x7fffffffe328)
    at /var/tmp/paludis/build/x11-libs-qt-4.8.6-r4/work/qt-everywhere-opensource-src-4.8.6/tools/linguist/linguist/main.cpp:109
Comment 1 Markus Trippelsdorf 2015-01-28 18:11:45 UTC
Might be a dup of https://sourceware.org/bugzilla/show_bug.cgi?id=16992

Unfortunately gold apparently isn't maintained anymore.
Comment 2 Markus Trippelsdorf 2015-02-17 07:07:25 UTC
Should be fixed now.

*** This bug has been marked as a duplicate of bug 16992 ***