* missing status line with windows client/server
@ 2025-04-10 16:11 James Rizzo
0 siblings, 0 replies; only message in thread
From: James Rizzo @ 2025-04-10 16:11 UTC (permalink / raw)
To: fio
[-- Attachment #1: Type: text/plain, Size: 2097 bytes --]
We are seeing an issue with windows fio using the client/server model where
it often doesn’t display the ongoing status line during a run. I’ve been
looking into this and found that when the issue occurs,
fio_handle_clients->poll() is returning revents with POLLIN set for an fd
that has nothing pending. This later results in a hang in
fio_handle_clients->
fio_handle_client()->fio_net_recv_cmd()->fio_recv_data()->recv() because
recv() is called with wait=true.
Looking at the poll() function in os/windows/posix, it appears that
fds[i].revents only ever gets set, never cleared(except in the
INVALID_SOCKET case).
I’ve experimented with the following change, and it appears to work as
expected. Can you confirm this issue and, if so, whether this is the
appropriate fix?
int poll(struct pollfd fds[], nfds_t nfds, int timeout)
{
...
FD_ZERO(&readfds);
FD_ZERO(&writefds);
FD_ZERO(&exceptfds);
for (i = 0; i < nfds; i++) {
fds[i].revents = 0; // <<< add this line to clear
the revents before they are set below
if (fds[i].fd == INVALID_SOCKET) {
fds[i].revents = 0; // <<< assuming above is
correct, this line can be deleted
continue;
}
Thanks,
Jim
--
This electronic communication and the information and any files transmitted
with it, or attached to it, are confidential and are intended solely for
the use of the individual or entity to whom it is addressed and may contain
information that is confidential, legally privileged, protected by privacy
laws, or otherwise restricted from disclosure to anyone else. If you are
not the intended recipient or the person responsible for delivering the
e-mail to the intended recipient, you are hereby notified that any use,
copying, distributing, dissemination, forwarding, printing, or copying of
this e-mail is strictly prohibited. If you received this e-mail in error,
please return the e-mail to the sender, delete it from your computer, and
destroy any printed copy of it.
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4193 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-04-10 16:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-10 16:11 missing status line with windows client/server James Rizzo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox