Ubuntu 18.04LTS w/ AMDGPU Pro drivers -- segfault

That simple. When I try to launch Natron I get an immediate segfault.

pf@bukowski:~/Natron-2.3.14-Linux-x86_64bit-portable/Natron-2.3.14-Linux-x86_64bit/bin$ ./Natron
Natron Version 2.3.14
Copyright (C) 2013-2018 INRIA and Alexandre Gauthier-Foichat
>>>Use the --help or -h option to print usage.<<<
Fontconfig error: Cannot load default config file
Caught segmentation fault (SIGSEGV) from thread Main(0x3681290), faulty address is 0x7f821df443da from 0x21
Backtrace:
[Frame 1]: /opt/amdgpu-pro/lib/x86_64-linux-gnu/libGL.so.1(+0x653da) [0x7f821df443da]
[Frame 2]: /opt/amdgpu-pro/lib/x86_64-linux-gnu/libGL.so.1(+0x653da) [0x7f821df443da]
[Frame 3]: /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so(+0xe11df8) [0x7f8215c3edf8]
[Frame 4]: /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so(+0x8ef894) [0x7f821571c894]
[Frame 5]: /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so(+0x58ceef) [0x7f82153b9eef]
[Frame 6]: /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so(+0xe1657b) [0x7f8215c4357b]
[Frame 7]: /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so(+0x148ca7a) [0x7f82162b9a7a]
[Frame 8]: /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so(+0x148db56) [0x7f82162bab56]
[Frame 9]: /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so(+0x1492b6d) [0x7f82162bfb6d]
[Frame 10]: /opt/amdgpu-pro/lib/x86_64-linux-gnu/libGL.so.1(+0x65aa4) [0x7f821df44aa4]
[Frame 11]: /opt/amdgpu-pro/lib/x86_64-linux-gnu/libGL.so.1(glXCreateContextAttribsARB+0x1e8) [0x7f821df2d708]
[Frame 12]: ./Natron(_ZN6Natron22OSGLContext_x11Private16createContextGLXEPNS_20OSGLContext_glx_dataERKNS_17FramebufferConfigEiibiPKNS_15OSGLContext_x11E+0x1c5) [0xdd45c5]
[Frame 13]: ./Natron(ZN6Natron15OSGLContext_x11C2ERKNS_17FramebufferConfigEiibRKNS_12GLRendererIDEPKS0+0xd7) [0xdd4aa7]
[Frame 14]: ./Natron(_ZN6Natron15OSGLContext_x1111getGPUInfosERNSt7__cxx114listINS_18OpenGLRendererInfoESaIS3_EEE+0x12e2) [0xdd5e02]
[Frame 15]: ./Natron(_ZN6Natron10AppManager12loadInternalERKNS_6CLArgsE+0x49c) [0xb5ccac]
pf@bukowski:~/Natron-2.3.14-Linux-x86_64bit-portable/Natron-2.3.14-Linux-x86_64bit/bin$

This is probably a conflict with the gcc libs provided by Natron vs. what’s included in the AMD driver and/or system.

Try this:

cd <Natron_install_folder>
mv lib/libgcc_s.so.1 .
mv lib/libgomp.so.1 .
mv lib/libstdc++.so.6 .

This might fix the issue depending on if your system provides new enough gcc libs.

If you still have issues you can try:
https://natron.fxarena.net/snapshots/RB-2.3/Linux/Natron-RB-2.3-201906162122-d771877-64-UNOFFICIAL.tar.xz

This build should not conflict with any gcc libs. Only use this build to test, it’s not official or production-ready.

1 Like

Moving included libs out of the way didn’t work. Still get the same segfault with essentially the same error message. I’ll try a snapshot and see what happens.

EDIT: Nope. The Unofficial tarball crashes in exactly the same way.

Then it’s probably the AMD driver. I see that it includes it’s own GL library and other stuff.

I don’t have access to any cards that uses amdgpu-pro (I think, what’s the oldest cards I can use?) so I can’t test this directly (or find a workaround).

I looked at the amdgpu-pro package and it installs a lot of libraries (GL,OSMesa,LLVM and more) that may conflict with Natron.

One more thing you may try is to just load Natron (no plugins).

cd <Natron_folder>
mv Plugins/OFX OFX.orig

And try to launch Natron again and see if anything differs. If that does not help then I’m out of suggestions (without testing myself).

I will try to get my hands on a supported gfx card and do some testing myself.

I’ll move the plugin folder aside and try that. But I honestly think it’s the AMD Pro drivers. They don’t play well with games either. But it does run OpenCL 2.0, which makes it perfect for Blender and Resolve.

Is there any other way I can help?

First of all, start by fixing your fontconfig location:

export FONTCONFIG_PATH=/etc/fonts

If that does not help, try flatpak version to see if works, some other people also experienced this and reported that flatpak version was working fine:

sudo apt install flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub fr.natron.Natron

To run:

flatpak run fr.natron.Natron
1 Like

OK. Installed. It appears to launch, giving the splash screen and opening the main window. Then I get this dialog error:

Error while creating OpenGL context: GLX: Failed to create context

Natron requires at least OpenGL 2.0 with the following extensions so the viewer works appropriately:

GL_ARB_vertex_buffer_object,GL_ARB_pixel_buffer_object

Yeah, sandboxing won’t fix the GL conflict with the AMD driver.

At the moment your only solution would be to build Natron yourself (against the dev packages provided by AMD). I will however look into this when I get a amdgpu-pro compatible card (the closest I could find was an 290x, but the card is broken or something, no video output) and see if some workarounds can be made.

I’m willing to try that. It’s been a while, but I’ve built stuff from source before. Ubuntu Desktop doesn’t ship with a real dev environment. So I’ll have to sort that out. But if it will help the Natron community get an answer here, and me too, this might be worth it. Pretty much anyone with a recent AMD card running Linux or Resolve has the Pro drivers installed. I can’t be the only one who’s seen this.

OK. So it turned out that Davinci Resolve had a serious Fusion bug with the AMDGPU-Pro drivers too. I installed ROCm with the standard driver and (though it’s a little slower) the Fusion bug was resolved. As a side benefit, the flatpak Natron also works. So, I’m not sure if anyone really cares about AMDGPU-Pro.

Great that you got Natron working. The biggest problem with the AMDGPU stack is the forced use of libraries that will/might conflict with “universal” binaries from other applications. At least they (AMD) provided headers so you can compile against them if you have issues, but it won’t fix existing binaries from Resolve, Natron etc.

This problem might be resolved in the future when Natron is built against a newer version of CentOS/RHEL that provides a newer OpenGL(Mesa) stack.

1 Like

OpenGL is not the issue. The OpenGL API hasn’t changed for 20 years. It is probably that their version of the OpenGL library depends on something that conflicts with Natron.