f3d icon indicating copy to clipboard operation
f3d copied to clipboard

Unable to use F3D without a Xorg server

Open Jenfong opened this issue 1 year ago • 15 comments

Describe the bug 1.f3d gen png crash 2.error log

tail -200f /var/log/messages | grep f3d
May 31 02:38:46 localhost kernel: f3d[61440]: segfault at 968 ip 00007f9aa44b70bf sp 00007ffcb233ae60 error 4 in libX11.so.6.3.0[7f9aa4475000+13d000]
May 31 02:38:47 localhost systemd-coredump[61442]: Resource limits disable core dumping for process 61440 (f3d).
May 31 02:38:47 localhost systemd-coredump[61442]: Process 61440 (f3d) of user 0 dumped core.
May 31 02:41:58 localhost kernel: f3d[61552]: segfault at 968 ip 00007fb1821650bf sp 00007fffbb398c10 error 4 in libX11.so.6.3.0[7fb182123000+13d000]
May 31 02:41:58 localhost systemd-coredump[61554]: Resource limits disable core dumping for process 61552 (f3d).
May 31 02:41:58 localhost systemd-coredump[61554]: Process 61552 (f3d) of user 0 dumped core.

To Reproduce Steps to reproduce the behavior:

  1. Open the file using f3d --dry-run --quiet --input=demo.fbx --output=demo.fbx_001.png --camera-azimuth-angle=135 --camera-elevation-angle=15

Expected behavior png gen correct

System Information:

  • OS: CentOS Linux release 8.5.2111
  • GPU and GPU driver: no gpu

F3D Information Paste the content of f3d --version:

F3D 2.1.0

F3D - A fast and minimalist 3D viewer
Version: 2.1.0.
Build date: 2023-07-02 22:00:27.
Build system: Linux 64-bits.
Compiler: GNU 8.4.0.
External rendering module: ON.
Raytracing module: ON.
VTK version: 9.2.6-3762-g9fd3adc3aa (date: 20230609).
Copyright (C) 2019-2021 Kitware SAS.
Copyright (C) 2021-2023 Michael Migliore, Mathieu Westphal.
License BSD-3-Clause.

Additional context Whether f3d's dependencies libs need to be corrected ? Maybe I install some other software influences the f3d's dependencies libs.

Jenfong avatar May 30 '24 11:05 Jenfong

Hi @Jenfong !

Do you have this crash with all files ? With any .fbx files ? Only with this specifc .fbx file ?

Please share that file.

mwestphal avatar May 30 '24 12:05 mwestphal

F3D 2.1.0

THis is pretty old, please try with our binary from: https://f3d.app/doc/user/INSTALLATION.html

mwestphal avatar May 30 '24 12:05 mwestphal

any 1.any .fbx ,how I can found the root cause for the crash? 2.If cannot figure out ,I need upgrade f3d the lastest version,it's meet I need upgrade the gclib to 2.29?

/home/soft/F3D-2.4.0-Linux-x86_64-raytracing/bin/f3d: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by /home/soft/F3D-2.4.0-Linux-x86_64-raytracing/bin/../lib/libf3d.so.2)

Jenfong avatar May 31 '24 01:05 Jenfong

Centos 8

Hum, I would think our binary would be compatible with centos 8, but its not. FYI @Meakk

any .fbx ,how I can found the root cause for the crash?

You want to compile F3D yourself to figure that out.

Which version of assimp are you using ?

mwestphal avatar May 31 '24 07:05 mwestphal

Centos 8

Hum, I would think our binary would be compatible with centos 8, but its not. FYI @Meakk

any .fbx ,how I can found the root cause for the crash?

You want to compile F3D yourself to figure that out.

Which version of assimp are you using ?

[root@localhost ~]# rpm -qa assimp
assimp-5.0.1-3.el8.x86_64

it's worked fine about a year ago. I'm not sure which basic component is preventing f3d[2.1.0] working properly.

Jenfong avatar Jun 03 '24 07:06 Jenfong

We upgraded the Docker image used to build the binaries and the GLIBC version requirement is higher now.

Meakk avatar Jun 03 '24 07:06 Meakk

Indeed, we could consider moving our binary generation to centos instead of ubuntu to suport more OSes.

mwestphal avatar Jun 03 '24 11:06 mwestphal

@Jenfong you should be able to use our older binary, eg F3D 2.2.1

mwestphal avatar Jun 03 '24 11:06 mwestphal

@Jenfong you should be able to use our older binary, eg F3D 2.2.1

It's seem not work yet with F3D-2.2.1.

[root@localhost ~]# /home/soft/F3D-2.2.1-Linux-x86_64/bin/f3d --dry-run --quiet --input=demo.fbx --output=demo.fbx_001.png --camera-azimuth-angle=135 --camera-elevation-angle=15
Segment error (core dumped)

error log

[root@localhost log]# cat messages | grep f3d
Jun 26 17:39:13 localhost kernel: f3d[1907601]: segfault at 968 ip 00007f8322a830bf sp 00007ffcea008c90 error 4 in libX11.so.6.3.0[7f8322a41000+13d000]
Jun 26 17:39:13 localhost systemd-coredump[1907603]: Resource limits disable core dumping for process 1907601 (f3d).
Jun 26 17:39:13 localhost systemd-coredump[1907603]: Process 1907601 (f3d) of user 0 dumped core.
  • F3D-2.2.1-Linux-x86_64-raytracing.tar.xz
[root@localhost ~]# ldd /home/soft/F3D-2.2.1-Linux-x86_64-raytracing/bin/f3d
        linux-vdso.so.1 (0x00007ffcc49c7000)
        libf3d.so.2 => /home/soft/F3D-2.2.1-Linux-x86_64-raytracing/bin/../lib/libf3d.so.2 (0x00007f6041cd4000)
        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f604193f000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f6041727000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f6041362000)
        libz.so.1 => /home/soft/F3D-2.2.1-Linux-x86_64-raytracing/bin/../lib/libz.so.1 (0x00007f6041146000)
        libospray.so.2 => /home/soft/F3D-2.2.1-Linux-x86_64-raytracing/bin/../lib/libospray.so.2 (0x00007f6040f05000)
        libOpenImageDenoise.so.1 => /home/soft/F3D-2.2.1-Linux-x86_64-raytracing/bin/../lib/libOpenImageDenoise.so.1 (0x00007f603dee2000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f603dcc2000)
        libGLX.so.0 => /lib64/libGLX.so.0 (0x00007f603da90000
libOpenGL.so.0 => /lib64/libOpenGL.so.0 (0x00007f603d866000)
        libXcursor.so.1 => /lib64/libXcursor.so.1 (0x00007f603d65b000)
        libX11.so.6 => /lib64/libX11.so.6 (0x00007f603d318000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f603d114000)
        libtbb.so.12 => /home/soft/F3D-2.2.1-Linux-x86_64-raytracing/bin/../lib/libtbb.so.12 (0x00007f603cec4000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f603cb42000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f604798d000)
librkcommon.so.1 => /home/soft/F3D-2.2.1-Linux-x86_64-raytracing/bin/../lib/librkcommon.so.1 (0x00007f603c924000)
        libXext.so.6 => /lib64/libXext.so.6 (0x00007f603c711000)
        libGLdispatch.so.0 => /lib64/libGLdispatch.so.0 (0x00007f603c45b000)
        libXrender.so.1 => /lib64/libXrender.so.1 (0x00007f603c250000)
        libXfixes.so.3 => /lib64/libXfixes.so.3 (0x00007f603c04a000)
        libxcb.so.1 => /lib64/libxcb.so.1 (0x00007f603be21000)
        libtbbmalloc.so.2 => /home/soft/F3D-2.2.1-Linux-x86_64-raytracing/bin/../lib/../lib/libtbbmalloc.so.2 (0x00007f603bbdf000)
        libXau.so.6 => /lib64/libXau.so.6 (0x00007f603b9db000)
  • F3D-2.2.1-Linux-x86_64.tar.xz
[root@localhost ~]# ldd /home/soft/F3D-2.2.1-Linux-x86_64/bin/f3d
        linux-vdso.so.1 (0x00007ffd24b36000)
        libf3d.so.2 => /home/soft/F3D-2.2.1-Linux-x86_64/bin/../lib/libf3d.so.2 (0x00007fb3dac8a000)
        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fb3da8f5000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fb3da6dd000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fb3da318000)
        libz.so.1 => /home/soft/F3D-2.2.1-Linux-x86_64/bin/../lib/libz.so.1 (0x00007fb3da0fc000)
        libGLX.so.0 => /lib64/libGLX.so.0 (0x00007fb3d9eca000)
        libOpenGL.so.0 => /lib64/libOpenGL.so.0 (0x00007fb3d9ca0000)
        libXcursor.so.1 => /lib64/libXcursor.so.1 (0x00007fb3d9a95000)
        libX11.so.6 => /lib64/libX11.so.6 (0x00007fb3d9752000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fb3d954e000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fb3d932e000)
        libtbb.so.12 => /home/soft/F3D-2.2.1-Linux-x86_64/bin/../lib/libtbb.so.12 (0x00007fb3d90de000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fb3d8d5c000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fb3e088b000)
        libXext.so.6 => /lib64/libXext.so.6 (0x00007fb3d8b49000)
        libGLdispatch.so.0 => /lib64/libGLdispatch.so.0 (0x00007fb3d8893000)
        libXrender.so.1 => /lib64/libXrender.so.1 (0x00007fb3d8688000)
        libXfixes.so.3 => /lib64/libXfixes.so.3 (0x00007fb3d8482000)
        libxcb.so.1 => /lib64/libxcb.so.1 (0x00007fb3d8259000)
        libXau.so.6 => /lib64/libXau.so.6 (0x00007fb3d8055000)
      

Jenfong avatar Jun 26 '24 01:06 Jenfong

Is something wrong with my libX11.so.6.3.0 ?

  • dmesg
[root@localhost ~]# dmesg 
[  426.087553] f3d[3282]: segfault at 968 ip 00007f136dfab0bf sp 00007ffe72a99250 error 4 in libX11.so.6.3.0[7f136df69000+13d000]
  • f3d render normal with x11 forward 1.with putty+xming in windows 10 2.ssh with x11 forward to my CentOS 8 (CentOS Linux release 8.5.2111) 3.f3d demo.fbx can render normal as follow screenshot 0BDACCDA-DB83-44ef-AF1E-1783B45CD20A

Jenfong avatar Jun 26 '24 03:06 Jenfong

Are you able to run glxinfo or xeyes ?

mwestphal avatar Jun 26 '24 06:06 mwestphal

Are you able to run glxinfo or xeyes ?

ssh without x11 forward

[root@localhost ~]# glxinfo
Error: unable to open display

it's means,I need install mesa or something else ?(Centos 8 is minimal installed)

Jenfong avatar Jun 27 '24 01:06 Jenfong

ssh without x11 forward

Then you want to use the headless binary release instead: https://github.com/f3d-app/f3d/releases/download/v2.4.0/F3D-2.4.0-Linux-x86_64-headless-raytracing.tar.xz

mwestphal avatar Jun 27 '24 05:06 mwestphal

Ideally, F3D should not crash but just return in error with: Error: unable to open display.

This should be fixed in VTK, see this issue: https://gitlab.kitware.com/vtk/vtk/-/issues/19383

mwestphal avatar Jun 27 '24 05:06 mwestphal

ssh without x11 forward

Then you want to use the headless binary release instead: https://github.com/f3d-app/f3d/releases/download/v2.4.0/F3D-2.4.0-Linux-x86_64-headless-raytracing.tar.xz

Awesome,it's worked with headless version(with F3D-2.1.0-Linux-x86_64-headless-raytracing) .Thx, mwestphal!

[root@localhost ~]# /home/soft/F3D-2.1.0-Linux-x86_64-headless-raytracing/bin/f3d --dry-run --quiet --input=demo.fbx --output=demo.fbx_0010628.png --camera-azimuth-angle=135 --camera-elevation-angle=15
VMware: No 3D enabled (0, Success).
libEGL warning: DRI2: failed to create dri screen
VMware: No 3D enabled (0, Success).
libEGL warning: DRI2: failed to create dri screen

although with warning info ,but actual the png gen correct

[root@localhost ~]# ll -lrt
-rw-r--r--   1 root root    36146 6月  29 02:46 demo.fbx_0010628.png

Jenfong avatar Jun 28 '24 11:06 Jenfong

if server without gui,it's need run with headless version for f3d

Jenfong avatar Jul 01 '24 06:07 Jenfong

VTK recently fixed this so F3D will not crash anymore if no Xorg server is available :)

mwestphal avatar Sep 14 '24 07:09 mwestphal

Please note F3D now support headless and non-headless in a single version, you can try the last nightly for that: https://github.com/f3d-app/f3d/releases/tag/nightly

mwestphal avatar Nov 10 '24 18:11 mwestphal