FS#57163 - Qt Creator crashes in Glib 2.0 event loop handler on a KDE system

Attached to Project: Arch Linux
Opened by Ruben Van Boxem (rubenvb) - Friday, 19 January 2018, 19:54 GMT
Last edited by Antonio Rojas (arojas) - Sunday, 21 January 2018, 19:05 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
QtCreator 4.5.0-2 crashes when trying to open the help tab.

Additional info:
* qtcreator-4.5.0-2
* qt5-doc-5.10....
* backtrace:
#0 0x00007ffff23949b2 in ?? () from /usr/lib/libglib-2.0.so.0
#1 0x00007ffff2395a5d in g_log_default_handler () from /usr/lib/libglib-2.0.so.0
#2 0x00007ffff2395cff in g_logv () from /usr/lib/libglib-2.0.so.0
#3 0x00007ffff2395e80 in g_log () from /usr/lib/libglib-2.0.so.0
#4 0x00007ffff23d4753 in ?? () from /usr/lib/libglib-2.0.so.0
#5 0x00007ffff238c5c0 in g_main_context_new () from /usr/lib/libglib-2.0.so.0
#6 0x00007ffff600a4ec in QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(_GMainContext*) ()
from /usr/lib/libQt5Core.so.5
#7 0x00007ffff600a5c3 in QEventDispatcherGlib::QEventDispatcherGlib(QObject*) ()
from /usr/lib/libQt5Core.so.5
#8 0x00007ffff5dbfb0b in ?? () from /usr/lib/libQt5Core.so.5
#9 0x00007ffff5dc0b80 in ?? () from /usr/lib/libQt5Core.so.5
#10 0x00007ffff5afa08c in start_thread () from /usr/lib/libpthread.so.0
#11 0x00007ffff5293e1f in clone () from /usr/lib/libc.so.6

It seems to me it shouldn't be using the Glib implementation: I'm running KDE plasma...
Unfortunately, I can't uninstall glib2 as it has too many dependent packages.
I also tried rolling back packages qt5-{base,webengine} and glib2 to previous -x releases (the only ones on my system) to no avail.

Steps to reproduce:
Open Qt Creator and select the "Help" tab/button in the lefthand pane.
This task depends upon

Closed by  Antonio Rojas (arojas)
Sunday, 21 January 2018, 19:05 GMT
Reason for closing:  Not a bug
Comment by Antonio Rojas (arojas) - Friday, 19 January 2018, 23:32 GMT
How did you get that backtrace? It's crashing in libQt5WebEngineCore.so here.

EDIT: Nevermind, was a bad qt5-webengine package. Can't reproduce this crash.
Comment by Ruben Van Boxem (rubenvb) - Saturday, 20 January 2018, 12:59 GMT
I got the backtrace by doing `gdb /bin/qtcreator`, waiting for it to start up, clicking the "help" tab on the lefthand side, after which it crashes, and then I asked gdb for a `bt`.

It seems like this issue might be related to all of the recent (seemingly) glib2 related problems (I'm guessing due to the webengine used in the help panel being based on chromium which uses glib2?):
https://bbs.archlinux.org/viewtopic.php?id=233608
https://bbs.archlinux.org/viewtopic.php?id=233707
https://bbs.archlinux.org/viewtopic.php?id=233541

Although the suggested downgrade to glib2-2.54.2-2 does not change anything for me. Is there any cache or settings directory I could try removing to see if it changes anything?

I also tried the official Qt Creator 4.5 package downloaded from the Qt website with the same result...

THe backtrace for thread 1 (the previously reported one was thread 7) is:
#0 0x00007ffff4851e11 in clone () from /usr/lib/libc.so.6
#1 0x00007ffff5402de3 in create_thread () from /usr/lib/libpthread.so.0
#2 0x00007ffff5404803 in pthread_create@@GLIBC_2.2.5 () from /usr/lib/libpthread.so.0
#3 0x00007ffff5951b76 in QThread::start(QThread::Priority) ()
from /home/ruben/qtcreator-4.5.0/bin/../lib/Qt/lib/libQt5Core.so.5
#4 0x00007fffe38f9806 in ?? ()
from /home/ruben/qtcreator-4.5.0/lib/qtcreator/plugins/../../Qt/lib/libQt5Help.so.5
#5 0x00007fffe38f9849 in QHelpIndexModel::createIndex(QString const&) ()
from /home/ruben/qtcreator-4.5.0/lib/qtcreator/plugins/../../Qt/lib/libQt5Help.so.5
#6 0x00007ffff5b4fef6 in QMetaObject::activate(QObject*, int, int, void**) ()
from /home/ruben/qtcreator-4.5.0/bin/../lib/Qt/lib/libQt5Core.so.5
#7 0x00007fffe38eaf2d in ?? ()
from /home/ruben/qtcreator-4.5.0/lib/qtcreator/plugins/../../Qt/lib/libQt5Help.so.5
#8 0x00007fffde3b839c in ?? () from /home/ruben/qtcreator-4.5.0/lib/qtcreator/plugins/libHelp.so
#9 0x00007fffde3bcb3e in ?? () from /home/ruben/qtcreator-4.5.0/lib/qtcreator/plugins/libHelp.so
#10 0x00007ffff5b4fef6 in QMetaObject::activate(QObject*, int, int, void**) ()
from /home/ruben/qtcreator-4.5.0/bin/../lib/Qt/lib/libQt5Core.so.5
#11 0x00007fffe3fd681b in Core::ModeManager::currentModeChanged(Core::Id, Core::Id) ()
from /home/ruben/qtcreator-4.5.0/lib/qtcreator/plugins/libCore.so
#12 0x00007fffe3ede58b in Core::ModeManager::currentTabChanged(int) ()
from /home/ruben/qtcreator-4.5.0/lib/qtcreator/plugins/libCore.so
#13 0x00007ffff5b4fef6 in QMetaObject::activate(QObject*, int, int, void**) ()

I'm guessing this one started thread 7 which runs some glib2-related code.
Comment by Antonio Rojas (arojas) - Saturday, 20 January 2018, 13:22 GMT
Try QT_NO_GLIB=1. If it's reproducible with the upstream binary then it's unrelated to chromium, since the upstream binary doesn't use qtwebengine.
Comment by Ruben Van Boxem (rubenvb) - Saturday, 20 January 2018, 13:53 GMT
Without QT_NO_GLIB=1, qtcreator outputs the following before breaking/aborting:
(process:1515): GLib-ERROR **: Creating pipes for GWakeup: Too many open files
With QT_NO_GLIB=1, it outputs the equivalent:
QThreadPipe: Unable to create pipe: Too many open files

The full journalctl output is:
Jan 20 14:45:22 arch-vaio systemd-coredump[1721]: Process 1693 (qtcreator) of user 1000 dumped core.

Stack trace of thread 1719:
#0 0x00007f1da499a860 raise (libc.so.6)
#1 0x00007f1da499bec9 abort (libc.so.6)
#2 0x00007f1da55728c8 _ZNK14QMessageLogger5fatalEPKcz (libQ
#3 0x00007f1da57ce1b8 _ZN27QEventDispatcherUNIXPrivateC1Ev
#4 0x00007f1da57ce321 _ZN20QEventDispatcherUNIXC1EP7QObject
#5 0x00007f1da5587ac4 n/a (libQt5Core.so.5)
#6 0x00007f1da5588b80 n/a (libQt5Core.so.5)
#7 0x00007f1da52c208c start_thread (libpthread.so.0)
#8 0x00007f1da4a5be1f __clone (libc.so.6)

Stack trace of thread 1694:
#0 0x00007f1da4a5191b __poll (libc.so.6)
#1 0x00007f1d9e2488e0 n/a (libxcb.so.1)
#2 0x00007f1d9e24a679 xcb_wait_for_event (libxcb.so.1)
#3 0x00007f1d9d4e27aa n/a (libQt5XcbQpa.so.5)
#4 0x00007f1da5588b2d n/a (libQt5Core.so.5)
#5 0x00007f1da52c208c start_thread (libpthread.so.0)
#6 0x00007f1da4a5be1f __clone (libc.so.6)

Stack trace of thread 1693:
#0 0x00007f1d69843cb5 sqlite3BtreeMovetoUnpacked (libsqlite
#1 0x00007f1d698ce98d sqlite3VdbeExec (libsqlite3.so.0)
#2 0x00007f1d698d53a0 sqlite3_step (libsqlite3.so.0)
#3 0x00007f1d69b31a2e n/a (libqsqlite.so)
#4 0x00007f1d69b32c13 n/a (libqsqlite.so)
#5 0x00007f1d87057878 _ZN9QSqlQuery4execEv (libQt5Sql.so.5)
#6 0x00007f1d872d2ea6 n/a (libQt5Help.so.5)
#7 0x00007f1d872a9fec _ZNK15QHelpEngineCore16filterAttribut
#8 0x00007f1d872b9666 n/a (libQt5Help.so.5)
#9 0x00007f1d872b971a _ZN15QHelpIndexModel11createIndexERK7
#10 0x00007f1da57a600f _ZN11QMetaObject8activateEP7QObjectii
#11 0x00007f1d872a9708 n/a (libQt5Help.so.5)
#12 0x00007f1d7dd57dfd n/a (libHelp.so)
#13 0x00007f1d7dd5ca7c n/a (libHelp.so)
#14 0x00007f1da57a600f _ZN11QMetaObject8activateEP7QObjectii
#15 0x00007f1d879359bf _ZN4Core11ModeManager18currentModeCha
#16 0x00007f1d87835121 _ZN4Core11ModeManager17currentTabChan
#17 0x00007f1da57a600f _ZN11QMetaObject8activateEP7QObjectii
#18 0x00007f1d8792caa2 n/a (libCore.so)
#19 0x00007f1da57a600f _ZN11QMetaObject8activateEP7QObjectii
#20 0x00007f1d8792c96f n/a (libCore.so)
#21 0x00007f1da57b2ee4 n/a (libQt5Core.so.5)
#22 0x00007f1da57a68eb _ZN7QObject5eventEP6QEvent (libQt5Cor
#23 0x00007f1da687ae3c _ZN19QApplicationPrivate13notify_help
#24 0x00007f1da6882816 _ZN12QApplication6notifyEP7QObjectP6Q
#25 0x00007f1da57756c0 _ZN16QCoreApplication15notifyInternal
#26 0x00007f1da57d0fb8 _ZN14QTimerInfoList14activateTimersEv
#27 0x00007f1da57cf0f4 _ZN20QEventDispatcherUNIX13processEve
#28 0x00007f1d9d56a58e n/a (libQt5XcbQpa.so.5)
#29 0x00007f1da5773d0b _ZN10QEventLoop4execE6QFlagsINS_17Pro
#30 0x00007f1da577cff8 _ZN16QCoreApplication4execEv (libQt5C
#31 0x0000559bedb80088 n/a (qtcreator)
#32 0x00007f1da4986f4a __libc_start_main (libc.so.6)
#33 0x0000559bedb807fa n/a (qtcreator)

Stack trace of thread 1704:
#0 0x00007f1da4a51a16 ppoll (libc.so.6)
#1 0x00007f1da57cd6f3 _Z12qt_safe_pollP6pollfdmPK8timespec
#2 0x00007f1da57cee8f _ZN20QEventDispatcherUNIX13processEve
#3 0x00007f1da5773d0b _ZN10QEventLoop4execE6QFlagsINS_17Pro
#4 0x00007f1da558378e _ZN7QThread4execEv (libQt5Core.so.5)
#5 0x00007f1da5588b2d n/a (libQt5Core.so.5)
#6 0x00007f1da52c208c start_thread (libpthread.so.0)
#7 0x00007f1da4a5be1f __clone (libc.so.6)

Stack trace of thread 1695:
#0 0x00007f1da4a51a16 ppoll (libc.so.6)
#1 0x00007f1da57cd6f3 _Z12qt_safe_pollP6pollfdmPK8timespec
#2 0x00007f1da57cee8f _ZN20QEventDispatcherUNIX13processEve
#3 0x00007f1da5773d0b _ZN10QEventLoop4execE6QFlagsINS_17Pro
#4 0x00007f1da558378e _ZN7QThread4execEv (libQt5Core.so.5)
#5 0x00007f1d9cfea416 n/a (libQt5DBus.so.5)
#6 0x00007f1da5588b2d n/a (libQt5Core.so.5)
#7 0x00007f1da52c208c start_thread (libpthread.so.0)
#8 0x00007f1da4a5be1f __clone (libc.so.6)

I uploaded a core dump here: https://www.dropbox.com/s/1xe0mwdi2p0r3jq/core.qtcreator.1000.c9452dd136164984a911e99f7a24048e.1693.1516455921000000.lz4?dl=0
Comment by Antonio Rojas (arojas) - Saturday, 20 January 2018, 20:47 GMT
Does the solution posted in https://bugreports.qt.io/browse/QTCREATORBUG-14165 work for you?
Comment by Ruben Van Boxem (rubenvb) - Sunday, 21 January 2018, 19:03 GMT
Yes, deleting ~/.config/QtProject/qtcreator/helpcollection.qhc solved it for me. First time I ran into this problem. Thanks for chasing this down.

Loading...