missing status line with windows client/server
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 clearthe 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
Signature · 11 lines
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.