> -----Original Message-----
> From: Henrik Nordstrom [mailto:henrik@henriknordstrom.net]
> Sent: Monday, 26 June 2006 9:58 PM
> To: Steven Wilton
> Cc: 'Squid Developers'
> Subject: RE: Bug #1616: assertion
> failed:comm_generic.c:65:"F->flags.open"onstoreResumeFD.
>
> mån 2006-06-26 klockan 12:22 +0800 skrev Steven Wilton:
>
> > Are timeouts only looked at in the checkTimeouts()
> function? This resumes
> > any fd's before running the timeout function, which should
> avoid the error
> > condition.
>
> Yes, but it's only the fd which is resumed there, not the StoreEntry..
>
> Regards
> Henrik
>
In the original code for 2.5, I had the following logic in commResumeFD() to
handle this situation
if(!(F->read_handler) || !(F->epoll_backoff)) {
debug(5, 2) ("commResumeFD: fd=%d ignoring read_handler=%p,
epoll_backoff=%d\n",fd,F->read_handler,F->epoll_backoff);
F->epoll_backoff=0;
return;
}
I'm pretty sure I set the debug level to 2 because I was seeing hits to this
bit of code, but because it was being handled I was not worried about these
messages.
What about removing the backoff flag from the fde struct in fd_close(), and
removing the assert(flags.open) from commResumeFD. This way, if a fd is
backed off, then closed, the backoff flag will be removed. We are then left
with 2 possible situations:
- If the fd is backed off again, the flag will be re-added, and the fd will
be removed from the set of polled fd's.
- If the fd is not backed off again, then commResume will see that the
backoff flag is not set, and not actually do any work.
Even if commResume is called on an already open/closed FD, it will not do
any harm, as commUpdateEvents will only add/remove the fd if the read/write
handlers are set.
I've attached a patch which fixes the problem as described above.
Steven
-- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.9.4/375 - Release Date: 25/06/2006
This archive was generated by hypermail pre-2.1.9 : Fri Jun 30 2006 - 12:00:02 MDT