Hi, ouch, I realize my email was not clear. Sorry about that. Let me explain it with a verbose example:
1) New passive connection is established (via accept(2), client side connection). 2) squid calls commSetSelect(fd, COMM_SELECT_READ, read_handler, ...). This means that squid is interested on reading request from fd. 3) request is read and processed. 3) a little later, in order to send reply to client, squid calls commSetSelect(fd, COMM_SELECT_WRITE, write_handler, ....). This means that squid is interested in writing reply on fd. 4) then, squid calls again commSetSelect(fd, COMM_SELECT_READ, read_handler, ...). This is because a new request may be received from client through same TCP connection (not sure about the reason, but it sounds convincing). This call may be issued before the request is completely sent to client (or even before reply started). This last call to commSetSelect(fd, COMM_SELECT_READ, read_handler), made comm_epoll.cc+my_previous_patch forget that squid is interested also on writing to fd. This way, squid would never write again to client fd. Of course, the bug appeared randomly, because it depends on delicate timings between commSetSelect calls and writes to client. This bug is fixed now (and, I hope, not by introducing a new one). Cheers, > > Hi, > > I didn't understand your last email. What was wrong with the > patch, and > is it fixed now? > > Gonzalo A. Arana wrote: > > Uh, I realize that our conversation (with Reuben) was in > private, not > > within the list. It was a little bug with my patch. > > Although, I haven't tested it with udp sockets, nor pipes (external > > helpers). > > The problem was that, with my previous patch: > > > > commSetSelect(fd, COMM_SELECT_READ, ...) > > commSetSelect(fd, COMM_SELECT_WRITE, ...) > > > > The second call made kernel forget about the interest on reading. > > Cheers, > > > > > >>-----Original Message----- > >>From: David Nicklay [mailto:[EMAIL PROTECTED] > >>Sent: Martes, 11 de Noviembre de 2003 03:10 p.m. > >>To: Gonzalo A. Arana > >>Cc: 'Reuben Farrelly'; [EMAIL PROTECTED] > >>Subject: Re: new patch & new ideas (squid+epoll) > >> > >> > >>Hi, > >> > >> > >>>Ok, it seems that you are using wccp, am I right? > >>>If so, please, could you test my patch again without wccp enabled? > >>>Please disable as well (if enabled): external_acls, redirectors, > >>>external auth, and use ufs as cache_dir. > >> > >>I am curious. Is it only UDP (versus TCP) that you are > >>having problems > >>with (ala WCCP), or are there problems with the TCP > >>connections as well? > >> I have an idea of what it might be and how to fix it if it is. > >> > >>-- > >>David Nicklay > >>Location: CNN Center - SE0811A > >>Office: 404-827-2698 Cell: 404-545-6218 > >> > >> > > > > > > -- > David Nicklay > Location: CNN Center - SE0811A > Office: 404-827-2698 Cell: 404-545-6218 > >