WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Segfault in swrast_dri.so  (Read 3745 times)

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Segfault in swrast_dri.so
« on: December 29, 2017, 07:10:40 PM »
I'm trying to build/run the Qt5 diving computer app Subsurface, but it segfaults in swrast_dri.so. It works on a non-accelerated video platform like ESXi, but fails on VMware. Glxgears dies too, the same way, which used to work a while ago. Glxinfo gives lots of data but no errors. I think I have all the extensions updated. This is on 64-bit, I haven't tried it on 32-bit yet. What other apps could I test? I tried some videos with Chrome but I didn't have any problems.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Segfault in swrast_dri.so
« Reply #1 on: December 30, 2017, 08:51:33 AM »
Hi Andy,  Isn't swrast_dri.so the OpenGL driver?    Anyhow GLXGears and GLXInfo is working fine with the Nvidia drivers and Hardware..

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Re: Segfault in swrast_dri.so
« Reply #2 on: December 30, 2017, 10:14:08 AM »
Glmark2 dies too, same way. Here's some more info:

Code: [Select]
X.Org X Server 1.19.5
Release Date: 2017-10-12
[    31.823] (II) LoadModule: "vmware"
[    31.823] (II) Loading /usr/local/lib/xorg/modules/drivers/vmware_drv.so
[    31.856] (II) Module vmware: vendor="X.Org Foundation"
[    31.857]    compiled for 1.19.3, module version = 13.2.1
[    31.857]    Module class: X.Org Video Driver
[    31.857]    ABI class: X.Org Video Driver, version 23.0
...
[    31.869] (II) Loading sub module "dri2"
[    31.869] (II) LoadModule: "dri2"
[    31.869] (II) Module "dri2" already built-in
[    31.869] (II) UnloadModule: "modesetting"
[    31.869] (II) Unloading modesetting
[    31.869] (II) UnloadModule: "vesa"
[    31.869] (II) Unloading vesa
[    31.869] (==) Depth 24 pixmap format is 32 bpp
[    31.869] (II) vmware(0): Initialized VMWARE_CTRL extension version 0.2
[    31.870] (WW) vmware(0): Failed to initialize Gallium3D Xa. No render acceleration available.
[    31.870] (WW) vmware(0): Skipped initialization of direct rendering due to lack of render acceleration.
[    31.870] (--) vmware(0): Render acceleration is disabled.
[    31.870] (==) vmware(0): Rendercheck mode is disabled.
[    31.870] (--) vmware(0): Direct rendering (3D) is disabled.
[    31.870] (==) vmware(0): Backing store enabled
[    31.870] (==) vmware(0): Silken mouse enabled
[    31.870] (II) vmware(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[    31.870] (==) vmware(0): DPMS enabled
[    31.870] (II) vmware(0): No 3D acceleration. Not setting up textured video.
[    31.870] (--) RandR disabled
[    31.871] (II) AIGLX: Screen 0 is not DRI2 capable
[    31.871] (EE) AIGLX: reverting to software rendering
[    31.876] (II) IGLX: enabled GLX_MESA_copy_sub_buffer
[    31.877] (II) IGLX: Loaded and initialized swrast
[    31.877] (II) GLX: Initialized DRISWRAST GL provider for screen 0

Maybe vmware_drv is out of date?

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Segfault in swrast_dri.so
« Reply #3 on: December 30, 2017, 10:11:34 PM »
vmware_drv from the xf86-video-vmware extension was updated with the last Xorg-7.7 update in Oct 2017.

I don't see any problems with swrast_dri.so on real hardware with the intel and modesetting drivers with blender, darktable, gimp, ocltoys, etc
« Last Edit: December 30, 2017, 10:13:08 PM by Juanito »

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Re: Segfault in swrast_dri.so
« Reply #4 on: December 31, 2017, 07:44:47 AM »
I'm using the open source radeon driver on my box with Slackware and I don't have a problem either. Nor do I when I installed opensuse leap 42.3 in a VM on this box. Looking at glxinfo between the two VM's I see:

Leap:

Code: [Select]
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.8, 128 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 17.0.5
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 17.0.5
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 17.0.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:

And on TC:

Code: [Select]
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 4.0, 128 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 17.2.0
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 17.2.0
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 17.2.0
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:

The big difference I see is the lack of Gallium detection in TC. I'm not sure how to chase that down. Did something get broken into optional libraries?

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Segfault in swrast_dri.so
« Reply #5 on: December 31, 2017, 07:59:28 AM »
Ah - I think I see the problem - do things work if you load Xorg-7.7-opencl?

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Re: Segfault in swrast_dri.so
« Reply #6 on: December 31, 2017, 09:07:23 AM »
No. I tried loading it and restarting X, no change. I added it to onboot.lst and rebooted, no change.  Here's some more info from dmesg:

Code: [Select]
[drm] Initialized drm 1.1.0 20060810
[drm] DMA map mode: Using physical TTM page addresses.
[drm] Capabilities:
[drm]   Rect copy.
[drm]   Cursor.
[drm]   Cursor bypass.
[drm]   Cursor bypass 2.
[drm]   8bit emulation.
[drm]   Alpha cursor.
[drm]   Extended Fifo.
[drm]   Multimon.
[drm]   Pitchlock.
[drm]   Irq mask.
[drm]   Display Topology.
[drm]   GMR.
[drm]   Traces.
[drm]   GMR2.
[drm]   Screen Object 2.
[drm]   Command Buffers.
[drm]   Command Buffers 2.
[drm]   Guest Backed Resources.
[drm]   DX Features.
[drm] Max GMR ids is 64
[drm] Max number of GMR pages is 65536
[drm] Max dedicated hypervisor surface memory is 0 kiB
[drm] Maximum display memory size is 131072 kiB
[drm] VRAM at 0xe8000000 size is 4096 kiB
[drm] MMIO at 0xfe000000 size is 256 kiB
[drm] global init.
[TTM] Zone  kernel: Available graphics memory: 4088414 kiB
[TTM] Zone   dma32: Available graphics memory: 2097152 kiB
[TTM] Initializing pool allocator
[TTM] Initializing DMA pool allocator
vmwgfx 0000:00:0f.0: BAR 1: can't reserve [mem 0xe8000000-0xefffffff pref]
[drm] It appears like vesafb is loaded. Ignore above error if any.
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] No driver support for vblank timestamp query.
[drm] Screen Target Display device initialized
[drm] width 1024
[drm] height 768
[drm] bpp 16
[drm] Fifo max 0x00040000 min 0x00001000 cap 0x0000077f
[drm] Using command buffers with DMA pool.
[drm] DX: no.
checking generic (e8000000 400000) vs hw (e8000000 400000)
fb: switching to svgadrmfb from VESA VGA
Console: switching to colour dummy device 80x25
fbcon: svgadrmfb (fb0) is primary device
Console: switching to colour frame buffer device 128x48
[drm] Initialized vmwgfx 2.10.0 20160210 for 0000:00:0f.0 on minor 0

Leap looks pretty much the same here:

Code: [Select]
[    2.752549] drm: loading out-of-tree module taints kernel.
[    2.754776] [drm] Initialized
[    2.764052] [drm] DMA map mode: Using physical TTM page addresses.
[    2.764239] [drm] Capabilities:
[    2.764240] [drm]   Rect copy.
[    2.764241] [drm]   Cursor.
[    2.764241] [drm]   Cursor bypass.
[    2.764241] [drm]   Cursor bypass 2.
[    2.764241] [drm]   8bit emulation.
[    2.764242] [drm]   Alpha cursor.
[    2.764242] [drm]   Extended Fifo.
[    2.764242] [drm]   Multimon.
[    2.764242] [drm]   Pitchlock.
[    2.764242] [drm]   Irq mask.
[    2.764243] [drm]   Display Topology.
[    2.764243] [drm]   GMR.
[    2.764243] [drm]   Traces.
[    2.764243] [drm]   GMR2.
[    2.764243] [drm]   Screen Object 2.
[    2.764244] [drm]   Command Buffers.
[    2.764244] [drm]   Command Buffers 2.
[    2.764244] [drm]   Guest Backed Resources.
[    2.764245] [drm]   DX Features.
[    2.764245] [drm] Max GMR ids is 64
[    2.764245] [drm] Max number of GMR pages is 65536
[    2.764246] [drm] Max dedicated hypervisor surface memory is 0 kiB
[    2.764246] [drm] Maximum display memory size is 131072 kiB
[    2.764247] [drm] VRAM at 0xe8000000 size is 131072 kiB
[    2.764247] [drm] MMIO at 0xfe000000 size is 256 kiB
[    2.764248] [drm] global init.
[    2.764343] [TTM] Zone  kernel: Available graphics memory: 2010786 kiB
[    2.764345] [TTM] Initializing pool allocator
[    2.764349] [TTM] Initializing DMA pool allocator
[    2.764392] vmwgfx 0000:00:0f.0: BAR 1: can't reserve [mem 0xe8000000-0xefffffff pref]
[    2.764393] [drm] It appears like vesafb is loaded. Ignore above error if any.
[    2.764472] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    2.764472] [drm] No driver support for vblank timestamp query.
[    2.764839] [drm] Screen Target Display device initialized
[    2.764881] [drm] width 640
[    2.764888] [drm] height 480
[    2.764896] [drm] bpp 32
[    2.833346] [drm] Fifo max 0x00040000 min 0x00001000 cap 0x0000077f
[    2.835669] [drm] Using command buffers with DMA pool.
[    2.835681] [drm] DX: no.
[    2.874630] checking generic (e8000000 130000) vs hw (e8000000 8000000)
[    2.874646] fb: switching to svgadrmfb from VESA VGA
[    2.874680] Console: switching to colour dummy device 80x25
[    2.876169] fbcon: svgadrmfb (fb0) is primary device
[    2.877007] Console: switching to colour frame buffer device 100x37
[    2.899891] [drm] Initialized vmwgfx 2.12.0 20170221 for 0000:00:0f.0 on minor 0

Where else can I look?

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Re: Segfault in swrast_dri.so
« Reply #7 on: December 31, 2017, 09:55:16 AM »
More possible useful info:

On TC:
Code: [Select]
tc@box:~$ export LIBGL_DEBUG=verbose
tc@box:~$ strace glxinfo 2>&1|grep /lib
open("/usr/local/lib/libGL.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/lib/libX11.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/lib/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/lib/libexpat.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/lib/libxcb-dri3.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/lib/libxcb-xfixes.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/lib/libxcb-present.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/lib/libxcb-sync.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/lib/libxshmfence.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/lib/libglapi.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/lib/libXdamage.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/lib/libXfixes.so.3", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/lib/libX11-xcb.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/lib/libxcb-glx.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/lib/libxcb-dri2.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/lib/libXxf86vm.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/lib/libXext.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/lib/libxcb.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/lib/libXau.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/lib/libXdmcp.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/lib/libdrm.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/lib/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
write(2, "OpenDriver: trying /usr/local/li"..., 56OpenDriver: trying /usr/local/lib/dri/tls/swrast_dri.so
open("/usr/local/lib/dri/tls/swrast_dri.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
write(2, "OpenDriver: trying /usr/local/li"..., 52OpenDriver: trying /usr/local/lib/dri/swrast_dri.so
open("/usr/local/lib/dri/swrast_dri.so", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/libz.so.1", O_RDONLY|O_CLOEXEC) = 4
open("/usr/local/lib/libdrm_intel.so.1", O_RDONLY|O_CLOEXEC) = 4
open("/usr/local/lib/libpciaccess.so.0", O_RDONLY|O_CLOEXEC) = 4
open("/usr/local/lib/libdrm_nouveau.so.2", O_RDONLY|O_CLOEXEC) = 4
open("/usr/local/lib/libdrm_radeon.so.1", O_RDONLY|O_CLOEXEC) = 4
open("/usr/local/lib/libdrm_amdgpu.so.1", O_RDONLY|O_CLOEXEC) = 4
open("/usr/local/lib/libelf.so.1", O_RDONLY|O_CLOEXEC) = 4
open("/usr/local/lib/libLLVM-4.0.so", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 4
open("/usr/local/lib/../lib/tls/x86_64/libffi.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/../lib/tls/x86_64", 0x7ffd5db940a0) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/../lib/tls/libffi.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/../lib/tls", 0x7ffd5db940a0) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/../lib/x86_64/libffi.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/../lib/x86_64", 0x7ffd5db940a0) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/../lib/libffi.so.6", O_RDONLY|O_CLOEXEC) = 4
open("/usr/local/lib/../lib/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/librt.so.1", O_RDONLY|O_CLOEXEC) = 4
open("/usr/local/lib/../lib/libtinfo.so.6", O_RDONLY|O_CLOEXEC) = 4
open("/lib/tls/x86_64/libtxc_dxtn.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/tls/x86_64", 0x7ffd5db94320) = -1 ENOENT (No such file or directory)
open("/lib/tls/libtxc_dxtn.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/tls", 0x7ffd5db94320)        = -1 ENOENT (No such file or directory)
open("/lib/x86_64/libtxc_dxtn.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64", 0x7ffd5db94320)     = -1 ENOENT (No such file or directory)
open("/lib/libtxc_dxtn.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib", {st_mode=S_IFDIR|0775, st_size=840, ...}) = 0
open("/usr/lib/tls/x86_64/libtxc_dxtn.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/tls/x86_64", 0x7ffd5db94320) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/libtxc_dxtn.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/tls", 0x7ffd5db94320)    = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64/libtxc_dxtn.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64", 0x7ffd5db94320) = -1 ENOENT (No such file or directory)
open("/usr/lib/libtxc_dxtn.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib", {st_mode=S_IFDIR|0755, st_size=660, ...}) = 0
open("/lib/libtxc_dxtn.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libtxc_dxtn.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libtxc_dxtn.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libtxc_dxtn.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libtxc_dxtn.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libtxc_dxtn.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

On Leap:

Code: [Select]
andy@ip3101:~> export LIBGL_DEBUG=verbose
andy@ip3101:~> strace glxinfo 2>&1|grep /lib
open("/usr/lib64/libGL.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/libX11.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/libexpat.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/libxcb-dri3.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/libxcb-present.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/libxcb-sync.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/libxshmfence.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/libglapi.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/libXext.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/libXdamage.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/libXfixes.so.3", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/libX11-xcb.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/libxcb-glx.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/libxcb-dri2.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/libxcb.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/libXxf86vm.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/libdrm.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib64/libXau.so.6", O_RDONLY|O_CLOEXEC) = 3
write(2, "OpenDriver: trying /usr/lib64/dr"..., 52OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so
open("/usr/lib64/dri/tls/swrast_dri.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
write(2, "OpenDriver: trying /usr/lib64/dr"..., 48OpenDriver: trying /usr/lib64/dri/swrast_dri.so
open("/usr/lib64/dri/swrast_dri.so", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/libdrm_nouveau.so.2", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/libdrm_radeon.so.1", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/libdrm_amdgpu.so.1", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/libelf.so.1", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/libLLVMX86Disassembler.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/libLLVMX86CodeGen.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/libLLVMX86Desc.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/libLLVMMCDisassembler.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/libLLVMX86Info.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/libLLVMMCJIT.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/libLLVMExecutionEngine.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/libLLVMRuntimeDyld.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/libLLVMAMDGPUCodeGen.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/libLLVMipo.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/libLLVMTarget.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/libLLVMScalarOpts.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/libLLVMAnalysis.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/libLLVMAMDGPUAsmParser.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/libLLVMAMDGPUDesc.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/libLLVMCore.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/libLLVMAMDGPUInfo.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/libLLVMMC.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/libLLVMSupport.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 4
open("/lib64/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/../lib64/tls/x86_64/libLLVMAsmPrinter.so.3.8", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/../lib64/tls/x86_64", 0x7ffdd1180a70) = -1 ENOENT (No such file or directory)
open("/usr/lib64/../lib64/tls/libLLVMAsmPrinter.so.3.8", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/../lib64/tls", 0x7ffdd1180a70) = -1 ENOENT (No such file or directory)
open("/usr/lib64/../lib64/x86_64/libLLVMAsmPrinter.so.3.8", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/../lib64/x86_64", 0x7ffdd1180a70) = -1 ENOENT (No such file or directory)
open("/usr/lib64/../lib64/libLLVMAsmPrinter.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/../lib64/libLLVMCodeGen.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/../lib64/libLLVMSelectionDAG.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/../lib64/libLLVMX86AsmPrinter.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/../lib64/libLLVMX86Utils.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/../lib64/libLLVMObject.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/../lib64/libLLVMAMDGPUAsmPrinter.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/../lib64/libLLVMAMDGPUUtils.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/../lib64/libLLVMTransformUtils.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/../lib64/libLLVMIRReader.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/../lib64/libLLVMInstCombine.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/../lib64/libLLVMLinker.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/../lib64/libLLVMProfileData.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/../lib64/libLLVMVectorize.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/../lib64/libLLVMMCParser.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/../lib64/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/../lib64/libz.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libz.so.1", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/../lib64/../lib64/tls/x86_64/libLLVMBitReader.so.3.8", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/../lib64/../lib64/tls/x86_64", 0x7ffdd11805b0) = -1 ENOENT (No such file or directory)
open("/usr/lib64/../lib64/../lib64/tls/libLLVMBitReader.so.3.8", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/../lib64/../lib64/tls", 0x7ffdd11805b0) = -1 ENOENT (No such file or directory)
open("/usr/lib64/../lib64/../lib64/x86_64/libLLVMBitReader.so.3.8", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/../lib64/../lib64/x86_64", 0x7ffdd11805b0) = -1 ENOENT (No such file or directory)
open("/usr/lib64/../lib64/../lib64/libLLVMBitReader.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/../lib64/../lib64/libLLVMBitWriter.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/../lib64/../lib64/libLLVMInstrumentation.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/../lib64/../lib64/libLLVMAsmParser.so.3.8", O_RDONLY|O_CLOEXEC) = 4
open("/usr/lib64/libtxc_dxtn.so", O_RDONLY|O_CLOEXEC) = 4

They're different, but it's not obvious to me why.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Segfault in swrast_dri.so
« Reply #8 on: December 31, 2017, 10:14:37 AM »
If I use software acceleration on real hardware I can get swrast to segfault with glxgears.

Now to figure out why...

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Re: Segfault in swrast_dri.so
« Reply #9 on: January 02, 2018, 03:51:13 PM »
As it frequently happens in Linux, there is a one line fix. All I needed to do was to add

Code: [Select]
mks.gl.allowBlacklistedDrivers = "TRUE"
to ~/.vmware/preferences on the host. Apparently the open source radeon driver is not to be trusted?

This doesn't mean that I know why swrast_dri.so segfaults, only that the hardware rendering is working now. GLmark2 score of 758 a little lower than I expected, not that I have any reason to expect anything else.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Segfault in swrast_dri.so
« Reply #10 on: January 02, 2018, 09:58:34 PM »
I see this with software acceleration:
Code: [Select]
$ GALLIUM_DRIVER=softpipe glxgears
1075 frames in 5.0 seconds = 214.978 FPS

$ GALLIUM_DRIVER=swr glxgears
SWR detected AVX2
1410 frames in 5.0 seconds = 281.805 FP

$ GALLIUM_DRIVER=llvmpipe glxgears
Segmentation fault
llvmpipe-0[11061]: segfault at 2ff ip 00007fd8f82139c8 sp 00007fd8f4a4ce00 error 4 in swrast_dri.so[7fd8f7fbe000+71e000]

..but I wonder if mesa (libGL) has to be compiled differently for gallium llvmpipe to work?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Segfault in swrast_dri.so
« Reply #11 on: January 03, 2018, 12:26:21 AM »
Likely just a bug in llvm or mesa.
The only barriers that can stop you are the ones you create yourself.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Segfault in swrast_dri.so
« Reply #12 on: January 03, 2018, 12:43:20 AM »
The same error occurs in mesa-17.2 and 17.3.1 - opencl used to have a problem with llvm-4 dynamic libs that is now fixed, maybe mesa still needs adjustment for llvm-4?