FS#51285 - [qt5-base] segfault at exit of any PyQt5 application
Attached to Project:
Arch Linux
Opened by Antony Lee (anntzer) - Saturday, 08 October 2016, 04:55 GMT
Last edited by Antonio Rojas (arojas) - Thursday, 02 February 2017, 17:54 GMT
Opened by Antony Lee (anntzer) - Saturday, 08 October 2016, 04:55 GMT
Last edited by Antonio Rojas (arojas) - Thursday, 02 February 2017, 17:54 GMT
|
Details
Description:
Any PyQt5 application segfaults at exit. See below for steps for reproducing. Additional info: * qt5-base 5.7.0-3, python-pyqt5 5.7-2. * The segfault does NOT occur with the debug build of qt5-base provided at https://wiki.archlinux.org/index.php/Unofficial_user_repositories#qt-debug. Steps to reproduce: $ python -c 'from PyQt5.QtWidgets import *; app = QApplication([]); win = QMainWindow(); win.show()' QSettings::value: Empty key passed QSettings::value: Empty key passed [1] 18384 segmentation fault (core dumped) python -c Alternatively, add 'app.exec_()' at the end of the command; the segfault occurs when the user closes the window that appears. The gdb backtrace is (gdb) run -c 'from PyQt5.QtWidgets import *; app = QApplication([]); win = QMainWindow(); win.show()' Starting program: /usr/bin/python -c 'from PyQt5.QtWidgets import *; app = QApplication([]); win = QMainWindow(); win.show()' [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". [New Thread 0x7fffe999d700 (LWP 18452)] QSettings::value: Empty key passed [New Thread 0x7fffdbe98700 (LWP 18453)] QSettings::value: Empty key passed Thread 3 "QDBusConnection" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffdbe98700 (LWP 18453)] 0x00007ffff4cf59cf in QObject::disconnect(QObject const*, char const*, QObject const*, char const*) () from /usr/lib/libQt5Core.so.5 (gdb) bt #0 0x00007ffff4cf59cf in QObject::disconnect(QObject const*, char const*, QObject const*, char const*) () from /usr/lib/libQt5Core.so.5 #1 0x00007fffea022530 in ?? () from /usr/lib/libQt5DBus.so.5 #2 0x00007fffea00ef62 in ?? () from /usr/lib/libQt5DBus.so.5 #3 0x00007ffff4aebd78 in ?? () from /usr/lib/libQt5Core.so.5 #4 0x00007ffff76f6454 in start_thread () from /usr/lib/libpthread.so.0 #5 0x00007ffff74397df in clone () from /usr/lib/libc.so.6 |
This task depends upon
But that's still under review upstream
Any chance this patch could be applied to the official Arch PKGBUILD as well? In particular I noticed the same error message at the *startup* of autostarted applications (yakuake, rsibreak and kalarm in my case). Thanks!
So it doesn't look safe to me to apply this for now.
The problematic patches are https://codereview.qt-project.org/#/c/157488/ and https://codereview.qt-project.org/#/c/161056/ - they're not applied upstream yet because of "QMutex: destroying locked mutex" warnings nobody could track down so far.
I've been running with that patch without any issues for months now, and so have various other people - I've never seen those warnings, and I've never seen segfaults on exit anymore.
I don't have time to further debug this but it seems threads related and it ends with a segfault.
I've seen another issue with calibre in which it grabs the mouse pointer focus and doesn't release it so I'm forced to change to another tty and then return back to the active desktop tty to release the pointer, the patch doesn't fix this issue which seems limited to qt, it does take a little time to reproduce this bug and I've not seen any error message in the logs (maybe I need to run wayland/xwayland in debug mode).
Anyway, I just thought it would be a good idea to mention this here, I'll also report this to the calibre package maintainer.