[Qemu-devel] [PATCHv2] slirp: check for ioctlsocket error and 0-length udp payload.

2019-02-28 Thread llyzs
Sometimes sorecvfrom() is called from slirp.c because revents == G_IO_IN, but there is 0 bytes available and recvfrom could be blocking indefinitely. This is likely due to 0-length udp payload. This also adds an error checking for ioctlsocket. Signed-off-by: Vic Lee --- slirp/socket.c | 10

Re: [Qemu-devel] [PATCH] socket: fix blocking udp recvfrom.

2019-02-28 Thread llyzs
that sometimes ioctlsocket() call can return error (probably caused by my unstable wifi linux driver), in which case we can also return immediately. I will submit a new version of the patch according to your suggestions. On Fri, 1 Mar 2019 at 04:51, Samuel Thibault wrote: > > Hello, > &g

[Qemu-devel] [PATCH] socket: fix blocking udp recvfrom.

2019-02-28 Thread llyzs
Sometimes sorecvfrom() is called from slirp.c because revents == G_IO_IN, however inside sorecvfrom() function, ioctlsocket() returns 0 bytes available and recvfrom could be blocking indefinitely. This adds a non-blocking flag to recvfrom and checks data availability. --- slirp/socket.c | 4 +++-

[Qemu-devel] sorecvfrom freezes guest

2019-02-28 Thread llyzs
Hi, I am having a guest freeze issue (win10), and through debugging I found out that sometimes sorecvfrom() is called from slirp.c because revents == G_IO_IN, however inside sorecvfrom() function, ioctlsocket() returns 0 bytes available and recvfrom could be blocking indefinitely. I am not sure