Re: [SQU] Squid 2.4 Head FATAL: Received Segment Violation...dying

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Tue, 20 Feb 2001 23:56:21 +0100

Yuck.. a bad request combined with a POST/PUT request in a pipeline.
Touching all of the tricky areas more or less at once. The only good
thing is that pump.c is killed in Squid-2.5 in favor of a more
structured approach..

Suggestion: Try disabling the prefetch of pipelined requests. Thise are
quite error prone.

Attached is a small patch to add a squid.conf directive to control the
prefetch of pipelined requests..

--
Henrik Nordstrom
Squid hacker
Alejandro A. Ramirez wrote:
> 2001/02/20 10:48:39| parseHttpRequest: Requestheader contains NULL
> characters
> 2001/02/20 10:48:39| clientReadRequest: FD 3932 Invalid Request
> 2001/02/20 10:48:39| clientSendMoreData: Deferring error:invalid-request
> 2001/02/20 10:48:53| assertion failed: pump.c:361:
> "!fd_table[p->s_fd].flags.open"
> 
> Program received signal SIGABRT, Aborted.
> 0x4816a3bc in kill () from /usr/lib/libc.so.4
> (gdb) bt
> #0  0x4816a3bc in kill () from /usr/lib/libc.so.4
> #1  0x481a6026 in abort () from /usr/lib/libc.so.4
> #2  0x80674bb in xassert (msg=0x80d6ef3 "!fd_table[p->s_fd].flags.open",
>     file=0x80d67b9 "pump.c", line=361) at debug.c:250
> #3  0x8092a2f in pumpFree (fd=4698, data=0x24d52200) at pump.c:361
> #4  0x8064733 in commCallCloseHandlers (fd=4698) at comm.c:535
> #5  0x80648ca in comm_close (fd=4698) at comm.c:592
> #6  0x80927f0 in pumpClose (data=0x24d17500) at pump.c:321
> #7  0x809200c in pumpServerCopyComplete (fd=5363, bufnotused=0x0, size=0,
> errflag=-1,
>     data=0x24d17500) at pump.c:184
> #8  0x80633e4 in CommWriteStateCallbackAndFree (fd=5363, code=-1) at
> comm.c:98
> #9  0x806548a in commHandleWrite (fd=5363, data=0x16b4f8a0) at comm.c:845
> #10 0x80664e4 in comm_poll (msec=0) at comm_select.c:446
> #11 0x80882ed in main (argc=2, argv=0xbfbffc0c) at main.c:720
> #12 0x804a529 in _start ()
> (gdb) c
> Continuing.
> 
> Program terminated with signal SIGABRT, Aborted.
> The program no longer exists.
> (gdb) q
> 
> Script done on Tue Feb 20 10:55:12 2001
> 
> Greetings...
> Ales

? icons/anthony-binhex.gif
? icons/anthony-bomb.gif
? icons/anthony-box.gif
? icons/anthony-box2.gif
? icons/anthony-c.gif
? icons/anthony-compressed.gif
? icons/anthony-dir.gif
? icons/anthony-dirup.gif
? icons/anthony-dvi.gif
? icons/anthony-f.gif
? icons/anthony-image.gif
? icons/anthony-image2.gif
? icons/anthony-layout.gif
? icons/anthony-link.gif
? icons/anthony-movie.gif
? icons/anthony-pdf.gif
? icons/anthony-portal.gif
? icons/anthony-ps.gif
? icons/anthony-quill.gif
? icons/anthony-script.gif
? icons/anthony-sound.gif
? icons/anthony-tar.gif
? icons/anthony-tex.gif
? icons/anthony-text.gif
? icons/anthony-unknown.gif
? icons/anthony-xbm.gif
? icons/anthony-xpm.gif
Index: src/cf.data.pre
===================================================================
RCS file: /server/cvs-server/squid/squid/src/cf.data.pre,v
retrieving revision 1.214
diff -u -w -r1.214 cf.data.pre
--- src/cf.data.pre 2001/02/10 16:40:40 1.214
+++ src/cf.data.pre 2001/02/20 22:46:54
@@ -3492,6 +3492,16 @@
         disable persistent connections with clients and/or servers.
 DOC_END
 
+NAME: pipeline_prefetch
+TYPE: onoff
+LOC: Config.onoff.pipeline_prefetch
+DEFAULT: on
+DOC_START
+ To boost the performance of pipelined requests to closer
+ match that of a non-proxied environment Squid tries to fetch
+ up to two requests in parallell from a pipeline.
+DOC_END
+
 NAME: extension_methods
 TYPE: wordlist
 LOC: Config.ext_methods
Index: src/client_side.c
===================================================================
RCS file: /server/cvs-server/squid/squid/src/client_side.c,v
retrieving revision 1.527
diff -u -w -r1.527 client_side.c
--- src/client_side.c 2001/02/13 21:45:48 1.527
+++ src/client_side.c 2001/02/20 22:47:02
@@ -2672,7 +2672,7 @@
             break;
         /* Limit the number of concurrent requests to 2 */
         for (H = &conn->chr, nrequests = 0; *H; H = &(*H)->next, nrequests++);
- if (nrequests >= 2) {
+ if (nrequests >= (Config.onoff.pipeline_prefetch ? 2 : 1)) {
             debug(33, 3) ("clientReadRequest: FD %d max concurrent requests reached\n", fd);
             debug(33, 5) ("clientReadRequest: FD %d defering new request until one is done\n", fd);
             conn->defer.until = squid_curtime + 100; /* Reset when a request is complete */
Index: src/structs.h
===================================================================
RCS file: /server/cvs-server/squid/squid/src/structs.h,v
retrieving revision 1.383
diff -u -w -r1.383 structs.h
--- src/structs.h 2001/02/17 07:28:50 1.383
+++ src/structs.h 2001/02/20 22:47:06
@@ -536,6 +536,7 @@
         int log_ip_on_direct;
         int authenticateIpTTLStrict;
         int ie_refresh;
+ int pipeline_prefetch;
     } onoff;
     acl *aclList;
     struct {
Received on Tue Feb 20 2001 - 15:55:27 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:13:33 MST