When grantlee-0.4.0-6.fc21 is built in F-21 with Qt library built with gcc 4.9, some tests are segfaulting, they pass when Qt built by gcc 4.8 is used. ... Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.M18KZq + umask 022 + cd /home/sharkcz/grantlee + cd grantlee-0.4.0 + export CTEST_OUTPUT_ON_FAILURE=1 + CTEST_OUTPUT_ON_FAILURE=1 + xvfb-run -a make test -C s390x-redhat-linux-gnu make: Entering directory '/home/sharkcz/grantlee/grantlee-0.4.0/s390x-redhat-linux-gnu' Running tests... /usr/bin/ctest --force-new-ctest-process Test project /home/sharkcz/grantlee/grantlee-0.4.0/s390x-redhat-linux-gnu Start 1: testsafestring 1/11 Test #1: testsafestring ................... Passed 0.00 sec Start 2: testbuiltins 2/11 Test #2: testbuiltins ..................... Passed 0.03 sec Start 3: testloadertags 3/11 Test #3: testloadertags ...................***Exception: Other 0.27 sec ********* Start testing of TestLoaderTags ********* Config: Using QTest library 4.8.6, Qt 4.8.6 PASS : TestLoaderTags::initTestCase() QFATAL : TestLoaderTags::testIncludeTag(include01) Received signal 11 FAIL! : TestLoaderTags::testIncludeTag(include01) Received a fatal error. Loc: [Unknown file(0)] Totals: 1 passed, 1 failed, 0 skipped ********* Finished testing of TestLoaderTags ********* Start 4: testdefaulttags 4/11 Test #4: testdefaulttags .................. Passed 0.03 sec Start 5: testscriptabletags 5/11 Test #5: testscriptabletags ...............***Exception: Other 0.09 sec ********* Start testing of TestScriptableTagsSyntax ********* Config: Using QTest library 4.8.6, Qt 4.8.6 PASS : TestScriptableTagsSyntax::initTestCase() QFATAL : TestScriptableTagsSyntax::testBasicSyntax(scriptable-tags01) Received signal 11 FAIL! : TestScriptableTagsSyntax::testBasicSyntax(scriptable-tags01) Received a fatal error. Loc: [Unknown file(0)] Totals: 1 passed, 1 failed, 0 skipped ********* Finished testing of TestScriptableTagsSyntax ********* Start 6: testfilters 6/11 Test #6: testfilters ...................... Passed 0.02 sec Start 7: testgenerictypes 7/11 Test #7: testgenerictypes ................. Passed 0.08 sec Start 8: testgenericcontainers 8/11 Test #8: testgenericcontainers ............ Passed 0.01 sec Start 9: testinternationalization 9/11 Test #9: testinternationalization ......... Passed 0.01 sec Start 10: htmlbuildertest 10/11 Test #10: htmlbuildertest .................. Passed 0.02 sec Start 11: plainmarkupbuildertest 11/11 Test #11: plainmarkupbuildertest ...........***Failed 0.01 sec plainmarkupbuildertest_exec: cannot connect to X server :99 Version-Release number of selected component (if applicable): gcc-4.9.1-7.fc21.s390x FAILS with qt-4.8.6-2.fc21 (built with gcc-4.9.0-1.fc21) qt-4.8.6-9.fc21 (built with gcc-4.9.1-2.fc21.1) PASSES with qt-4.8.6-0.1.rc1.fc21 (built with gcc-4.8.2-14.fc21) The tests also pass when built on F-20 using qt-4.8.6-10.fc20 (and gcc 4.8), so it should be related to gcc 4.9.
[sharkcz@devel3 tests]$ gdb testloadertags_exec GNU gdb (GDB) Fedora 7.7.90.20140613-4.fc21 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "s390x-redhat-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from testloadertags_exec...done. (gdb) run Starting program: /home/sharkcz/grantlee/grantlee-0.4.0/s390x-redhat-linux-gnu/templates/tests/testloadertags_exec Missing separate debuginfos, use: debuginfo-install glibc-2.19.90-23.fc21.s390x warning: the debug information found in "/usr/lib/debug//lib64/libm-2.19.90.so.debug" does not match "/lib64/libm.so.6" (CRC mismatch). warning: the debug information found in "/usr/lib/debug//lib64/libc-2.19.90.so.debug" does not match "/lib64/libc.so.6" (CRC mismatch). warning: the debug information found in "/usr/lib/debug//lib64/libpthread-2.19.90.so.debug" does not match "/lib64/libpthread.so.0" (CRC mismatch). [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". warning: the debug information found in "/usr/lib/debug/usr/lib64/libz.so.1.2.8.debug" does not match "/lib64/libz.so.1" (CRC mismatch). warning: the debug information found in "/usr/lib/debug//usr/lib64/libz.so.1.2.8.debug" does not match "/lib64/libz.so.1" (CRC mismatch). warning: the debug information found in "/usr/lib/debug/usr/lib64//libz.so.1.2.8.debug" does not match "/lib64/libz.so.1" (CRC mismatch). warning: the debug information found in "/usr/lib/debug//lib64/libdl-2.19.90.so.debug" does not match "/lib64/libdl.so.2" (CRC mismatch). warning: the debug information found in "/usr/lib/debug//lib64/librt-2.19.90.so.debug" does not match "/lib64/librt.so.1" (CRC mismatch). warning: the debug information found in "/usr/lib/debug//usr/lib64/gconv/UTF-16.so.debug" does not match "/usr/lib64/gconv/UTF-16.so" (CRC mismatch). warning: the debug information found in "/usr/lib/debug/usr/lib64/gconv/UTF-16.so.debug" does not match "/usr/lib64/gconv/UTF-16.so" (CRC mismatch). warning: the debug information found in "/usr/lib/debug//usr/lib64/gconv/UTF8_UTF16_Z9.so.debug" does not match "/usr/lib64/gconv/UTF8_UTF16_Z9.so" (CRC mismatch). warning: the debug information found in "/usr/lib/debug/usr/lib64/gconv/UTF8_UTF16_Z9.so.debug" does not match "/usr/lib64/gconv/UTF8_UTF16_Z9.so" (CRC mismatch). ********* Start testing of TestLoaderTags ********* Config: Using QTest library 4.8.6, Qt 4.8.6 PASS : TestLoaderTags::initTestCase() [New Thread 0x3fff51cb910 (LWP 29362)] Program received signal SIGSEGV, Segmentation fault. 0x000003fffd7372de in QScript::QObjectData::QObjectData(QScriptEnginePrivate*) () from /lib64/libQtScript.so.4 Missing separate debuginfos, use: debuginfo-install glib2-2.41.1-1.fc21.s390x libicu-52.1-3.fc21.s390x qt-4.8.6-9.fc21.s390x zlib-1.2.8-5.fc21.s390x (gdb) where #0 0x000003fffd7372de in QScript::QObjectData::QObjectData(QScriptEnginePrivate*) () from /lib64/libQtScript.so.4 #1 0x000003fffd70c22e in QScriptEnginePrivate::qobjectData(QObject*) () from /lib64/libQtScript.so.4 #2 0x000003fffd70c3a2 in QScriptEnginePrivate::newQObject(QObject*, QScriptEngine::ValueOwnership, QFlags<QScriptEngine::QObjectWrapOption> const&) () from /lib64/libQtScript.so.4 #3 0x000003fffd70c704 in QScriptEngine::newQObject(QObject*, QScriptEngine::ValueOwnership, QFlags<QScriptEngine::QObjectWrapOption> const&) () from /lib64/libQtScript.so.4 #4 0x000003fffdfb1874 in Grantlee::ScriptableTagLibrary::ScriptableTagLibrary (this=0x8002f6a0, parent=<optimized out>) at /home/sharkcz/grantlee/grantlee-0.4.0/templates/scriptabletags/scriptabletags.cpp:89 #5 0x000003fffdf8347e in Grantlee::Engine::loadDefaultLibraries (this=0x8002cc20) at /home/sharkcz/grantlee/grantlee-0.4.0/templates/lib/engine.cpp:149 #6 0x000003fffdf9b2f2 in Grantlee::Parser::Parser (this=0x3ffffffdd88, tokenList=..., parent=0x8002f560) at /home/sharkcz/grantlee/grantlee-0.4.0/templates/lib/parser.cpp:105 #7 0x000003fffdfa5126 in Grantlee::TemplatePrivate::compileString (this=this@entry=0x8002f610, str=...) at /home/sharkcz/grantlee/grantlee-0.4.0/templates/lib/template.cpp:39 #8 0x000003fffdfa529a in Grantlee::TemplateImpl::setContent (this=<optimized out>, templateString=...) at /home/sharkcz/grantlee/grantlee-0.4.0/templates/lib/template.cpp:66 #9 0x000003fffdf81fc0 in Grantlee::Engine::newTemplate (this=this@entry=0x8002cc20, content=..., name=...) at /home/sharkcz/grantlee/grantlee-0.4.0/templates/lib/engine.cpp:376 #10 0x000000008000d7da in TestLoaderTags::doTest (this=<optimized out>) at /home/sharkcz/grantlee/grantlee-0.4.0/templates/tests/testloadertags.cpp:98 #11 0x000003fffdda3f46 in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const () from /lib64/libQtCore.so.4 #12 0x000003fffdda6f82 in QMetaObject::invokeMethod(QObject*, char const*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) () from /lib64/libQtCore.so.4 #13 0x000003fffdf339b6 in QTest::qInvokeTestMethod(char const*, char const*) () from /lib64/libQtTest.so.4 #14 0x000003fffdf34a2e in QTest::qExec(QObject*, int, char**) () from /lib64/libQtTest.so.4 #15 0x000000008000468c in main (argc=1, argv=0x3fffffff2f8) at /home/sharkcz/grantlee/grantlee-0.4.0/templates/tests/testloadertags.cpp:460 (gdb)
[sharkcz@devel3 tests]$ gdb testscriptabletags_exec GNU gdb (GDB) Fedora 7.7.90.20140613-4.fc21 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "s390x-redhat-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from testscriptabletags_exec...done. (gdb) run Starting program: /home/sharkcz/grantlee/grantlee-0.4.0/s390x-redhat-linux-gnu/templates/tests/testscriptabletags_exec Missing separate debuginfos, use: debuginfo-install glibc-2.19.90-23.fc21.s390x warning: the debug information found in "/usr/lib/debug//lib64/libm-2.19.90.so.debug" does not match "/lib64/libm.so.6" (CRC mismatch). warning: the debug information found in "/usr/lib/debug//lib64/libc-2.19.90.so.debug" does not match "/lib64/libc.so.6" (CRC mismatch). warning: the debug information found in "/usr/lib/debug//lib64/libpthread-2.19.90.so.debug" does not match "/lib64/libpthread.so.0" (CRC mismatch). [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". warning: the debug information found in "/usr/lib/debug/usr/lib64/libz.so.1.2.8.debug" does not match "/lib64/libz.so.1" (CRC mismatch). warning: the debug information found in "/usr/lib/debug//usr/lib64/libz.so.1.2.8.debug" does not match "/lib64/libz.so.1" (CRC mismatch). warning: the debug information found in "/usr/lib/debug/usr/lib64//libz.so.1.2.8.debug" does not match "/lib64/libz.so.1" (CRC mismatch). warning: the debug information found in "/usr/lib/debug//lib64/libdl-2.19.90.so.debug" does not match "/lib64/libdl.so.2" (CRC mismatch). warning: the debug information found in "/usr/lib/debug//lib64/librt-2.19.90.so.debug" does not match "/lib64/librt.so.1" (CRC mismatch). warning: the debug information found in "/usr/lib/debug//usr/lib64/gconv/UTF-16.so.debug" does not match "/usr/lib64/gconv/UTF-16.so" (CRC mismatch). warning: the debug information found in "/usr/lib/debug/usr/lib64/gconv/UTF-16.so.debug" does not match "/usr/lib64/gconv/UTF-16.so" (CRC mismatch). warning: the debug information found in "/usr/lib/debug//usr/lib64/gconv/UTF8_UTF16_Z9.so.debug" does not match "/usr/lib64/gconv/UTF8_UTF16_Z9.so" (CRC mismatch). warning: the debug information found in "/usr/lib/debug/usr/lib64/gconv/UTF8_UTF16_Z9.so.debug" does not match "/usr/lib64/gconv/UTF8_UTF16_Z9.so" (CRC mismatch). ********* Start testing of TestScriptableTagsSyntax ********* Config: Using QTest library 4.8.6, Qt 4.8.6 PASS : TestScriptableTagsSyntax::initTestCase() [New Thread 0x3fff51cb910 (LWP 29368)] Program received signal SIGSEGV, Segmentation fault. 0x000003fffd7372de in QScript::QObjectData::QObjectData(QScriptEnginePrivate*) () from /lib64/libQtScript.so.4 Missing separate debuginfos, use: debuginfo-install glib2-2.41.1-1.fc21.s390x libicu-52.1-3.fc21.s390x qt-4.8.6-9.fc21.s390x zlib-1.2.8-5.fc21.s390x (gdb) where #0 0x000003fffd7372de in QScript::QObjectData::QObjectData(QScriptEnginePrivate*) () from /lib64/libQtScript.so.4 #1 0x000003fffd70c22e in QScriptEnginePrivate::qobjectData(QObject*) () from /lib64/libQtScript.so.4 #2 0x000003fffd70c3a2 in QScriptEnginePrivate::newQObject(QObject*, QScriptEngine::ValueOwnership, QFlags<QScriptEngine::QObjectWrapOption> const&) () from /lib64/libQtScript.so.4 #3 0x000003fffd70c704 in QScriptEngine::newQObject(QObject*, QScriptEngine::ValueOwnership, QFlags<QScriptEngine::QObjectWrapOption> const&) () from /lib64/libQtScript.so.4 #4 0x000003fffdfb1874 in Grantlee::ScriptableTagLibrary::ScriptableTagLibrary (this=0x80026ff0, parent=<optimized out>) at /home/sharkcz/grantlee/grantlee-0.4.0/templates/scriptabletags/scriptabletags.cpp:89 #5 0x000003fffdf8347e in Grantlee::Engine::loadDefaultLibraries (this=0x80023c20) at /home/sharkcz/grantlee/grantlee-0.4.0/templates/lib/engine.cpp:149 #6 0x000003fffdf9b2f2 in Grantlee::Parser::Parser (this=0x3ffffffdd98, tokenList=..., parent=0x80026eb0) at /home/sharkcz/grantlee/grantlee-0.4.0/templates/lib/parser.cpp:105 #7 0x000003fffdfa5126 in Grantlee::TemplatePrivate::compileString (this=this@entry=0x80026f60, str=...) at /home/sharkcz/grantlee/grantlee-0.4.0/templates/lib/template.cpp:39 #8 0x000003fffdfa529a in Grantlee::TemplateImpl::setContent (this=<optimized out>, templateString=...) at /home/sharkcz/grantlee/grantlee-0.4.0/templates/lib/template.cpp:66 #9 0x000003fffdf81fc0 in Grantlee::Engine::newTemplate (this=this@entry=0x80023c20, content=..., name=...) at /home/sharkcz/grantlee/grantlee-0.4.0/templates/lib/engine.cpp:376 #10 0x000000008000688a in TestScriptableTagsSyntax::doTest (this=<optimized out>) at /home/sharkcz/grantlee/grantlee-0.4.0/templates/tests/testscriptabletags.cpp:94 #11 0x000003fffdda3f46 in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const () from /lib64/libQtCore.so.4 #12 0x000003fffdda6f82 in QMetaObject::invokeMethod(QObject*, char const*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) () from /lib64/libQtCore.so.4 #13 0x000003fffdf339b6 in QTest::qInvokeTestMethod(char const*, char const*) () from /lib64/libQtTest.so.4 #14 0x000003fffdf34a2e in QTest::qExec(QObject*, int, char**) () from /lib64/libQtTest.so.4 #15 0x0000000080003f34 in main (argc=1, argv=0x3fffffff2f8) at /home/sharkcz/grantlee/grantlee-0.4.0/templates/tests/testscriptabletags.cpp:182 (gdb)
I'm going to rebuild Qt with gcc-4.9.1-7.fc21 and retry with it.
(In reply to Dan Horák from comment #3) > I'm going to rebuild Qt with gcc-4.9.1-7.fc21 and retry with it. and no change with http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=1496777, still segfaults :-(
Can you bisect this to a single Qt object (either between -O0 and -O2, or 4.8.x and 4.9.x)?
(In reply to Jakub Jelinek from comment #5) > Can you bisect this to a single Qt object (either between -O0 and -O2, or > 4.8.x and 4.9.x)? yes, it is the plan, but it can take time, Qt is huge :-( I've opened this bz to collect the known information as a start.
The _ZN7QScript11QObjectDataC2EP20QScriptEnginePrivate function in libQtScript.so.4.8.6 looks suspicious. The first instruction doesn't save the %r14 register to stack (the return address), but then in the epilogue we load it from there, so it reads an uninitialized value from stack and jumps to it: 1da2d8: e3 f0 f0 78 00 24 stg %r15,120(%r15) 1da2de: e3 30 20 00 00 24 stg %r3,0(%r2) 1da2e4: c0 10 00 04 cd 96 larl %r1,273e10 <_ZN22QScriptExtensionPlugin16staticMetaObjectE+0x1050> 1da2ea: a7 39 00 00 lghi %r3,0 1da2ee: e3 30 20 08 00 24 stg %r3,8(%r2) 1da2f4: e3 f0 ff 58 ff 71 lay %r15,-168(%r15) 1da2fa: a7 58 00 01 lhi %r5,1 1da2fe: e3 10 10 00 00 04 lg %r1,0(%r1) 1da304: e3 10 20 10 00 24 stg %r1,16(%r2) 1da30a: 58 30 10 00 l %r3,0(%r1) 1da30e: 18 23 lr %r2,%r3 1da310: 1a 25 ar %r2,%r5 1da312: ba 32 10 00 cs %r3,%r2,0(%r1) 1da316: a7 44 ff fc jl 1da30e <_ZNK11QScriptable8argumentEi+0x95ce> 1da31a: 50 30 f0 a0 st %r3,160(%r15) 1da31e: e3 40 f1 18 00 04 lg %r4,280(%r15) 1da324: 50 20 f0 a4 st %r2,164(%r15) 1da328: 58 10 f0 a4 l %r1,164(%r15) 1da32c: e3 f0 f1 20 00 04 lg %r15,288(%r15) 1da332: 07 f4 br %r4 That is from qt-4.8.6-10.fc21.s390x.rpm. Now, I'll really need preprocessed source and command line options for this file (is that qscriptqobject.cpp?) to debug.
Created attachment 933469 [details] qscriptobject.ii.bz2 g++ -m64 -O2 -fvisibility=hidden -fPIC -march=z9-109 -mtune=z10 \ -S qscriptobject.ii reproduces it even in a cross-compiler.
problems seems to be fixed with qt-4.8.6-11.fc21 rebuilt with gcc-4.9.1-9.fc21 in the buildroot - http://s390.koji.fedoraproject.org/koji/buildinfo?buildID=271200