RaphiMC / ImmediatelyFast

Speed up immediate mode rendering in Minecraft
https://modrinth.com/mod/immediatelyfast
GNU Lesser General Public License v3.0
294 stars 21 forks source link

ImmediatelyFast causes AMDGPU use-after-free #183

Closed AutumnalModding closed 2 weeks ago

AutumnalModding commented 8 months ago

dmesg output

Does not happen without IF installed. Game does not crash.

RaphiMC commented 8 months ago

Please provide more details like other mods installed. A game log. PC Sepcs. Used OS

AutumnalModding commented 8 months ago

Other mods installed

Modpack is Additive

Game log

dmesg stacktrace attached.

PC specs, used OS `neofetch` output

@RaphiMC is this sufficient?

RaphiMC commented 8 months ago

Can you try with only ImmediatelyFast installed. Also when does the use after free happen?

AutumnalModding commented 8 months ago

Can you try with only ImmediatelyFast installed. Also when does the use after free happen?

Unfortunately it doesn't happen at a specific point, it's entirely random. I have four thousand three hundred stacktraces from a SINGLE FUCKIN' RUN if you'd like, though! But given it's random, I have reason to believe it happens with IF. For a friend of mine (5700XT) it happened on the loading screen. Kernel version string (uname -a) is Linux emdex 6.6.21-1-lts #1 SMP PREEMPT_DYNAMIC Wed, 06 Mar 2024 16:59:55 +0000 x86_64 GNU/Linux if you'd like to test, I have reason to believe it happens on all modern AMD GPUs - perhaps even older ones, assuming they use amdgpu and not radeon.

RaphiMC commented 8 months ago

I can't test the issue since I don't have any AMD GPU nor do I run linunx on my PC. Can you please test it with only IF installed (and no other mods), just to make sure its not another mod in combination with IF causing it

AutumnalModding commented 6 months ago

@RaphiMC Sorry for the delay. I have reliably reproduced it, and it looks like a chunkloading race condition. In addition to that I have an area in which I can reliably trigger it.

And yes - it happens only with IF.

DBTDerpbox commented 6 months ago

@AutumnalModding can you send the config for ImmediatelyFast you have? I encountered a similar issue caused by fast_buffer_upload_size_mb being set to 64

AutumnalModding commented 6 months ago

@DBTDerpbox "fast_buffer_upload_size_mb": 256,

tamolny commented 6 months ago

I had to change mine to 512 and it didn't crash anymore for me :)

RaphiMC commented 2 weeks ago

This is now fixed in the latest version (1.3.1)