It looked to me like AS only truncated the outputheader set (deleted
its contents) when cleaning up a connection.

I think this crash is specifically related to the set swap that occurs
when using the -headers option.  Omit that and it works fine.

Unfortunately, correcting this did not fix the dreaded "malformed
bucket chain" crash in Tcl_DeleteHashEntry.  Our site is being blasted
by Inktomi and is crashing every 15 minutes for the last few days...
I added some code in Tcl_DeleteHashEntry just before the panic call to
log the URL & args being processed when this occurs.

I'd welcome some tips from a TCL guru to explain how to throw a TCL
error and/or get some kind of useful trace/debug information, like
what table the thing is barfing on.

Jim


>
> Yeah I was running into this bug about a month back.  When you ns_respond,
> AOLServer frees the outputheaders, but [ns_conn outputheaders] still
> returns a valid setId, so when you deal in the output headers after an
> ns_respond, you crash the server.
>
> -T
>
> On Sun, 9 Jun 2002 18:35:04 -0700, Jim Wilcoxson <[EMAIL PROTECTED]> wrote:
>
> >For an esoteric reason which I won't go into, we were doing something that
> >occasionally caused server crashes.  It caused them in 2.3.3, and it causes
> >them in 3.4.
> >
> >The problem seems to be using -headers, which eventually calls
> >Ns_ConnReplaceHeaders (return.c) from NsTclRespondCmd (tclresp.c).  If the
> >-headers argument is omitted, it works okay.
> >
> >
> >Here is a test case:
> >
> >set setid [ns_conn outputheaders]
> >   ns_log notice "tst: setid=$setid"
> >ns_set put $setid abc def
> >   ns_log notice "tst: put abc:def into set $setid; doing ns_respond"
> >set newset [ns_set copy [ns_conn outputheaders]]
> >ns_respond -status 200 -type text/plain -string "hi" -headers $newset
> >   ns_log notice tst: back from ns_respond #1"
> >set setid [ns_conn outputheaders]
> >   ns_log notice "tst: setid=$setid"
> >ns_set put $setid abc def
> >ns_log notice "tst: done"
> >return
> >
> >
> >Here is the server log:
> >
> >[09/Jun/2002:18:25:44][13118.9226][-conn4-] Notice: tst: setid=t1
> >[09/Jun/2002:18:25:44][13118.9226][-conn4-] Notice: tst: put abc:def into
> set t1; doing ns_respond
> >[09/Jun/2002:18:25:44][13118.9226][-conn4-] Notice: tst: back from
> ns_respond #1"
> >[09/Jun/2002:18:25:44][13118.9226][-conn4-] Notice: tst: setid=t1
> >nsthread(13131) error: Ns_Pool: invalid block: 0x8c6ecf8
> >[09/Jun/2002:18:25:45][14779.1024][-main-] Notice: nsmain: AOLserver/3.4
> starting
> >
> >The exact error message varies: one time it said it couldn't allocate
> >635xxxxxx bytes of memory.  Yeah, I could see how that might be tough on
> our
> >dev server...
> >
> >Jim
>

Reply via email to