[PATCH v2 1/2] server: enable POLLIN when asyncs waiting in readq
Zebediah Figura
zfigura at codeweavers.com
Wed Dec 8 10:23:36 CST 2021
On 12/7/21 21:23, Dongwan Kim wrote:
>
> The situation is exactly what you said at last sentence.
>
> The real situation in wine-client view is below :
> GetQueuedCompletionStatus waits for 16 overlapped WSARecv.
> After one IO Completion is processed, it does not wake up.
>
>
> async_reselect() should be called after list_remove to
> receive POLLIN event again.
> async_waiting() only checks about the first entry in the queue.
> Before calling list_remove(), async_waiting() returns false.
>
> These stuff was done in async_destroy() on wine-6.7, and
> I let the contents of async remained so that async_destroy()
> handles it.
>
> Apparently, as you said, test bot says there is a problem in this patch.
>
> What about calling async_reselect() again right after calling list_remove()?
>
> if (async->queue)
> {
> list_remove( &async->queue_entry );
> async_reselect(async);
> async->fd = NULL;
> async->queue = NULL;
> release_object( async );
> }
>
> It does not cause assertion about handle_count and
> make GetQueuedCompletionStatus wake up after IO completions.
>
Yes, I think that looks correct. I'm not happy about it, but only
because my dislike for the current async code runs far deeper :-)
When you submit it, can you please also add a test case to Wine's test
suite that demonstrates the bug you describe?
More information about the wine-devel
mailing list