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