RFC: Hybrid (wineserver / process-local) native semaphores

Daniel Santos daniel.santos at pobox.com
Fri Sep 11 18:14:14 CDT 2015


On 09/11/2015 05:52 AM, Chiitoo wrote:
>
> Glad if I can be of any help!
>
> I tried the new set, but I'm still seeing the same issue here. I'll 
> see if I can spot anything helpful in comparing server/ntdll traces, 
> though considering how talkative those can be, I'm not too hopeful. :]
>
> Any other ideas in the meantime?
>
>
Hmm. Well I sure appreciate the tests! This tells me that something is 
very likely still not correct. One thing that I haven't tested 
thoroughly, and that I don't know if it's tested in the ntdll tests are 
wait multiples that involve semaphores and other objects (like threads, 
completions, etc.). It could also be that there are other timing issues 
when semaphores go quickly and something else doesn't, but I strongly 
suspect that it's something else that just isn't correct.

I can think of three things to try.
1. WINEDEBUG=ntdllsync (since I've put it in its own debug channel) and 
if you can compress one of those logs and send it to me it might help
2. Maybe disable the optimized version of wait multiple when bWaitAll = 
TRUE. So change dlls/ntdll/server.c:654 from

         else /* select_op->op == SELECT_WAIT_ALL (bWaitAll = TRUE)*/
to
         else if (0) /* select_op->op == SELECT_WAIT_ALL (bWaitAll = TRUE)*/

If that still doesn't solve the problem, I'm curious if completely 
disabling the optimized trywait would fix it, to easily do this, change 
dlls/ntdll/server.c:598 from

#if ENABLE_POSIX_SYNC

to

#if 0

That will give me a lot of information about what might be going wrong 
and what isn't. If this doesn't fix it then I'll now that it's either 
something I'm doing in ReleaseSemaphore or something I'm doing wrong on 
the server.

Thanks again!
Daniel




More information about the wine-devel mailing list