Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proton download loop workaround #87

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Kethen
Copy link

@Kethen Kethen commented May 26, 2024

This PR is provided as a reference to the 99.9% stuck issue on proton, as SesbianLex42069 (snarky-ly) pointed out that it is possible for the download to get stuck indefinitely at https://forum.beammp.com/t/linux-setup-beammp-proton-with-steamtinkerlaunch/688297/27, as well as https://discord.com/channels/601558901657305098/1244002666384986112/1244002666384986112

Stopping the async update thread explicitly to avoid it getting stuck due to floating point conversion quirks race condition on incrementing GRcv

Not sure how useful this will still be after the big launcher rewrite that is going on, just leaving this here as a reference

Tested working inside proton after helping the launcher find the game install with regedit, I can download mods during server joining without getting stuck at 99.9% with this change

@lionkor
Copy link
Member

lionkor commented May 26, 2024

Oh my god why do we even have floating point stuff in there, I'm going to scream. Thank you, I'll look into this.

@Kethen
Copy link
Author

Kethen commented May 26, 2024

Actually it’s likely race condition on GRcv’s increment instead of floating point quirk

@lionkor lionkor self-requested a review June 1, 2024 18:25
@lionkor
Copy link
Member

lionkor commented Jul 16, 2024

I'm not sure I can reproduce the issue, actually!

@Kethen
Copy link
Author

Kethen commented Aug 19, 2024

It might have to do with differences in wine's vcruntime*.dll and msvcrt.dll compared to windows, or linux itself, having slight difference when it comes to incrementing a non atomic variable on two different threads without any use of mutex

I'm rather surprised by how no one had the same issue on windows, since it happens a lot in wine with moderately sized files, and writing a non atomic variable on two threads without locks requires compilers to increment variables atomically by default

@lionkor
Copy link
Member

lionkor commented Aug 22, 2024

aka its undefined behavior and its a data race, yeah. I don't know why it was written like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants