Welcome! Log In Create A New Profile

Advanced

suspected bug in devpoll

Arne Jansen
February 16, 2015 09:48AM
Hi,

I suspect a bug in the devpoll implementation. What I see is this:

recv() failed (134: Transport endpoint is not connected) while reading response
header from upstream

truss (solaris) tells me that nginx has done a connect() = EINPROGRESS, directly
followed by a read() on that socket, getting the ENOTCONN error.

What I suspect is as follows:
I have two fds waiting for an event. Both get ready at the same time.
ngx_devpoll_process_events fetches both from the kernel. While handling the
first event, the second fd gets closed, reopened and connected (with
EINPROGRESS). Afterwards, ngx_devpoll_process_events handles the already
received event for the other fd. This leads to a read() call even though the
socket is not connected yet.
What I'm missing is code in ngx_devpoll_del_event that deletes revents from
the global event_list, but I'm not sure if that's the right way to approach
this and how it is supposed to synchronize with ngx_devpoll_process_events.

Thanks,
Arne

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

suspected bug in devpoll

Arne Jansen 652 February 16, 2015 09:48AM

Re: suspected bug in devpoll

Arne Jansen 330 February 17, 2015 03:46AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 122
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready