Unsolved QML cross ARM SIGSEGV
-
Hello,
I build 5.12 from source to ARM platform (imx6).
Running console or qtwidget application is without problem.
When I try to run simply (hello world) qml app, I recieve SIGSEGV. I'm using -platform eglf but sigsegv appear with offscreen platform too.Here is gdb output...
[0_1548830800410_qml_sigsegv](Uploading 100%) -
(gdb) run
Starting program: /home/root/test3 -platform offscreen
warning: File "/lib/libthread_db-1.0.so" auto-loading has been declined by yourauto-load safe-path' set to "$debugdir:$datadir/auto-load". To enable execution of this file add add-auto-load-safe-path /lib/libthread_db-1.0.so line to your configuration file "/home/root/.gdbinit". To completely disable this security protection add set auto-load safe-path / line to your configuration file "/home/root/.gdbinit". For more information about this security protection see the "Auto-loading safe path" section in the GDB manual. E.g., run from the shell: info "(gdb)Auto-loading safe path" warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available. warning: File "/usr/lib/libstdc++.so.6.0.22-gdb.py" auto-loading has been declined by your
auto-load safe-path' set to "$debugdir:$datadir/auto-load".
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/var/volatile/tmp/runtime-root'
[New LWP 24680]Thread 2 "QQmlThread" received signal SIGSEGV, Segmentation fault.
[Switching to LWP 24680]
0x7640d2dc in std::_Function_handler<QV4::CompiledData::QmlUnit* (QV4::CompiledData::QmlUnit*, unsigned int), QmlIR::QmlUnitGenerator::generate(QmlIR::Document&, std::function<bool (QCryptographicHash*)> const&)::{lambda(QV4::CompiledData::QmlUnit*, unsigned int)#2}>::_M_invoke(std::_Any_data const&, QV4::CompiledData::QmlUnit*&&, unsigned int&&) ()
from /home/root/qt/lib/libQt5Qml.so.5
(gdb) bt
#0 0x7640d2dc in std::_Function_handler<QV4::CompiledData::QmlUnit* (QV4::CompiledData::QmlUnit*, unsigned int), QmlIR::QmlUnitGenerator::generate(QmlIR::Document&, std::function<bool (QCryptographicHash*)> const&)::{lambda(QV4::CompiledData::QmlUnit*, unsigned int)#2}>::_M_invoke(std::_Any_data const&, QV4::CompiledData::QmlUnit*&&, unsigned int&&) ()
from /home/root/qt/lib/libQt5Qml.so.5
#1 0x76413dd0 in QmlIR::QmlUnitGenerator::generate(QmlIR::Document&, std::function<bool (QCryptographicHash*)> const&) () from /home/root/qt/lib/libQt5Qml.so.5
#2 0x76431c40 in QQmlTypeCompiler::compile() () from /home/root/qt/lib/libQt5Qml.so.5
#3 0x765a7748 in QQmlTypeData::compile(QQmlRefPointer<QQmlTypeNameCache> const&, QV4::CompiledData::ResolvedTypeReferenceMap const&, std::function<bool (QCryptographicHash*)> const&) () from /home/root/qt/lib/libQt5Qml.so.5
#4 0x765ae5d8 in QQmlTypeData::done() () from /home/root/qt/lib/libQt5Qml.so.5
#5 0x765a6f44 in QQmlDataBlob::tryDone() () from /home/root/qt/lib/libQt5Qml.so.5
#6 0x765a84d0 in QQmlTypeLoader::setData(QQmlDataBlob*, QQmlDataBlob::SourceCodeData const&) () from /home/root/qt/lib/libQt5Qml.so.5
#7 0x765a8e0c in QQmlTypeLoader::setData(QQmlDataBlob*, QString const&) () from /home/root/qt/lib/libQt5Qml.so.5
#8 0x765a90dc in QQmlTypeLoader::loadThread(QQmlDataBlob*) () from /home/root/qt/lib/libQt5Qml.so.5
#9 0x765a9158 in QQmlTypeLoaderThread::loadThread(QQmlDataBlob*) () from /home/root/qt/lib/libQt5Qml.so.5
#10 0x766216dc in QQmlThreadPrivate::threadEvent() () from /home/root/qt/lib/libQt5Qml.so.5
#11 0x76621d44 in QQmlThreadPrivate::event(QEvent*) () from /home/root/qt/lib/libQt5Qml.so.5
#12 0x75eeb4a0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /home/root/qt/lib/libQt5Core.so.5
#13 0x75eee924 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /home/root/qt/lib/libQt5Core.so.5
#14 0x75f4c418 in postEventSourceDispatch(_GSource*, int ()(void), void*) () from /home/root/qt/lib/libQt5Core.so.5
#15 0x73ae6a4c in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#16 0x73ae6c78 in ?? () from /usr/lib/libglib-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?) -
Can you share config line you used to build Qt?
I suspect you might have turned on JIT but it is not supported on ARM 32 bit.
Looks like the crash happens in QML compiler, that can be turned off, too.
-
Thank you for reply.
QT was build with:./configure -opensource -confirm-license -nomake tests -nomake examples -device linux-arm-bustec-g++ -device-option CROSS_COMPILE=arm-poky-linux-gnueabi- -sysroot /opt/poky/2.2/sysroots/cortexa9hf-neon-poky-linux-gnueabi/ -recheck-all
and I added file: mkspect/devicelinux-arm-bustec-g++
include(../common/linux_device_pre.conf) DISTRO_OPTS += hard-float include(../common/linux_arm_device_post.conf) IMX6_CFLAGS = -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 QMAKE_CFLAGS += $$IMX6_CFLAGS QMAKE_CXXFLAGS += $$IMX6_CFLAGS # modifications to g++.conf QMAKE_CC = /opt/poky/2.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux/arm-poky-linux-gcc QMAKE_CXX = /opt/poky/2.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux/arm-poky-linux-g++ QMAKE_LINK = /opt/poky/2.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux/arm-poky-linux-g++ QMAKE_LINK_SHLIB = /opt/poky/2.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux/arm-poky-linux-g++ # modifications to linux.conf QMAKE_AR = /opt/poky/2.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux/arm-poky-linux-ar -r QMAKE_OBJCOPY = /opt/poky/2.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi-objcopy QMAKE_NM = /opt/poky/2.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi-nm QMAKE_STRIP = /opt/poky/2.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi-strip load(qt_config)
-
OK, nothing out of ordinary here.
Please check http://doc.qt.io/qt-5/qtquick-deployment.html to see if:
- QML cache location is writable by your application
- maybe you enabled QML compiler somehow - then try turning it off
CONFIG-=qtquickcompiler
- try running the app with
QV4_FORCE_INTERPRETER
env variable set - it should forcefully disable JIT (https://wiki.qt.io/V4)
Maybe this will help.
-
When I compile project with "CONFIG-=qtquickcompiler" - program imediatle crash
When I compile project with "CONFIG+=qtquickcompiler" - program run until I press button and try to gererate graph (ChartView)
So some partial progress is there (with CONFIG+=qtquickcompiler).
I understand this behavior because documentation said:Your application must load the QML documents via the qrc:/// URL scheme.
So ChartView isn't in qrc. What can I do with this?
I tryed "export QV4_FORCE_INTERPRETER" with same result as above.Any idea ?
Thank
-
No more ideas, sorry. Looks like something related to Just in Time compilation, or QML caching, but I don't know how to solve it.
Perhaps you can ask on Qt interest mailing list? https://lists.qt-project.org/ Maybe some core dev would have an idea, maybe there is some "hidden" Qt config flag that would work here.
-
I am having the exact same problem with Qt 5.12. The issue remains unresolved. Please give us more clues how to understand the problem.
I suspect this is because of a false configuration, I tried to port Qt 5.12 to a machine (iMX8) that has Qt 5.8 available and working. That might be the cause. But how to solve it is a mystery still.