Crash after a few seconds with any shader with Mesa with glthread enabled, but only with Sodium
Firlaev-Hans opened this issue ยท 15 comments
Iris and Minecraft Version
iris-mc1.17-1.1.2-pre+rev.dcc1352 for Minecraft 1.17 (happens with any version for 1.17)
Are you running Sodium along with Iris?
Yes
Operating System
Arch Linux
What is your GPU?
AMD Radeon RX580 8GB
Java Version
Java 16
Reproduction Steps
- Run Minecraft 1.17 with Iris + Sodium on Linux with open source Mesa drivers (21.2.0 in my case)
- Select any shader
- Load a world
- The game will stutter a lot and then crash after a few seconds.
Crash Report file and latest.log
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f5cd68fd5a2, pid=8291, tid=8424
#
# JRE version: OpenJDK Runtime Environment (16.0.2+7) (build 16.0.2+7)
# Java VM: OpenJDK 64-Bit Server VM (16.0.2+7, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C [radeonsi_dri.so+0x3655a2]
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h" (or dumping to /mnt/GameSSD/Minecraft/MultiMC/instances/1.17/.minecraft/core.8291)
#
# An error report file with more information is saved as:
# /mnt/GameSSD/Minecraft/MultiMC/instances/1.17/.minecraft/hs_err_pid8291.log
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Additional context
This only happens with Mesa/RadeonSI, not with the proprietary AMDGPUPRO OpenGL driver. It does not crash when Sodium is not enabled, nor does it crash when Sodium is enabled but shaders are not. This also only occurs in 1.17.x, not in 1.16 (but it happens with any Iris and Sodium-Iris version for 1.17).
During the short time where the game actually renders before it crashes, it looks like the shaders don't quite render correctly, as the whole image looks kind of blurry. Again, this does not happen without Sodium.
No, as I said it only happens when both Sodium and Iris are active and a shaderpack is loaded, not without either of those.
Same behavior here, RX 6900 XT on Mesa Git and Fedora 34.
I was able to reproduce the lack of crash when Sodium isn't included, and I'm also able to add that using Zinc (An OpenGL -> Vulkan translation layer) prevents the crash, but with very bad performance.
Issue definitely seems limited to AMD GPUs on Mesa with Sodium and Iris.
Here's my crash logs for the above, this is slightly different from the base issue as it occurs without any shaders being enabled, just Iris + Sodium.
Same here, I have a RX550 4GB and it seems to happen when gl thread is enabled, as said above.
The crash only seems to happen when mesa_glthread=true
is enabled.
I have, however, also been able to reproduce this issue with zink (a different OpenGL driver in Mesa built atop Vulkan)
Can also confirm issue when I have mesa_glthread=true
env var set. If I start with shaders disabled the game doesn't crash, but when I then press k
to enable them it'll start reloading chunks, but crash within a few seconds.
GPU: AMD Radeon RX 5700 XT
OS: Archlinux
Mesa Ver: 21.2.5-1
Minecraft Ver: 1.17.1
Fabric Ver: 0.11.7
Iris Ver: 1.1.2+build.9
It seems like we've received plenty of confirmations that this is an issue, and one that only happens when Iris and Sodium are both installed together on 1.17.1+, but it's not really clear how we'd go about actually tracking this down.
If there is anyone affected by this issue who has the relevant debugging expertise, any help tracking down the underlying issue with the glthread option would be appreciated.
Can reproduce.
System Configuration:
- Mesa Version: 21.2.5
- GPU: AMD Radeon RX 570
- Minecraft Version: 1.17.1
- Fabric Version: 0.12.5
- Iris Version: 1.1.3-starline+build.656 (using Starline custom Iris build, but considering the fact that others are also having issues, I doubt that's why)
- Sodium Version: 0.3.3 stable
I will attempt to find why or where it's crashing.
Please test with normal Iris, Starline has different features and unknown effects.
I am getting this issue as well in 1.18.
Configuration:
- Mesa Version: 21.3.0
- GPU: AMD Radeon RX 6800XT
- Minecraft Version: 1.18
- Fabric Version: 0.12.5
- Iris Version: 1.1.3
- Sodium Version: 0.4.0 alpha5
Here is the output from the logfile:
[23:06:28] [main/INFO]: Loading for game Minecraft 1.18
[23:06:28] [main/WARN]: Warnings were found!
- Mod 'Fabric Rendering Fluids (v1)' (fabric-rendering-fluids-v1) recommends any version of fabric-textures-v0, which is missing!
- You should install any version of fabric-textures-v0 for the optimal experience.
[23:06:28] [main/INFO]: Loading 13 mods:
- fabric-api-base 0.4.1+b4f4f6cd14
- fabric-key-binding-api-v1 1.0.7+3ac43d956d
- fabric-rendering-data-attachment-v1 0.3.3+d154e2c614
- fabric-rendering-fluids-v1 0.1.18+3ac43d9514
- fabric-resource-loader-v0 0.4.11+3ac43d956d
- fabricloader 0.12.5+local
- iris 1.1.3
- java 17
- minecraft 1.18
- org_anarres_jcpp 1.4.14
- org_joml_joml 1.10.2
- org_slf4j_slf4j-api 1.7.12
- sodium 0.4.0-alpha5+build.9
[23:06:28] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.4 Source=file:/home/avanish/.minecraft/libraries/net/fabricmc/sponge-mixin/0.10.6+mixin.0.8.4/sponge-mixin-0.10.6+mixin.0.8.4.jar Service=Knot/Fabric Env=CLIENT
[23:06:28] [main/INFO]: Compatibility level set to JAVA_16
[23:06:28] [main/INFO]: Compatibility level set to JAVA_17
[23:06:28] [main/INFO]: Loaded configuration file for Sodium: 29 options available, 1 override(s) found
[23:06:28] [main/WARN]: Force-disabling mixin 'features.sky.MixinWorldRenderer' as rule 'mixin.features.sky' (added by mods [iris]) disables it and children
[23:06:31] [Render thread/WARN]: Method overwrite conflict for method_22920 in sodium.mixins.json:features.buffer_builder.intrinsics.MixinBufferBuilder, previously written by net.coderbot.iris.mixin.vertices.block_rendering.MixinBufferBuilder_SeparateAo. Skipping method.
[23:06:31] [Render thread/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[23:06:32] [Render thread/INFO]: Setting user: Aviroblox
[23:06:32] [Render thread/INFO]: Backend library: LWJGL version 3.2.2 build 10
[23:06:33] [Render thread/INFO]: [STDERR]: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
[23:06:33] [Render thread/INFO]: [STDERR]: SLF4J: Defaulting to no-operation (NOP) logger implementation
[23:06:33] [Render thread/INFO]: [STDERR]: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[23:06:35] [Render thread/INFO]: Using shaderpack: ComplementaryShaders_v4.3.2.zip
[23:06:36] [Render thread/INFO]: Hardware information:
[23:06:36] [Render thread/INFO]: CPU: 16x AMD Ryzen 7 5800X 8-Core Processor
[23:06:36] [Render thread/INFO]: GPU: AMD Radeon RX 6800 XT (SIENNA_CICHLID, DRM 3.42.0, 5.15.5-76051505-generic, LLVM 12.0.1) (Supports OpenGL 4.6 (Core Profile) Mesa 21.3.0-devel)
[23:06:36] [Render thread/INFO]: OS: Linux
[23:06:36] [Render thread/WARN]: Method overwrite conflict for getNativeMemoryUsage in sodium.mixins.json:features.debug.MixinDebugHud, previously written by net.coderbot.iris.mixin.MixinDebugScreenOverlay. Skipping method.
[23:06:36] [Render thread/INFO]: Narrator library successfully loaded
[23:06:36] [Render thread/INFO]: Reloading ResourceManager: Default, Fabric Mods (Fabric API Base, Fabric Key Binding API (v1), Fabric Rendering Data Attachment (v1), Fabric Rendering Fluids (v1), Fabric Resource Loader (v0), Fabric Loader, Iris, Sodium)
[23:06:39] [Render thread/INFO]: OpenAL initialized on device PRO X Wireless Gaming Headset Analog Stereo
[23:06:39] [Render thread/INFO]: Sound engine started
[23:06:39] [Render thread/INFO]: Created: 1024x1024x4 minecraft:textures/atlas/blocks.png-atlas
[23:06:39] [Render thread/INFO]: Created: 256x128x4 minecraft:textures/atlas/signs.png-atlas
[23:06:39] [Render thread/INFO]: Created: 1024x512x4 minecraft:textures/atlas/banner_patterns.png-atlas
[23:06:39] [Render thread/INFO]: Created: 1024x512x4 minecraft:textures/atlas/shield_patterns.png-atlas
[23:06:39] [Render thread/INFO]: Created: 256x256x4 minecraft:textures/atlas/chest.png-atlas
[23:06:39] [Render thread/INFO]: Created: 512x256x4 minecraft:textures/atlas/beds.png-atlas
[23:06:39] [Render thread/INFO]: Created: 512x256x4 minecraft:textures/atlas/shulker_boxes.png-atlas
[23:06:40] [Render thread/INFO]: Created: 256x256x0 minecraft:textures/atlas/particles.png-atlas
[23:06:40] [Render thread/INFO]: Created: 256x256x0 minecraft:textures/atlas/paintings.png-atlas
[23:06:40] [Render thread/INFO]: Created: 256x128x0 minecraft:textures/atlas/mob_effects.png-atlas
[23:06:51] [Render thread/INFO]: Shaders are disabled because enableShaders is set to false in iris.properties
[23:06:51] [Render thread/INFO]: Shaders are disabled
[23:06:52] [Render thread/INFO]: Shaders are disabled because enableShaders is set to false in iris.properties
[23:06:52] [Render thread/INFO]: Shaders are disabled
[23:06:55] [Render thread/WARN]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[23:06:55] [Render thread/WARN]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0]
[23:06:55] [Render thread/WARN]: Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498]
[23:06:55] [Render thread/WARN]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498]
[23:06:55] [Render thread/WARN]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[23:06:55] [Render thread/INFO]: Reloading ResourceManager: Default, terralith-v2-0-4.zip
[23:06:55] [Render thread/INFO]: Loaded 7 recipes
[23:06:55] [Render thread/INFO]: Loaded 1141 advancements
[23:06:57] [Render thread/WARN]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[23:06:57] [Render thread/WARN]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0]
[23:06:57] [Render thread/WARN]: Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498]
[23:06:57] [Render thread/WARN]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498]
[23:06:57] [Render thread/WARN]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[23:06:57] [Render thread/INFO]: Reloading ResourceManager: Default, terralith-v2-0-4.zip
[23:06:57] [Render thread/INFO]: Loaded 7 recipes
[23:06:57] [Render thread/INFO]: Loaded 1141 advancements
[23:06:58] [Render thread/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[23:06:58] [Server thread/INFO]: Starting integrated minecraft server version 1.18
[23:06:58] [Server thread/INFO]: Generating keypair
[23:06:58] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
[23:06:59] [Render thread/INFO]: Preparing spawn area: 0%
[23:06:59] [Render thread/INFO]: Preparing spawn area: 0%
[23:06:59] [Render thread/INFO]: Preparing spawn area: 1%
[23:07:00] [Render thread/INFO]: Preparing spawn area: 4%
[23:07:00] [Render thread/INFO]: Preparing spawn area: 43%
[23:07:01] [Render thread/INFO]: Time elapsed: 2379 ms
[23:07:01] [Server thread/INFO]: Changing view distance to 24, from 10
[23:07:01] [Server thread/INFO]: Changing simulation distance to 12, from 0
[23:07:01] [Server thread/INFO]: Aviroblox[local:E:c28cb85c] logged in with entity id 13 at (-19848.476305220072, 70.40513910349928, 19363.8548999372)
[23:07:01] [Server thread/INFO]: Aviroblox joined the game
[23:07:01] [Render thread/INFO]: Started 10 worker threads
[23:07:01] [Render thread/INFO]: Creating pipeline OVERWORLD
[23:07:02] [Render thread/INFO]: Loaded 44 advancements
[23:07:12] [Server thread/INFO]: Saving and pausing game...
[23:07:12] [Server thread/INFO]: Saving chunks for level 'ServerLevel[Teralith]'/minecraft:overworld
[23:07:12] [Server thread/INFO]: Saving chunks for level 'ServerLevel[Teralith]'/minecraft:the_nether
[23:07:12] [Server thread/INFO]: Saving chunks for level 'ServerLevel[Teralith]'/minecraft:the_end
[23:07:20] [Render thread/INFO]: Destroying pipeline OVERWORLD
[23:07:20] [Render thread/INFO]: Using shaderpack: ComplementaryShaders_v4.3.2.zip
[23:07:20] [Render thread/INFO]: Creating pipeline OVERWORLD
[23:07:20] [Render thread/WARN]: [deferred1] Unsupported uniform: float isEyeInCave
[23:07:20] [Render thread/WARN]: [composite] Unsupported uniform: float isEyeInCave
[23:07:20] [Render thread/WARN]: [Triforce Patcher] gl_FragColor is not supported yet, please use gl_FragData! Assuming that the shaderpack author intended to use gl_FragData[0]...
[23:07:20] [Render thread/WARN]: [gbuffers_basic] Unsupported uniform: float velocity
[23:07:20] [Render thread/WARN]: [gbuffers_basic] Unsupported uniform: int renderStage
[23:07:20] [Render thread/WARN]: [gbuffers_basic_color] Unsupported uniform: float velocity
[23:07:20] [Render thread/WARN]: [gbuffers_basic_color] Unsupported uniform: int renderStage
[23:07:20] [Render thread/WARN]: [gbuffers_textured] Unsupported uniform: float isEyeInCave
[23:07:20] [Render thread/WARN]: [gbuffers_textured] Unsupported uniform: (unknown:35669) blendFunc
[23:07:20] [Render thread/WARN]: [gbuffers_textured_color] Unsupported uniform: float isEyeInCave
[23:07:20] [Render thread/WARN]: [gbuffers_textured_color] Unsupported uniform: (unknown:35669) blendFunc
[23:07:20] [Render thread/WARN]: [gbuffers_sky_basic] Unsupported uniform: float isEyeInCave
[23:07:20] [Render thread/WARN]: [gbuffers_sky_basic_color] Unsupported uniform: float isEyeInCave
[23:07:20] [Render thread/WARN]: [gbuffers_terrain_solid] Unsupported uniform: float velocity
[23:07:20] [Render thread/WARN]: [gbuffers_terrain_cutout] Unsupported uniform: float velocity
[23:07:20] [Render thread/WARN]: [gbuffers_terrain_cutout_mipped] Unsupported uniform: float velocity
[23:07:20] [Render thread/WARN]: [gbuffers_leash] Unsupported uniform: float velocity
[23:07:20] [Render thread/WARN]: [gbuffers_leash] Unsupported uniform: int renderStage
[23:07:20] [Render thread/WARN]: [gbuffers_particles] Unsupported uniform: float isEyeInCave
[23:07:20] [Render thread/WARN]: [gbuffers_particles] Unsupported uniform: (unknown:35669) blendFunc
[23:07:20] [Render thread/WARN]: [gbuffers_damagedblock] Unsupported uniform: float velocity
[23:07:20] [Render thread/WARN]: [gbuffers_block] Unsupported uniform: float velocity
[23:07:20] [Render thread/WARN]: [gbuffers_beaconbeam] Unsupported uniform: float velocity
[23:07:20] [Render thread/WARN]: [gbuffers_lines] Unsupported uniform: float velocity
[23:07:20] [Render thread/WARN]: [gbuffers_lines] Unsupported uniform: int renderStage
[23:07:20] [Render thread/WARN]: [gbuffers_translucent] Unsupported uniform: float velocity
[23:07:20] [Render thread/WARN]: [gbuffers_translucent] Unsupported uniform: float isEyeInCave
[23:07:20] [Render thread/INFO]: Stopping worker threads
[23:07:20] [Render thread/INFO]: Started 10 worker threads
[23:07:20] [Render thread/WARN]: [<sodium shaders>] Unsupported uniform: float velocity
[23:07:20] [Render thread/WARN]: [<sodium shaders>] Unsupported uniform: float velocity
[23:07:20] [Render thread/WARN]: [<sodium shaders>] Unsupported uniform: float velocity
[23:07:20] [Render thread/WARN]: [<sodium shaders>] Unsupported uniform: float isEyeInCave
And here is the output on the terminal
https://launchermeta.mojang.com/v1/products/launcher/6f083b80d5e6fabbc4236f81d0d8f8a350c665a9/linux.json
[1216/230550.131421:INFO:main_context.cpp(136)] CEF initialized successfully.
[1216/230550.131460:INFO:main_context.cpp(138)] CEF version: 86.0.23+ga2c2edf+chromium-86.0.4240.193
ATTENTION: default value of option mesa_glthread overridden by environment.
[1216/230550.162901:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
Created browser window for reuse: 0x6e00001
[1216/230603.343593:WARNING:xproto_util.cc(51)] X error received: serial 543, error_code 3 (BadWindow (invalid Window parameter)), request_code 4, minor_code 0 (X_DestroyWindow)
aCreated browser window for reuse: 0x6e00007
[1216/230650.168933:WARNING:xproto_util.cc(51)] X error received: serial 801, error_code 3 (BadWindow (invalid Window parameter)), request_code 4, minor_code 0 (X_DestroyWindow)
[1216/230650.170673:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 1 time(s)
ATTENTION: default value of option mesa_glthread overridden by environment.
[1216/230650.204723:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
[1216/230650.205396:WARNING:gpu_process_host.cc(990)] Reinitialized the GPU process after a crash. The reported initialization time was 33 ms
Created browser window for reuse: 0x6e0001b
[1216/230721.696174:WARNING:ipc_message_attachment_set.cc(49)] MessageAttachmentSet destroyed with unconsumed attachments: 0/1
[1216/230721.696181:ERROR:command_buffer_proxy_impl.cc(122)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer.
[1216/230729.891541:WARNING:xproto_util.cc(51)] X error received: serial 1131, error_code 3 (BadWindow (invalid Window parameter)), request_code 4, minor_code 0 (X_DestroyWindow)
Created browser window for reuse: 0x6e0001f
[1216/230824.586872:WARNING:xproto_util.cc(51)] X error received: serial 1377, error_code 3 (BadWindow (invalid Window parameter)), request_code 4, minor_code 0 (X_DestroyWindow)
WWCreated browser window for reuse: 0x6e00023
The issue with both logs is that they don't seem to say much besides the obvious that the game has crashed, "Stopping worker threads" for the first one and "GPU Process has crashed 1 times(s)" the Unsupported Uniform warning shows up regardless of whether mesa_glthreaded is on or not so that doesn't seem to be correlated with the crash either. Does anyone if there are more in-depth logs that could show what's causing the crash, or some steps I could take to look into what's going on?
More details on the fix: https://gitlab.freedesktop.org/mesa/mesa/-/commit/fd2fbc558b8e9c6ffdfbd90473e5b77e20f771e7