NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.99k stars 14.01k forks source link

VirtualBox: Segmentation fault (core dumped) #77460

Open bbigras opened 4 years ago

bbigras commented 4 years ago

Describe the bug Segmentation fault (core dumped)

Thread 1 ".VirtualBox-wra" received signal SIGSEGV, Segmentation fault.
0x00007ffff56f591c in XInternAtom () from /nix/store/w8an2bl1ahwr3m4csmpsxppf34gi4wv2-libX11-1.6.8/lib/libX11.so.6
(gdb) bt full
#0  0x00007ffff56f591c in XInternAtom () from /nix/store/w8an2bl1ahwr3m4csmpsxppf34gi4wv2-libX11-1.6.8/lib/libX11.so.6
No symbol table info available.
#1  0x00007ffff5f6a0ad in X11IsCompositingManagerRunning() () from /nix/store/r4i857clw44a1i034m0gfxw1mr8lk5j8-virtualbox-6.0.14/libexec/virtualbox/VBoxGlobal.so
No symbol table info available.
#2  0x00007ffff5ddb050 in VBoxGlobal::prepare() () from /nix/store/r4i857clw44a1i034m0gfxw1mr8lk5j8-virtualbox-6.0.14/libexec/virtualbox/VBoxGlobal.so
No symbol table info available.
#3  0x000000000046ddf8 in TrustedMain ()
No symbol table info available.
#4  0x000000000046b88e in main ()
No symbol table info available.

To Reproduce Steps to reproduce the behavior:

  1. try to run VirtualBox

Expected behavior

Screenshots image

Additional context

Metadata

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
timstott commented 4 years ago

I have the same/similar problem when I run VirtualBox from sway:

VirtualBox command output

```sh env | grep QT QTWEBKIT_PLUGIN_PATH=/home/test/.nix-profile/lib/mozilla/plugins/:/etc/profiles/per-user/test/lib/mozilla/plugins/:/nix/var/nix/profiles/default/lib/mozilla/plugins/:/run/current-system/sw/lib/mozilla/plugins/ QT_PLUGIN_PATH=/home/test/.nix-profile/lib/qt4/plugins:/home/test/.nix-profile/lib/kde4/plugins:/etc/profiles/per-user/test/lib/qt4/plugins:/etc/profiles/per-user/test/lib/kde4/plugins:/nix/var/nix/profiles/default/lib/qt4/plugins:/nix/var/nix/profiles/default/lib/kde4/plugins:/run/current-system/sw/lib/qt4/plugins:/run/current-system/sw/lib/kde4/plugins QT_QPA_PLATFORM=wayland QT_WAYLAND_DISABLE_WINDOWDECORATION=1 export QT_DEBUG_PLUGINS=1 VirtualBox Qt WARNING: Found metadata in lib /nix/store/gm06ckw8122mwnpx1i137jvw1g6b9brv-qtwayland-5.12.7-bin/lib/qt-5.12.7/plugins/platforms/libqwayland-egl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland-egl" ] }, "archreq": 0, "className": "QWaylandEglPlatformIntegrationPlugin", "debug": false, "version": 330752 } Qt WARNING: Found metadata in lib /nix/store/gm06ckw8122mwnpx1i137jvw1g6b9brv-qtwayland-5.12.7-bin/lib/qt-5.12.7/plugins/platforms/libqwayland-generic.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland" ] }, "archreq": 0, "className": "QWaylandIntegrationPlugin", "debug": false, "version": 330752 } Qt WARNING: Found metadata in lib /nix/store/gm06ckw8122mwnpx1i137jvw1g6b9brv-qtwayland-5.12.7-bin/lib/qt-5.12.7/plugins/platforms/libqwayland-xcomposite-egl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland-xcomposite-egl" ] }, "archreq": 0, "className": "QWaylandXCompositeEglPlatformIntegrationPlugin", "debug": false, "version": 330752 } Qt WARNING: Found metadata in lib /nix/store/gm06ckw8122mwnpx1i137jvw1g6b9brv-qtwayland-5.12.7-bin/lib/qt-5.12.7/plugins/platforms/libqwayland-xcomposite-glx.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland-xcomposite-glx" ] }, "archreq": 0, "className": "QWaylandXCompositeGlxPlatformIntegrationPlugin", "debug": false, "version": 330752 } Qt WARNING: Found metadata in lib /nix/store/fa75x03020bpqkznsqxrzh65dyhaly77-qtbase-5.12.7-bin/lib/qt-5.12.7/plugins/platforms/libqeglfs.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "eglfs" ] }, "archreq": 0, "className": "QEglFSIntegrationPlugin", "debug": false, "version": 330752 } Qt WARNING: Found metadata in lib /nix/store/fa75x03020bpqkznsqxrzh65dyhaly77-qtbase-5.12.7-bin/lib/qt-5.12.7/plugins/platforms/libqlinuxfb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "linuxfb" ] }, "archreq": 0, "className": "QLinuxFbIntegrationPlugin", "debug": false, "version": 330752 } Qt WARNING: Found metadata in lib /nix/store/fa75x03020bpqkznsqxrzh65dyhaly77-qtbase-5.12.7-bin/lib/qt-5.12.7/plugins/platforms/libqminimal.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "archreq": 0, "className": "QMinimalIntegrationPlugin", "debug": false, "version": 330752 } Qt WARNING: Found metadata in lib /nix/store/fa75x03020bpqkznsqxrzh65dyhaly77-qtbase-5.12.7-bin/lib/qt-5.12.7/plugins/platforms/libqminimalegl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimalegl" ] }, "archreq": 0, "className": "QMinimalEglIntegrationPlugin", "debug": false, "version": 330752 } Qt WARNING: Found metadata in lib /nix/store/fa75x03020bpqkznsqxrzh65dyhaly77-qtbase-5.12.7-bin/lib/qt-5.12.7/plugins/platforms/libqoffscreen.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "archreq": 0, "className": "QOffscreenIntegrationPlugin", "debug": false, "version": 330752 } Qt WARNING: Found metadata in lib /nix/store/fa75x03020bpqkznsqxrzh65dyhaly77-qtbase-5.12.7-bin/lib/qt-5.12.7/plugins/platforms/libqvnc.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "vnc" ] }, "archreq": 0, "className": "QVncIntegrationPlugin", "debug": false, "version": 330752 } Qt WARNING: Found metadata in lib /nix/store/fa75x03020bpqkznsqxrzh65dyhaly77-qtbase-5.12.7-bin/lib/qt-5.12.7/plugins/platforms/libqxcb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "xcb" ] }, "archreq": 0, "className": "QXcbIntegrationPlugin", "debug": false, "version": 330752 } Qt WARNING: Found metadata in lib /nix/store/fa75x03020bpqkznsqxrzh65dyhaly77-qtbase-5.12.7-bin/lib/qt-5.12.7/plugins/platformthemes/libqgtk3.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1", "MetaData": { "Keys": [ "gtk3" ] }, "archreq": 0, "className": "QGtk3ThemePlugin", "debug": false, "version": 330752 } Qt WARNING: Found metadata in lib /nix/store/fa75x03020bpqkznsqxrzh65dyhaly77-qtbase-5.12.7-bin/lib/qt-5.12.7/plugins/platformthemes/libqxdgdesktopportal.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1", "MetaData": { "Keys": [ "xdgdesktopportal", "flatpak", "snap" ] }, "archreq": 0, "className": "QXdgDesktopPortalThemePlugin", "debug": false, "version": 330752 } Qt WARNING: Found metadata in lib /nix/store/gm06ckw8122mwnpx1i137jvw1g6b9brv-qtwayland-5.12.7-bin/lib/qt-5.12.7/plugins/wayland-graphics-integration-client/libdrm-egl-server.so, metadata= { "IID": "org.qt-project.Qt.WaylandClient.QWaylandServerBufferIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "drm-egl-server" ] }, "archreq": 0, "className": "DrmEglServerBufferPlugin", "debug": false, "version": 330752 } Qt WARNING: Found metadata in lib /nix/store/gm06ckw8122mwnpx1i137jvw1g6b9brv-qtwayland-5.12.7-bin/lib/qt-5.12.7/plugins/wayland-graphics-integration-client/libqt-plugin-wayland-egl.so, metadata= { "IID": "org.qt-project.Qt.WaylandClient.QWaylandClientBufferIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wayland-egl" ] }, "archreq": 0, "className": "QWaylandEglClientBufferPlugin", "debug": false, "version": 330752 } Qt WARNING: Found metadata in lib /nix/store/gm06ckw8122mwnpx1i137jvw1g6b9brv-qtwayland-5.12.7-bin/lib/qt-5.12.7/plugins/wayland-graphics-integration-client/libshm-emulation-server.so, metadata= { "IID": "org.qt-project.Qt.WaylandClient.QWaylandServerBufferIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "shm-emulation-server" ] }, "archreq": 0, "className": "ShmServerBufferPlugin", "debug": false, "version": 330752 } Qt WARNING: Found metadata in lib /nix/store/gm06ckw8122mwnpx1i137jvw1g6b9brv-qtwayland-5.12.7-bin/lib/qt-5.12.7/plugins/wayland-graphics-integration-client/libxcomposite-egl.so, metadata= { "IID": "org.qt-project.Qt.WaylandClient.QWaylandClientBufferIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "xcomposite-egl" ] }, "archreq": 0, "className": "QWaylandXCompositeEglClientBufferPlugin", "debug": false, "version": 330752 } Qt WARNING: Found metadata in lib /nix/store/gm06ckw8122mwnpx1i137jvw1g6b9brv-qtwayland-5.12.7-bin/lib/qt-5.12.7/plugins/wayland-graphics-integration-client/libxcomposite-glx.so, metadata= { "IID": "org.qt-project.Qt.WaylandClient.QWaylandClientBufferIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "xcomposite-glx" ] }, "archreq": 0, "className": "QWaylandXCompositeGlxClientBufferPlugin", "debug": false, "version": 330752 } Qt WARNING: Found metadata in lib /nix/store/gm06ckw8122mwnpx1i137jvw1g6b9brv-qtwayland-5.12.7-bin/lib/qt-5.12.7/plugins/wayland-shell-integration/libivi-shell.so, metadata= { "IID": "org.qt-project.Qt.WaylandClient.QWaylandShellIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "ivi-shell" ] }, "archreq": 0, "className": "QWaylandIviShellIntegrationPlugin", "debug": false, "version": 330752 } Qt WARNING: Found metadata in lib /nix/store/gm06ckw8122mwnpx1i137jvw1g6b9brv-qtwayland-5.12.7-bin/lib/qt-5.12.7/plugins/wayland-shell-integration/libwl-shell.so, metadata= { "IID": "org.qt-project.Qt.WaylandClient.QWaylandShellIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "wl-shell" ] }, "archreq": 0, "className": "QWaylandWlShellIntegrationPlugin", "debug": false, "version": 330752 } Qt WARNING: Found metadata in lib /nix/store/gm06ckw8122mwnpx1i137jvw1g6b9brv-qtwayland-5.12.7-bin/lib/qt-5.12.7/plugins/wayland-shell-integration/libxdg-shell-v5.so, metadata= { "IID": "org.qt-project.Qt.WaylandClient.QWaylandShellIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "xdg-shell-v5" ] }, "archreq": 0, "className": "QWaylandXdgShellV5IntegrationPlugin", "debug": false, "version": 330752 } Qt WARNING: Found metadata in lib /nix/store/gm06ckw8122mwnpx1i137jvw1g6b9brv-qtwayland-5.12.7-bin/lib/qt-5.12.7/plugins/wayland-shell-integration/libxdg-shell-v6.so, metadata= { "IID": "org.qt-project.Qt.WaylandClient.QWaylandShellIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "xdg-shell-v6" ] }, "archreq": 0, "className": "QWaylandXdgShellV6IntegrationPlugin", "debug": false, "version": 330752 } Qt WARNING: Found metadata in lib /nix/store/gm06ckw8122mwnpx1i137jvw1g6b9brv-qtwayland-5.12.7-bin/lib/qt-5.12.7/plugins/wayland-shell-integration/libxdg-shell.so, metadata= { "IID": "org.qt-project.Qt.WaylandClient.QWaylandShellIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "xdg-shell" ] }, "archreq": 0, "className": "QWaylandXdgShellIntegrationPlugin", "debug": false, "version": 330752 } Qt WARNING: Found metadata in lib /nix/store/ylvv7q2cnxr7mhb54pmbhrid3v4j5lqb-qtsvg-5.12.7-bin/lib/qt-5.12.7/plugins/iconengines/libqsvgicon.so, metadata= { "IID": "org.qt-project.Qt.QIconEngineFactoryInterface", "MetaData": { "Keys": [ "svg", "svgz", "svg.gz" ] }, "archreq": 0, "className": "QSvgIconPlugin", "debug": false, "version": 330752 } zsh: segmentation fault (core dumped) VirtualBox ```

To Reproduce

Steps to reproduce the behavior:

  1. Login with test user
  2. Start sway
  3. Open terminal
  4. Execute VirtualBox

Additional context

# configuration.nix extract
{

  virtualisation.virtualbox.host.enable = true;

  programs.sway.enable = true;
  programs.sway.extraPackages = with pkgs; [
    dmenu
    swayidle
    swaylock
    termite
    xwayland
  ];
  programs.sway.extraSessionCommands = ''
    export SDL_VIDEODRIVER=wayland
    # needs qt5.qtwayland in systemPackages
    export QT_QPA_PLATFORM=wayland
    export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
  '';

  users.users.test = {
    isNormalUser = true;
    password = "test";
    extraGroups = [
      "wheel"
      "networkmanager"
      "video"
      "vboxusers"
      "sway"
    ];
  };

  environment.systemPackages = with pkgs; [
    qt5.qtwayland
  ];
}

Metadata

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.4.40, NixOS, 20.03.1853.7829e5791ba (Markhor)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.4`
 - channels(root): `"nixos-20.03.1853.7829e5791ba, nixos-hardware"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
bbigras commented 4 years ago

I was using Sway too.

timstott commented 4 years ago

With some more research I was able to run VirtualBox the following workaround:

QT_QPA_PLATFORM=xcb VirtualBox
B4dM4n commented 4 years ago

There is an upstream issue about using wayland and VirtualBox: https://www.virtualbox.org/ticket/18679

Wayland is currently not supported in VirtualBox as they have some x11 specific code which needs to be removed first.

The Qt xcb plugin seems to be the only supported variant, so we could add QT_QPA_PLATFORM=xcb to the wrapper until is wayland supported.

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info