Re: squid-2.HEAD: fwdComplete/Fail before comm_close
Hiya, Could you please verify this is still a problem in the latest 2.HEAD and if so lodge a bugzilla bug report with the patch? Thanks! Adrian 2008/8/5 Alexander V. Lukyanov <[EMAIL PROTECTED]>: > Hello! > > Some time ago I had core dumps just after these messages: >Short response from ... >httpReadReply: Excess data from ... > > I beleave this patch fixes these problems. > > Index: http.c > === > RCS file: /squid/squid/src/http.c,v > retrieving revision 1.446 > diff -u -p -r1.446 http.c > --- http.c 25 Jun 2008 22:11:20 - 1.446 > +++ http.c 5 Aug 2008 06:05:29 - > @@ -755,6 +757,7 @@ httpAppendBody(HttpStateData * httpState > /* Is it a incomplete reply? */ > if (httpState->chunk_size > 0) { >debug(11, 2) ("Short response from '%s' on port %d. Expecting %" > PRINTF_OFF_T " octets more\n", storeUrl(entry), comm_local_port(fd), > httpState->chunk_size); > + fwdFail(httpState->fwd, errorCon(ERR_INVALID_RESP, HTTP_BAD_GATEWAY, > httpState->fwd->request)); >comm_close(fd); >return; > } > @@ -774,6 +777,7 @@ httpAppendBody(HttpStateData * httpState >("httpReadReply: Excess data from \"%s %s\"\n", >RequestMethods[orig_request->method].str, >storeUrl(entry)); > + fwdComplete(httpState->fwd); >comm_close(fd); >return; > } > >
Re: squid-2.HEAD: fwdComplete/Fail before comm_close
On Fri, Aug 08, 2008 at 11:57:03PM +0200, Henrik Nordstrom wrote: > Can you please file a bug report on this? Preferably with a stack trace > of the crash if possible.. Unfortunately, the core dump was corrupted that time. And yes, it was before 22/07. > The second change looks wrong and should be a fwdFail.. I used fwdComplete so that the excess data will be just ignored. E.g. when the server sends reply to HEAD request and for any reason adds some data to it (in violation of the protocol), squid could still forward the reply without the data. OTOH it is very rare and does not matter much. It would be fine with fwdFail too. -- Alexander.
Re: squid-2.HEAD: fwdComplete/Fail before comm_close
Can you please file a bug report on this? Preferably with a stack trace of the crash if possible.. also if this 2.HEAD was from before 22/7 then please test again as there was a number of very related fixes on the 21/7. The second change looks wrong and should be a fwdFail.. The first change looks fine. Regards Henrik On tis, 2008-08-05 at 10:11 +0400, Alexander V. Lukyanov wrote: > Hello! > > Some time ago I had core dumps just after these messages: > Short response from ... > httpReadReply: Excess data from ... > > I beleave this patch fixes these problems. > > Index: http.c > === > RCS file: /squid/squid/src/http.c,v > retrieving revision 1.446 > diff -u -p -r1.446 http.c > --- http.c25 Jun 2008 22:11:20 - 1.446 > +++ http.c5 Aug 2008 06:05:29 - > @@ -755,6 +757,7 @@ httpAppendBody(HttpStateData * httpState > /* Is it a incomplete reply? */ > if (httpState->chunk_size > 0) { > debug(11, 2) ("Short response from '%s' on port %d. Expecting %" > PRINTF_OFF_T " octets more\n", storeUrl(entry), comm_local_port(fd), > httpState->chunk_size); > + fwdFail(httpState->fwd, errorCon(ERR_INVALID_RESP, HTTP_BAD_GATEWAY, > httpState->fwd->request)); > comm_close(fd); > return; > } > @@ -774,6 +777,7 @@ httpAppendBody(HttpStateData * httpState > ("httpReadReply: Excess data from \"%s %s\"\n", > RequestMethods[orig_request->method].str, > storeUrl(entry)); > + fwdComplete(httpState->fwd); > comm_close(fd); > return; > } signature.asc Description: This is a digitally signed message part
squid-2.HEAD: fwdComplete/Fail before comm_close
Hello! Some time ago I had core dumps just after these messages: Short response from ... httpReadReply: Excess data from ... I beleave this patch fixes these problems. Index: http.c === RCS file: /squid/squid/src/http.c,v retrieving revision 1.446 diff -u -p -r1.446 http.c --- http.c 25 Jun 2008 22:11:20 - 1.446 +++ http.c 5 Aug 2008 06:05:29 - @@ -755,6 +757,7 @@ httpAppendBody(HttpStateData * httpState /* Is it a incomplete reply? */ if (httpState->chunk_size > 0) { debug(11, 2) ("Short response from '%s' on port %d. Expecting %" PRINTF_OFF_T " octets more\n", storeUrl(entry), comm_local_port(fd), httpState->chunk_size); + fwdFail(httpState->fwd, errorCon(ERR_INVALID_RESP, HTTP_BAD_GATEWAY, httpState->fwd->request)); comm_close(fd); return; } @@ -774,6 +777,7 @@ httpAppendBody(HttpStateData * httpState ("httpReadReply: Excess data from \"%s %s\"\n", RequestMethods[orig_request->method].str, storeUrl(entry)); + fwdComplete(httpState->fwd); comm_close(fd); return; }