Qt 6.2.4 cross-compiled app hangs in ppoll
-
Hello
I'm having troubles getting Qt 6.2.4 running when cross-compiling with mingw64 from Ubuntu 20.04. For some reason my app keeps hanging after starting the event loop.
#include <QApplication> #include <QLabel> int main(int argc, char* argv[]) { QApplication a(argc, argv); QLabel* label = new QLabel{"Some test"}; label->show(); return a.exec(); }
I can keep the app running with GDB and when I hit pause after some time it's always inside a function called
ppoll
in thepoll2.h
header.__fortify_function int ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout, const __sigset_t *__ss) { if (__bos (__fds) != (__SIZE_TYPE__) -1) { if (! __builtin_constant_p (__nfds)) return __ppoll_chk (__fds, __nfds, __timeout, __ss, __bos (__fds)); else if (__bos (__fds) / sizeof (*__fds) < __nfds) return __ppoll_chk_warn (__fds, __nfds, __timeout, __ss, __bos (__fds)); } // <<< Hangs here >>> return __ppoll_alias (__fds, __nfds, __timeout, __ss); }
Here is the call-stack of the thread of my application
libc.so.6!__libc_disable_asynccancel() (/build/glibc-wuryBv/glibc-2.31/sysdeps/unix/sysv/linux/x86_64/cancellation.S:87) libc.so.6!__ppoll(struct pollfd * fds, nfds_t nfds, const struct timespec * timeout, const sigset_t * sigmask) (/build/glibc-wuryBv/glibc-2.31/sysdeps/unix/sysv/linux/ppoll.c:44) libQt6Core.so.6!ppoll(const __sigset_t * __ss, const timespec * __timeout, nfds_t __nfds, pollfd * __fds) (/usr/include/x86_64-linux-gnu/bits/poll2.h:77) libQt6Core.so.6!qt_ppoll(const timespec * timeout_ts, nfds_t nfds, pollfd * fds) (/home/vinci/Downloads/QtPlayground/build/_deps/qt6-src/qtbase/src/corelib/kernel/qcore_unix.cpp:132) libQt6Core.so.6!qt_safe_poll(pollfd * fds, nfds_t nfds, const timespec * timeout_ts) (/home/vinci/Downloads/QtPlayground/build/_deps/qt6-src/qtbase/src/corelib/kernel/qcore_unix.cpp:155) libQt6Core.so.6!QEventDispatcherUNIX::processEvents(QEventDispatcherUNIX * const this, QEventLoop::ProcessEventsFlags flags) (/home/vinci/Downloads/QtPlayground/build/_deps/qt6-src/qtbase/src/corelib/tools/qarraydatapointer.h:140) libQt6XcbQpa.so.6!QXcbUnixEventDispatcher::processEvents(QXcbUnixEventDispatcher * const this, QEventLoop::ProcessEventsFlags flags) (/home/vinci/Downloads/QtPlayground/build/_deps/qt6-src/qtbase/src/plugins/platforms/xcb/qxcbeventdispatcher.cpp:60) libQt6Core.so.6!QEventLoop::processEvents(QEventLoop * const this, QEventLoop::ProcessEventsFlags flags) (/usr/include/c++/9/bits/atomic_base.h:734) libQt6Core.so.6!QEventLoop::exec(QEventLoop * const this, QEventLoop::ProcessEventsFlags flags) (/home/vinci/Downloads/QtPlayground/build/_deps/qt6-src/qtbase/src/corelib/global/qflags.h:110) libQt6Core.so.6!QCoreApplication::exec() (/home/vinci/Downloads/QtPlayground/build/_deps/qt6-src/qtbase/src/corelib/global/qflags.h:109) libQt6Gui.so.6!QGuiApplication::exec() (/home/vinci/Downloads/QtPlayground/build/_deps/qt6-src/qtbase/src/gui/kernel/qguiapplication.cpp:1875) libQt6Widgets.so.6!QApplication::exec() (/home/vinci/Downloads/QtPlayground/build/_deps/qt6-src/qtbase/src/widgets/kernel/qapplication.cpp:2617) main(int argc, char ** argv) (/home/vinci/Downloads/QtPlayground/src/main.cpp:8)
And here the one from the QXcbEventQueue
libc.so.6!__GI___poll(struct pollfd * fds, nfds_t nfds, int timeout) (/build/glibc-wuryBv/glibc-2.31/sysdeps/unix/sysv/linux/poll.c:29) libxcb.so.1![Unknown/Just-In-Time compiled code] (Unknown Source:0) libxcb.so.1!xcb_wait_for_event (Unknown Source:0) libQt6XcbQpa.so.6!QXcbEventQueue::run(QXcbEventQueue * const this) (/home/vinci/Downloads/QtPlayground/build/_deps/qt6-src/qtbase/src/plugins/platforms/xcb/qxcbeventqueue.cpp:228) libQt6Core.so.6!QThreadPrivate::<lambda()>::operator()(const QThreadPrivate::<lambda()> * const __closure) (/home/vinci/Downloads/QtPlayground/build/_deps/qt6-src/qtbase/src/corelib/thread/qthread_unix.cpp:356) libQt6Core.so.6!(anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> >(QThreadPrivate::<lambda()> &&)(QThreadPrivate::<lambda()> && t) (/home/vinci/Downloads/QtPlayground/build/_deps/qt6-src/qtbase/src/corelib/thread/qthread_unix.cpp:292) libQt6Core.so.6!QThreadPrivate::start(void * arg) (/home/vinci/Downloads/QtPlayground/build/_deps/qt6-src/qtbase/src/corelib/thread/qthread_unix.cpp:315) libpthread.so.0!start_thread(void * arg) (/build/glibc-wuryBv/glibc-2.31/nptl/pthread_create.c:477) libc.so.6!clone() (/build/glibc-wuryBv/glibc-2.31/sysdeps/unix/sysv/linux/x86_64/clone.S:95)
Any ideas what might be going on here? Upon request I can also provide further installation details, but I have no clue if these are even of interest at this point?
-