Segmentation Fault (SIGSEGV) on all glX* Calls in Xenial with Mesa Drivers
-
Setup is:
- OS: Xenial (Ubuntu 16.04.6) on VMWare (Tried with VirtualBox, too)
- Graphics: Mesa Drivers
- Qt: Tried 5.12.6, 5.13.1 and 5.14.1
Symptoms:
- Source code compiles OK.
- Qt own examples works fine. But again, my source code works fine on all other setups.
- Binary runs on other Ubuntu versions (tried 19.10 & 18.04)
- Binary runs on Xenial (16.04) if installed on host and Nvidia or Intel drivers are present.
- Binary results in segmentation fault if it's defined as QApplication! Fault occurs on glXQueryExtensionStrings in libGL.so.1
(specifically on MenuBar class). Also all other glX* calls result in segmentation fault.- Even tried a simple glX* program from scratch. Until QApplication constructor is not called, everything works fine.
Workaround:
- Problem seemed to be in OpenGL Extensions.
- All Xcb dependencies were reinstalled but to no avail.
- I compiled Qt 5.12 from source and it worked!
- 1 by 1 comparison in libraries with installable version lead me to something weird: if the $QT_HOME/gcc_64/plugins/platformthemes/libqgtk3.so was deleted, everything worked fine!
Reults:
- Firstly I mentioned this problem here hoping that someone might find it useful and wouldn't waste this much time.
- Secondly, I cannot figure out why this would fix the problem! could someone explain how this fixed segmentation fault error?
-
Hi,
What desktop environment are you using ?
Did you check with ldd if all the dependencies for that plugin are properly found ? -
@SGaist Hi,
-
Default Ubuntu 16.4.06 (Xenial) on VMWare Workstation:
- "apt-cache show gnome-shell | grep Version" yields: Version: 3.18.5-0ubuntu0.3
- "unity --version" yields: unity 7.4.5
- "lightdm --version" yields: lightdm 1.18.3
- "Graphics" : SVGA3D; build: RELEASE; LLVM; (Note: I tried this for Oracle VirtualBox, too)
-
ldd on "libqgtk3.so" nothing is suspicious:
linux-vdso.so.1 => (0x00007ffe04b8e000)
libQt5DBus.so.5 => /opt/Qt5.12.6/5.12.6/gcc_64/plugins/platformthemes/./../../lib/libQt5DBus.so.5 (0x00007fa785be2000)
libQt5Gui.so.5 => /opt/Qt5.12.6/5.12.6/gcc_64/plugins/platformthemes/./../../lib/libQt5Gui.so.5 (0x00007fa785395000)
libQt5Core.so.5 => /opt/Qt5.12.6/5.12.6/gcc_64/plugins/platformthemes/./../../lib/libQt5Core.so.5 (0x00007fa784bfa000)
libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007fa784986000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa784769000)
libgtk-3.so.0 => /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 (0x00007fa783e3a000)
libgdk-3.so.0 => /usr/lib/x86_64-linux-gnu/libgdk-3.so.0 (0x00007fa783b5f000)
libatk-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0 (0x00007fa78393a000)
libgio-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007fa7835b2000)
libpangocairo-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007fa7833a5000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x00007fa783183000)
libcairo-gobject.so.2 => /usr/lib/x86_64-linux-gnu/libcairo-gobject.so.2 (0x00007fa782f7a000)
libpango-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007fa782d2e000)
libcairo.so.2 => /usr/lib/x86_64-linux-gnu/libcairo.so.2 (0x00007fa782a1a000)
libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007fa7827c7000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fa7824b6000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007fa7822a4000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fa781f6a000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fa781b87000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa78187e000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fa781666000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa78129c000)
libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007fa781050000)
libz.so.1 => /home/ted/src/grpc/lib/libz.so.1 (0x00007fa780e34000)
libicui18n.so.56 => /opt/Qt5.12.6/5.12.6/gcc_64/plugins/platformthemes/./../../lib/libicui18n.so.56 (0x00007fa78099b000)
libicuuc.so.56 => /opt/Qt5.12.6/5.12.6/gcc_64/plugins/platformthemes/./../../lib/libicuuc.so.56 (0x00007fa7805e3000)
libicudata.so.56 => /opt/Qt5.12.6/5.12.6/gcc_64/plugins/platformthemes/./../../lib/libicudata.so.56 (0x00007fa77ec00000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fa77e9fc000)
libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007fa77e7fa000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa7860c2000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fa77e5d1000)
libxcb-dri3.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0 (0x00007fa77e3ce000)
libxcb-present.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-present.so.0 (0x00007fa77e1cb000)
libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007fa77dfc4000)
libxshmfence.so.1 => /usr/lib/x86_64-linux-gnu/libxshmfence.so.1 (0x00007fa77ddc1000)
libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007fa77db90000)
libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007fa77d98d000)
libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007fa77d787000)
libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007fa77d585000)
libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007fa77d36c000)
libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007fa77d167000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fa77cf45000)
libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007fa77cd3f000)
libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007fa77cb2e000)
libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007fa77c92a000)
libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007fa77c71a000)
libatk-bridge-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0 (0x00007fa77c4eb000)
libepoxy.so.0 => /usr/lib/x86_64-linux-gnu/libepoxy.so.0 (0x00007fa77c1f6000)
libpangoft2-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007fa77bfe0000)
libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007fa77bd9d000)
libXinerama.so.1 => /usr/lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007fa77bb9a000)
libXrandr.so.2 => /usr/lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007fa77b98f000)
libXcursor.so.1 => /usr/lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007fa77b785000)
libXcomposite.so.1 => /usr/lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007fa77b582000)
libxkbcommon.so.0 => /usr/lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007fa77b343000)
libwayland-cursor.so.0 => /usr/lib/x86_64-linux-gnu/libwayland-cursor.so.0 (0x00007fa77b13b000)
libwayland-egl.so.1 => /usr/lib/x86_64-linux-gnu/libwayland-egl.so.1 (0x00007fa77af39000)
libwayland-client.so.0 => /usr/lib/x86_64-linux-gnu/libwayland-client.so.0 (0x00007fa77ad2a000)
libmirclient.so.9 => /usr/lib/x86_64-linux-gnu/libmirclient.so.9 (0x00007fa77aa83000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fa77a87b000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007fa77a659000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fa77a43e000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fa77a194000)
libthai.so.0 => /usr/lib/x86_64-linux-gnu/libthai.so.0 (0x00007fa779f8b000)
libpixman-1.so.0 => /usr/lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007fa779ce3000)
libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007fa779abe000)
libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007fa7798ba000)
libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007fa7796b0000)
libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007fa7794a6000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007fa77929e000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fa77902e000)
libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007fa786224000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fa778e2a000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fa778c24000)
libatspi.so.0 => /usr/lib/x86_64-linux-gnu/libatspi.so.0 (0x00007fa7789f5000)
libharfbuzz.so.0 => /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007fa778797000)
libmircommon.so.7 => /usr/lib/x86_64-linux-gnu/libmircommon.so.7 (0x00007fa778550000)
libmirprotobuf.so.3 => /usr/lib/x86_64-linux-gnu/libmirprotobuf.so.3 (0x00007fa7782de000)
libcapnp-0.5.3.so => /usr/lib/x86_64-linux-gnu/libcapnp-0.5.3.so (0x00007fa778056000)
libmircore.so.1 => /usr/lib/x86_64-linux-gnu/libmircore.so.1 (0x00007fa777e4d000)
libboost_system.so.1.58.0 => /usr/lib/x86_64-linux-gnu/libboost_system.so.1.58.0 (0x00007fa777c49000)
libprotobuf-lite.so.9 => /usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.9 (0x00007fa777a18000)
libdatrie.so.1 => /usr/lib/x86_64-linux-gnu/libdatrie.so.1 (0x00007fa777810000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fa7775ee000)
libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007fa77730d000)
libgraphite2.so.3 => /usr/lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007fa7770e7000)
libboost_filesystem.so.1.58.0 => /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.58.0 (0x00007fa776ecf000)
libkj-0.5.3.so => /usr/lib/x86_64-linux-gnu/libkj-0.5.3.so (0x00007fa776ca6000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007fa776a92000)
-
-
I see zlib which is not the one from your system that gets loaded.
What version of Qt is provided by your distribution ?
-
-
Yes I bolded that one since that was the only thing that differed in my setup but I don't think that's the problem since everything else works with that custom compiled library :?
-
sudo apt policy qt5-default returns this:
Installed: (none)
Candidate: 5.5.1+dfsg-16ubuntu7.7
Version table:
5.5.1+dfsg-16ubuntu7.7 500
-
-
Even if it's old, I would try with this version if Qt to see if you have the same issue going on.