Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Random crashes in Qt 5.9.4 OpenGL example



  • I have built Qt 5.9.4 for an ArchLinux based system on 64-bit Intel Atom E3845. When I run threadedqopenglwidget example for a while (~1:30 min), it crashes with the following backtrace. On a more up-to-date system, with newer versions of mesa, xcb, etc, the example does not crash.
    Is there a relevant known issue? For example: https://bugzilla.kernel.org/show_bug.cgi?id=109051

    time DISPLAY=:0.0 /home/root/examples/opengl/threadedqopenglwidget/threadedqopenglwidget
    *** Error in `/home/root/examples/opengl/threadedqopenglwidget/threadedqopenglwidget': corrupted double-linked list: 0x0000000003020aa0 ***
    ======= Backtrace: =========
    /usr/lib/libc.so.6(+0x72055)[0x7ff35bd01055]
    /usr/lib/libc.so.6(+0x779a6)[0x7ff35bd069a6]
    /usr/lib/libc.so.6(+0x77c71)[0x7ff35bd06c71]
    /usr/lib/libc.so.6(+0x798a0)[0x7ff35bd088a0]
    /usr/lib/libc.so.6(__libc_malloc+0x54)[0x7ff35bd0a3d4]
    /usr/lib/libdrm_intel.so.1(+0x629a)[0x7ff34a5c629a]
    /usr/lib/libdrm_intel.so.1(+0x640b)[0x7ff34a5c640b]
    /usr/lib/xorg/modules/dri/i965_dri.so(+0x407ff5)[0x7ff34abe8ff5]
    /usr/lib/xorg/modules/dri/i965_dri.so(+0x3b3edd)[0x7ff34ab94edd]
    /usr/lib/xorg/modules/dri/i965_dri.so(+0x3c6629)[0x7ff34aba7629]
    /usr/lib/xorg/modules/dri/i965_dri.so(+0x34f6a2)[0x7ff34ab306a2]
    /usr/lib/xorg/modules/dri/i965_dri.so(+0x3b1760)[0x7ff34ab92760]
    /usr/lib/xorg/modules/dri/i965_dri.so(+0x3b20b5)[0x7ff34ab930b5]
    /usr/lib/xorg/modules/dri/i965_dri.so(+0x33d21c)[0x7ff34ab1e21c]
    /usr/lib/libQt5Gui.so.5(_ZN21QPlatformBackingStore15composeAndFlushEP7QWindowRK7QRegionRK6QPointP20QPlatformTextureListP14QOpenGLContextb+0x1a8)[0x7ff35d380778]
    /usr/lib/libQt5XcbQpa.so.5(+0x5a487)[0x7ff3536c0487]
    /usr/lib/libQt5Widgets.so.5(+0x16093a)[0x7ff35d8ab93a]
    /usr/lib/libQt5Widgets.so.5(+0x162089)[0x7ff35d8ad089]
    /usr/lib/libQt5Widgets.so.5(+0x1635b2)[0x7ff35d8ae5b2]
    /usr/lib/libQt5Widgets.so.5(+0x163f08)[0x7ff35d8aef08]
    /usr/lib/libQt5Widgets.so.5(_ZN14QWidgetPrivate16syncBackingStoreEv+0x4f)[0x7ff35d8c60ff]
    /usr/lib/libQt5Widgets.so.5(_ZN7QWidget5eventEP6QEvent+0x408)[0x7ff35d8de028]
    /usr/lib/libQt5Widgets.so.5(_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0x9c)[0x7ff35d89eddc]
    /usr/lib/libQt5Widgets.so.5(_ZN12QApplication6notifyEP7QObjectP6QEvent+0x257)[0x7ff35d8a67b7]
    /usr/lib/libQt5Core.so.5(_ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent+0x108)[0x7ff35cb4a148]
    /usr/lib/libQt5Core.so.5(_ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData+0x2db)[0x7ff35cb4c92b]
    /usr/lib/libQt5Core.so.5(+0x2d7a93)[0x7ff35cba0a93]
    /usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x2a7)[0x7ff35a226dc7]
    /usr/lib/libglib-2.0.so.0(+0x4a020)[0x7ff35a227020]
    /usr/lib/libglib-2.0.so.0(g_main_context_iteration+0x2c)[0x7ff35a2270cc]
    /usr/lib/libQt5Core.so.5(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x5f)[0x7ff35cba009f]
    /usr/lib/libQt5Core.so.5(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0xfa)[0x7ff35cb485da]
    /usr/lib/libQt5Core.so.5(_ZN16QCoreApplication4execEv+0x94)[0x7ff35cb513a4]
    /home/root/examples/opengl/threadedqopenglwidget/threadedqopenglwidget[0x405faa]
    /usr/lib/libc.so.6(__libc_start_main+0xf0)[0x7ff35bcaf610]
    /home/root/examples/opengl/threadedqopenglwidget/threadedqopenglwidget[0x4062d9]
    
    Aborted (core dumped)
    
    real	0m42.390s
    user	0m3.824s
    sys	0m2.787s
    
    uname -a
    Linux screenboard 4.1.8 #1 SMP PREEMPT RT Tue Apr 24 16:24:12 UTC 2018 x86_64 GNU/Linux
    
    (gdb) backtrace
    #0  0x00007f5c7e9b9fb3 in _int_malloc () from /usr/lib/libc.so.6
    #1  0x00007f5c7e9bbeca in calloc () from /usr/lib/libc.so.6
    #2  0x00007f5c716c54c7 in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so
    #3  0x00007f5c7165afdb in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so
    #4  0x00007f5c71977153 in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so
    #5  0x00007f5c7190bc5b in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so
    #6  0x00007f5c719da73b in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so
    #7  0x00007f5c7e4d0e08 in ?? () from /usr/lib/libGL.so.1
    #8  0x00007f5c727c78e2 in ?? () from /usr/lib/qt/plugins/xcbglintegrations/libqxcb-glx-integration.so
    #9  0x00007f5c7fdc5e8d in QOpenGLContext::swapBuffers(QSurface*) () from /usr/lib/libQt5Gui.so.5
    #10 0x00007f5c80031fc6 in QPlatformBackingStore::composeAndFlush(QWindow*, QRegion const&, QPoint const&, QPlatformTextureList*, QOpenGLContext*, bool) () from /usr/lib/libQt5Gui.so.5
    #11 0x00007f5c76371487 in ?? () from /usr/lib/libQt5XcbQpa.so.5
    #12 0x00007f5c8055c93a in ?? () from /usr/lib/libQt5Widgets.so.5
    #13 0x00007f5c8055e089 in ?? () from /usr/lib/libQt5Widgets.so.5
    #14 0x00007f5c8055f5b2 in ?? () from /usr/lib/libQt5Widgets.so.5
    #15 0x00007f5c8055ff08 in ?? () from /usr/lib/libQt5Widgets.so.5
    #16 0x00007f5c805770ff in QWidgetPrivate::syncBackingStore() () from /usr/lib/libQt5Widgets.so.5
    #17 0x00007f5c8058f028 in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
    #18 0x00007f5c8054fddc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
    #19 0x00007f5c805577b7 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
    #20 0x00007f5c7f7fb148 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
    #21 0x00007f5c7f7fd92b in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQt5Core.so.5
    #22 0x00007f5c7f851a93 in ?? () from /usr/lib/libQt5Core.so.5
    #23 0x00007f5c7ced7dc7 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
    #24 0x00007f5c7ced8020 in ?? () from /usr/lib/libglib-2.0.so.0
    #25 0x00007f5c7ced80cc in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
    #26 0x00007f5c7f85109f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
    #27 0x00007f5c7f7f95da in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
    #28 0x00007f5c7f8023a4 in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
    #29 0x0000000000405faa in main ()
    
    ldd threadedqopenglwidget
       linux-vdso.so.1 (0x00007fff837fb000)
       libQt5Widgets.so.5 => /usr/lib/libQt5Widgets.so.5 (0x00007f72249dc000)
       libQt5Gui.so.5 => /usr/lib/libQt5Gui.so.5 (0x00007f722423b000)
       libQt5Core.so.5 => /usr/lib/libQt5Core.so.5 (0x00007f7223b5a000)
       libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f72237d8000)
       libm.so.6 => /usr/lib/libm.so.6 (0x00007f72234da000)
       libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f72232c4000)
       libc.so.6 => /usr/lib/libc.so.6 (0x00007f7222f20000)
       libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f7222d03000)
       libGL.so.1 => /usr/lib/libGL.so.1 (0x00007f7222a6b000)
       libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007f7222836000)
       libz.so.1 => /usr/lib/libz.so.1 (0x00007f7222620000)
       libsystemd.so.0 => /usr/lib/libsystemd.so.0 (0x00007f72253b4000)
       libicui18n.so.58 => /usr/lib/libicui18n.so.58 (0x00007f72221a6000)
       libicuuc.so.58 => /usr/lib/libicuuc.so.58 (0x00007f7221dfa000)
       libpcre2-16.so.0 => /usr/lib/libpcre2-16.so.0 (0x00007f7221b90000)
       libdouble-conversion.so.1 => /usr/lib/libdouble-conversion.so.1 (0x00007f7221980000)
       libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f722177c000)
       libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f722146e000)
       /lib64/ld-linux-x86-64.so.2 (0x00007f7225233000)
       libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f7221244000)
       libglapi.so.0 => /usr/lib/libglapi.so.0 (0x00007f7221016000)
       libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f7220e04000)
       libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x00007f7220c01000)
       libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007f72209fb000)
       libX11-xcb.so.1 => /usr/lib/libX11-xcb.so.1 (0x00007f72207f9000)
       libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f72204b7000)
       libxcb-glx.so.0 => /usr/lib/libxcb-glx.so.0 (0x00007f722029d000)
       libxcb-dri2.so.0 => /usr/lib/libxcb-dri2.so.0 (0x00007f7220098000)
       libxcb-dri3.so.0 => /usr/lib/libxcb-dri3.so.0 (0x00007f721fe95000)
       libxcb-present.so.0 => /usr/lib/libxcb-present.so.0 (0x00007f721fc92000)
       libxcb-randr.so.0 => /usr/lib/libxcb-randr.so.0 (0x00007f721fa84000)
       libxcb-xfixes.so.0 => /usr/lib/libxcb-xfixes.so.0 (0x00007f721f87c000)
       libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0x00007f721f672000)
       libxcb-shape.so.0 => /usr/lib/libxcb-shape.so.0 (0x00007f721f46e000)
       libxcb-sync.so.1 => /usr/lib/libxcb-sync.so.1 (0x00007f721f267000)
       libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f721f044000)
       libxshmfence.so.1 => /usr/lib/libxshmfence.so.1 (0x00007f721ee41000)
       libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0x00007f721ec3b000)
       libdrm.so.2 => /usr/lib/libdrm.so.2 (0x00007f721ea2c000)
       librt.so.1 => /usr/lib/librt.so.1 (0x00007f721e824000)
       libresolv.so.2 => /usr/lib/libresolv.so.2 (0x00007f721e60d000)
       liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f721e3e7000)
       liblz4.so.1 => /usr/lib/liblz4.so.1 (0x00007f721e1d5000)
       libgcrypt.so.20 => /usr/lib/libgcrypt.so.20 (0x00007f721def3000)
       libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0x00007f721dce0000)
       libcap.so.2 => /usr/lib/libcap.so.2 (0x00007f721dadc000)
       libicudata.so.58 => /usr/lib/libicudata.so.58 (0x00007f721bfdc000)
       libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007f721bd6c000)
       libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f721bb68000)
       libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f721b962000)
       libattr.so.1 => /usr/lib/libattr.so.1 (0x00007f721b75d000)
    

  • Lifetime Qt Champion

    Hi,

    From the looks of it, it's pretty fine. Check that your drivers are up to date compared to the one with the more recent packages.



  • thank you.

    i updated mesa from version 11.0.3 to 11.1.0, and it looks like this issue is resolved.


Log in to reply