OpenGL/Vulkan synchronization crashes in XPlane 11.50
System information
- OS: "Arch Linux"
- GPU: 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (rev e7)
- Kernel version: "Linux opteron 5.7.7-arch1-1 #1 (closed) SMP PREEMPT Wed, 01 Jul 2020 14:53:16 +0000 x86_64 GNU/Linux)"
- Mesa version: OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.2.0-devel (git-19ca34ed)
- Xserver version (if applicable): X.Org X Server 1.20.8
Description
XPlane 11.50 vulkan-betas all crash when third-party plugins attempt to draw to an OpenGL context while the simulator is in Vulkan mode.
A simple way to reproduce is to "install" https://github.com/leecbaker/datareftool and open its interface from the Plugins menu.
stdout:
amdgpu: The CS has been rejected, see dmesg for more information.
vk: error: failed to submit CS
WARNING: radv is not a conformant vulkan implementation, testing use only.
Picking device: AMD RADV POLARIS10 (ACO)
dmesg:
[drm:amdgpu_syncobj_lookup_and_add_to_sync [amdgpu]] *ERROR* syncobj 73 failed to find fence @ 0 (-22)!
[drm:amdgpu_cs_ioctl [amdgpu]] *ERROR* Failed in the dependencies handling -22!
Main Thread[2351]: segfault at 2a00000719 ip 0000000001623924 sp 00007ffe11d00740 error 4 in X-Plane-x86_64[400000+1e5d000]
Notes
This is not a regression, the issue existed since the first 11.50 beta. All official mesa versions since the latest 19.3 versions were tested and exhibit the same symptoms. The current git HEAD (19ca34ed) is affected as well.
Bugreports with similar errors were posted before but were fixed since then without any obvious effect on this particular issue: #2433 (closed) #2030 (closed)
Users of the proprietary nvidia and amdgpu-pro drivers report that they don't experience this issue.
Installing the stand-alone amdvlk driver doesn't mitigate this crash either which seems to point either at an issue with OpenGL or the interaction of the OpenGL and Vulkan drivers.
The XPlane devs are aware of issues with the AMDGPU drivers, here's a recent brain-dump from one of them: https://forums.x-plane.org/index.php?/forums/topic/220903-1150b14-release-notes-its-now-out/&do=findComment&comment=1989395
Log files
How to reproduce:
- download the XP11 installer from https://www.x-plane.com/desktop/try-it/
- extract the archive and execute 'X-Plane 11 Installer Linux'
- select the "Install a Free Demo of X-Plane" option, agree to the EULA and continue
- select a path to install the demo into, you will need ~10GB of free space for this
- after the installation is finished, re-run the installer and select the "Update the X-Plane 11 Demo"
- select the "Check for new betas as well as updates" checkbox at the bottom
- select the installation path if it wasn't found automatically
- let the installer continue with the update of xplane to, as of writing, Beta 16 (+2GB)
- the 'X-Plane-x86_64' executable in the installation path supports the --vulkan/--opengl switches, removing the need to dive into the in-game settings
- the datareftool plugin, linked above, can be used to reproduce the crashes
- drop the prebuilt plugin into '/path/to/XP11-demo/Resources/plugins/DataRefTool/lin.xpl'
- start xplane in vulkan mode: 'X-Plane-x86_64 --vulkan', select the "New Flight" option in the main menu and "Start Flight" in the next one
- once the sim has loaded the flight, move the mouse cursor to the top to make the menu-bar pop in: Plugins -> DataRefTool -> View Datarefs