lxqt.qterminal segfaults after qt 5.10.1 update
Issue description
qterminal compiles fine (https://hydra.nixos.org/build/70354017), but segfaults upon start. I've tried to strace for errors, but the trace looks extremely similar right up to the segfault (other than different nix-store paths obviously). It's still broken as below at 48edc140dcf40ba15176b5687827eb29f6dd676d.
Steps to reproduce
For the first failing commit, checkout nixpkgs at 0e086dd1c1f2fcfb35634ef778f692d601722c9a~1 and run nix-env -iA lxqt.qterminal, then it runs with following output:
TRANSLATIONS_DIR: Loading translation file "qterminal_en_US.qm" from dir /nix/store/hx4b58c6z4aqc5lvnrgljv894cfshvc3-qterminal-0.8.0/share/qterminal/translations
load success: false
Properties constructor called
QDir::exists: Empty or null file name
Canot open file "/home/ciil/.config/qterminal.org/qterminal_bookmarks.xml"
Trying to load translation file from dir "/run/opengl-driver/share"
Trying to load translation file from dir "/etc/profiles/per-user/ciil/share"
Trying to load translation file from dir "/home/ciil/.nix-profile/share"
Trying to load translation file from dir "/nix/var/nix/profiles/default/share"
Trying to load translation file from dir "/run/current-system/sw/share"
Trying to load translation file from dir "/nix/store/pc8pfkdbykjmh3pr2js1dfx4bqpc6q19-qtermwidget-0.8.0/share/qtermwidget5/translations"
default KB_LAYOUT_DIR: "/nix/store/pc8pfkdbykjmh3pr2js1dfx4bqpc6q19-qtermwidget-0.8.0/share/qtermwidget5/kb-layouts"
loadAllColorSchemes
Shell program: "/run/current-system/sw/bin/zsh"
("/run/current-system/sw/bin/zsh")
QProcess: Destroyed while process ("/run/current-system/sw/bin/zsh") is still running.
Properties destructor called
For the last running configuration, checkout nixpkgs at 0e086dd1c1f2fcfb35634ef778f692d601722c9a and run nix-env -iA lxqt.qterminal, then it fails with the following output:
TRANSLATIONS_DIR: Loading translation file "qterminal_en_US.qm" from dir /nix/store/qdj8gp2nn25qc3p028y9cg5dnz8kqs97-qterminal-0.8.0/share/qterminal/translations
load success: false
Properties constructor called
QDir::exists: Empty or null file name
Canot open file "/home/ciil/.config/qterminal.org/qterminal_bookmarks.xml"
Trying to load translation file from dir "/run/opengl-driver/share"
Trying to load translation file from dir "/etc/profiles/per-user/ciil/share"
Trying to load translation file from dir "/home/ciil/.nix-profile/share"
Trying to load translation file from dir "/nix/var/nix/profiles/default/share"
Trying to load translation file from dir "/run/current-system/sw/share"
Trying to load translation file from dir "/nix/store/gzp48l201nxzkccs51ll40i6azrjjkgg-qtermwidget-0.8.0/share/qtermwidget5/translations"
default KB_LAYOUT_DIR: "/nix/store/gzp48l201nxzkccs51ll40i6azrjjkgg-qtermwidget-0.8.0/share/qtermwidget5/kb-layouts"
loadAllColorSchemes
Shell program: "/run/current-system/sw/bin/zsh"
("/run/current-system/sw/bin/zsh")
zsh: (core dumped) qterminal
Last few lines of the strace:
openat(AT_FDCWD, "/nix/store/nhdz0xslz3p73k467lcakn8xspbg5kwv-libX11-1.6.5/share/X11/locale/locale.alias", O_RDONLY) = 19
fstat(19, {st_mode=S_IFREG|0444, st_size=81707, ...}) = 0
read(19, "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"..., 4096) = 4096
read(19, "_IN.UTF-8\nbo_IN.utf8\t\t\t\t\tbo_IN.U"..., 4096) = 4096
read(19, "ro\t\t\t\t\tde_DE.ISO8859-15\nde_DE.88"..., 4096) = 4096
read(19, "\tes_ES.ISO8859-1\nes.UTF-8\t\t\t\t\tes"..., 4096) = 4096
read(19, "o88591\t\t\t\t\tfi_FI.ISO8859-1\nfi_FI"..., 4096) = 4096
read(19, "F-8\t\t\t\t\the_IL.UTF-8\nhi\t\t\t\t\t\thi_I"..., 4096) = 4096
read(19, "t_LT.ISO8859-13\nlt_LT\t\t\t\t\t\tlt_LT"..., 4096) = 4096
read(19, "DE.iso88591\t\t\t\t\tpd_DE.ISO8859-1\n"..., 4096) = 4096
read(19, "\t\t\tss_ZA.ISO8859-1\nss_ZA.iso8859"..., 4096) = 4096
read(19, ".big5hkscs\nzh_HK.BIG5-HKSCS\t\t\t\tz"..., 4096) = 4096
read(19, "O8859-1\naf_ZA.iso88591:\t\t\t\t\taf_Z"..., 4096) = 4096
read(19, "\tca_ES.ISO8859-1\nca_AD:\t\t\t\t\t\tca_"..., 4096) = 4096
read(19, ".utf8:\t\t\t\t\tde_DE.UTF-8\nde_LU:\t\t\t"..., 4096) = 4096
close(19) = 0
openat(AT_FDCWD, "/nix/store/nhdz0xslz3p73k467lcakn8xspbg5kwv-libX11-1.6.5/share/X11/locale/locale.dir", O_RDONLY) = 19
fstat(19, {st_mode=S_IFREG|0444, st_size=37048, ...}) = 0
read(19, "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"..., 4096) = 4096
read(19, "C_LOCALE\t\t\tes_NI.ISO8859-1\niso88"..., 4096) = 4096
read(19, "OCALE\t\t\tph_PH.ISO8859-1\niso8859-"..., 4096) = 4096
read(19, ".UTF-8\nen_US.UTF-8/XLC_LOCALE\t\t\t"..., 4096) = 4096
read(19, "\t\tpt_PT.UTF-8\nen_US.UTF-8/XLC_LO"..., 4096) = 4096
read(19, "SO8859-1\niso8859-15/XLC_LOCALE:\t"..., 4096) = 4096
read(19, "/XLC_LOCALE:\t\t\thu_HU.ISO8859-2\na"..., 4096) = 4096
read(19, "55\nzh_CN/XLC_LOCALE:\t\t\tzh_CN.euc"..., 4096) = 4096
close(19) = 0
access("/nix/store/nhdz0xslz3p73k467lcakn8xspbg5kwv-libX11-1.6.5/share/X11/locale/en_US.UTF-8/XLC_LOCALE", R_OK) = 0
openat(AT_FDCWD, "/nix/store/nhdz0xslz3p73k467lcakn8xspbg5kwv-libX11-1.6.5/share/X11/locale/en_US.UTF-8/XLC_LOCALE", O_RDONLY) = 19
fstat(19, {st_mode=S_IFREG|0444, st_size=4255, ...}) = 0
read(19, "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"..., 4096) = 4096
read(19, "GR\n}\n \n#\tcs20 class\ncs15\t{\n\tside"..., 4096) = 159
read(19, "", 4096) = 0
close(19) = 0
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="\22\0\17\0\5\0\200\3#\0\0\0#\0\0\0 \0\0\0\t\0\0\0\3\0\0\0\1\0\0\0"..., iov_len=96}], 1) = 96
futex(0x1ca1498, FUTEX_WAKE_PRIVATE, 1) = 1
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="\22\0\6\0\5\0\200\3'\0\0\0\37\0\0\0\10\21\34\0\0\0\0\0+\1\1\0", iov_len=28}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 28
futex(0x1ca14e8, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x1ca1498, FUTEX_WAKE_PRIVATE, 1) = 1
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x1} ---
+++ killed by SIGSEGV (core dumped) +++
zsh: strace qterminal
Technical details
- system:
"x86_64-linux" - host os:
Linux 4.15.5, NixOS, 18.03.git.8ebb99c (Impala) - multi-user?:
yes - sandbox:
yes - version:
nix-env (Nix) 1.11.16 - channels(ciil):
"" - channels(root):
"" - nixpkgs:
/home/ciil/vcs/nixpkgs
I can reproduce this. Here's the stack trace, FWIW:
Thread 1 "qterminal" received signal SIGSEGV, Segmentation fault.
0x00007fffe646c5e6 in QXcbWindow::mapToGlobal(QPoint const&) const ()
from /nix/store/31znblrlffsi4xrybpqlf426y6xfc7lx-qtbase-5.10.0-bin/lib/qt-5.10/plugins/platforms/../../../../../fyc641sfdmcvaj1kq6ng3flzxrh9ilfd-qtbase-5.10.0/lib/libQt5XcbQpa.so.5
(gdb) bt
#0 0x00007fffe646c5e6 in QXcbWindow::mapToGlobal(QPoint const&) const ()
from /nix/store/31znblrlffsi4xrybpqlf426y6xfc7lx-qtbase-5.10.0-bin/lib/qt-5.10/plugins/platforms/../../../../../fyc641sfdmcvaj1kq6ng3flzxrh9ilfd-qtbase-5.10.0/lib/libQt5XcbQpa.so.5
#1 0x00007ffff63731e2 in QWindow::flags() const ()
from /nix/store/bda68cmsaz7r8xfii8jsf2b0x3bpb3bj-qtbase-5.10.1/lib/libQt5Gui.so.5
#2 0x00007ffff6adeb33 in QWidgetPrivate::create_sys(unsigned long long, bool, bool) ()
from /nix/store/bda68cmsaz7r8xfii8jsf2b0x3bpb3bj-qtbase-5.10.1/lib/libQt5Widgets.so.5
#3 0x00007ffff6adf1ad in QWidget::create(unsigned long long, bool, bool) ()
from /nix/store/bda68cmsaz7r8xfii8jsf2b0x3bpb3bj-qtbase-5.10.1/lib/libQt5Widgets.so.5
#4 0x00007ffff6aebfc6 in QWidget::setVisible(bool) ()
from /nix/store/bda68cmsaz7r8xfii8jsf2b0x3bpb3bj-qtbase-5.10.1/lib/libQt5Widgets.so.5
#5 0x0000000000434b47 in QTerminalApp::newWindow(bool, TerminalConfig&) [clone .constprop.21] ()
#6 0x000000000041612b in main ()
(gdb)
Actually that backtrace looks familiar!
It appears to be the same as the one causing VirtualBox to crash (#36127):
Thread 1 "VirtualBox" received signal SIGSEGV, Segmentation fault.
0x00007f1a07a415e6 in QXcbWindow::mapToGlobal(QPoint const&) const ()
from /nix/store/31znblrlffsi4xrybpqlf426y6xfc7lx-qtbase-5.10.0-bin/lib/qt-5.10/plugins/platforms/../../../../../fyc641sfdmcvaj1kq6ng3flzxrh9ilfd-qtbase-5.10.0/lib/libQt5XcbQpa.so.5
(gdb) bt
#0 0x00007f1a07a415e6 in QXcbWindow::mapToGlobal(QPoint const&) const ()
from /nix/store/31znblrlffsi4xrybpqlf426y6xfc7lx-qtbase-5.10.0-bin/lib/qt-5.10/plugins/platforms/../../../../../fyc641sfdmcvaj1kq6ng3flzxrh9ilfd-qtbase-5.10.0/lib/libQt5XcbQpa.so.5
#1 0x00007f1a0e8f11e2 in QWindow::flags() const () from /nix/store/bda68cmsaz7r8xfii8jsf2b0x3bpb3bj-qtbase-5.10.1/lib/libQt5Gui.so.5
#2 0x00007f1a0e124b33 in QWidgetPrivate::create_sys(unsigned long long, bool, bool) () from /nix/store/bda68cmsaz7r8xfii8jsf2b0x3bpb3bj-qtbase-5.10.1/lib/libQt5Widgets.so.5
#3 0x00007f1a0e1251ad in QWidget::create(unsigned long long, bool, bool) () from /nix/store/bda68cmsaz7r8xfii8jsf2b0x3bpb3bj-qtbase-5.10.1/lib/libQt5Widgets.so.5
#4 0x00007f1a0e1342e9 in QWidgetPrivate::init(QWidget*, QFlags<Qt::WindowType>) () from /nix/store/bda68cmsaz7r8xfii8jsf2b0x3bpb3bj-qtbase-5.10.1/lib/libQt5Widgets.so.5
#5 0x00007f1a0e149f43 in QDesktopWidget::QDesktopWidget() () from /nix/store/bda68cmsaz7r8xfii8jsf2b0x3bpb3bj-qtbase-5.10.1/lib/libQt5Widgets.so.5
#6 0x00007f1a0e0f386d in QApplication::desktop() () from /nix/store/bda68cmsaz7r8xfii8jsf2b0x3bpb3bj-qtbase-5.10.1/lib/libQt5Widgets.so.5
#7 0x00007f1a14934515 in UIDesktopWidgetWatchdog::updateHostScreenConfiguration(int) () from /nix/store/qn5w00ndzs12rc8gc9b6x75jih5p739x-virtualbox-5.2.8/libexec/virtualbox/VirtualBox.so
#8 0x00007f1a14934aef in UIDesktopWidgetWatchdog::prepare() () from /nix/store/qn5w00ndzs12rc8gc9b6x75jih5p739x-virtualbox-5.2.8/libexec/virtualbox/VirtualBox.so
#9 0x00007f1a1496f708 in VBoxGlobal::prepare() () from /nix/store/qn5w00ndzs12rc8gc9b6x75jih5p739x-virtualbox-5.2.8/libexec/virtualbox/VirtualBox.so
#10 0x00007f1a148e2dbb in TrustedMain () from /nix/store/qn5w00ndzs12rc8gc9b6x75jih5p739x-virtualbox-5.2.8/libexec/virtualbox/VirtualBox.so
#11 0x00007f1a2049b020 in __libc_start_main () from /nix/store/8229pink3d3h5zgb994gp5bkj4fyaz85-glibc-multi-2.26-131/lib/libc.so.6
#12 0x000000000040156a in _start ()
(gdb)
After purging my profile-installed apps using older versions of Qt, I can no longer reproduce.
Closing as this looks like same thing I opened the other issue about :). Reopen if the problem is not due to conflicting qt versions.
You're correct, after doing the usual qt purge actions, it worked again. I thought for sure the issue was different, because usually you get that "Qt fatal: cannot mix incompatible version" error, but turns out it was that one again.
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/please-fix-all-packages-which-were-broken-by-the-qt-wrapping-changes/6444/22