[PATCH] ntdll: Add a futex-based condition variable implementation.

Alexandre Julliard julliard at winehq.org
Wed Nov 28 13:40:25 CST 2018


Brendan McGrath <brendan at redmandi.com> writes:

> I couldn't find a bug specific to this issue so I have just raised one:
>
> https://bugs.winehq.org/show_bug.cgi?id=46208
>
> "When using wine-devel v3.21, Elite Dangerous is unstable and will usually freeze before finishing the opening video (but will sometimes get as far as shader compilation).
>
> When attaching a debugger, it looks like all processes are waiting for an event.
>
> The program needs to be killed with a 'kill -9'.
>
> The workaround is to run Elite with 'taskset -c 0', but it also appears to progress further if you run with 'WINEDEBUG=+relay'.
>
> This leads me to believe the issue is one of timing (as opposed to multi-threading).
>
> When using wine-staging v3.21, Elite has no such problems and runs perfectly.
>
> A git bi-sect led me to find that the reason for this was a single patch:
> https://github.com/wine-staging/wine-staging/tree/master/patches/ntdll-futex-condition-var
>
> Applying just this patch to wine-devel v3.21 results in the game running fine."
>
>
> Obviously the workarounds have a detrimental effect on performance.
>
> I haven't looked any further in to why the futex implementation works better with
> Elite over the current implementation - but I'm happy to do so if desired.

Yes, it would be good to understand that. Particularly if +relay helps,
it's probably not just because the original code is slow, since +relay
would make it even slower.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list