From: wessels <> Date: Tue, 9 Jan 2001 06:32:21 +0000 (+0000) Subject: assertion failed: forward.c:607: "e->store_status == STORE_PENDING". X-Git-Tag: SQUID_3_0_PRE1~1670 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=702fb6b95de92d51a1e63344ed22bbe069ab7659;p=thirdparty%2Fsquid.git assertion failed: forward.c:607: "e->store_status == STORE_PENDING". In ftpSendPasv() we call fwdComplete() for HEAD requests. I'm seeing some of these requests get aborted after reading on the control connection, and before calling fwdComplete(). Since the entry was aborted, its store_status is already set to STORE_OK and we get the assertion by calling fwdComplete() on this entry. --- diff --git a/src/ftp.cc b/src/ftp.cc index 19d4d8612c..5fa938713e 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -1,6 +1,6 @@ /* - * $Id: ftp.cc,v 1.305 2001/01/07 23:36:38 hno Exp $ + * $Id: ftp.cc,v 1.306 2001/01/08 23:32:21 wessels Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -1651,7 +1651,13 @@ ftpSendPasv(FtpStateData * ftpState) /* Terminate here for HEAD requests */ ftpAppendSuccessHeader(ftpState); storeTimestampsSet(ftpState->entry); - fwdComplete(ftpState->fwd); + /* + * On rare occasions I'm seeing the entry get aborted after + * ftpReadControlReply() and before here, probably when + * trying to write to the client. + */ + if (!EBIT_TEST(ftpState->entry->flags, ENTRY_ABORTED)) + fwdComplete(ftpState->fwd); ftpSendQuit(ftpState); return; }