Cool.  Although my scripts are still taking down AS periodically after
having removed any uses of 'cd'.  Is there any trick to forcing /
allowing AS to create cores under Linux?  I've made sure that it was
being started in a directory that 'nsadmin' has write access to and that
ulimit -c was non-zero.

Is there a list of Tcl commands that aren't threadsafe and thus
shouldn't be used in AS?

Thanks much.

seth

Jim Wilcoxson wrote:
The "cd" TCL command does not work in AOLServer, because all threads share the same
working directory.  When executed in multiple threads simulataneously, you have a
race condition.

We do this in _init.tcl, the first modules we load with AS:

rename cd {}

That disables the cd command altogether, which is what you want, because it doesn't
work.

Jim


Hi.

I've been experiencing a couple of problems with AOLServer.  Running
apachebench with a concurrency of 2 or more would eventually cause
AOLServer to crash on this script:

<%
cd /usr/local/aol32/servers/server1/pages/newspapers/cache/169/
puts [glob -nocomplain "1_*.js"]
%>

Strangely, when I shorten the directory that it is cd'ing to, it doesn't
crash.

Also, when running this script under load, AOLServer crashes with the
following tcl error (which appears in generic/tclObj.c):

<%
cd /usr/local/aol32/servers/server1/pages/newspapers/cache/169/
puts [pwd]
%>

UpdateStringProc should not be invoked for type cmdName

I'm also getting the following error in production (can't reliably
reproduce it) (though I'm not sure that the two are related, as the
first stopped when I rewrote the relevant code to avoid use of glob
(though if 'cd' is the problem...)):
alloc: invalid block: 0x40100d94: 3c 40 0

Sometimes it will run for hours without crashing; other times it will
crash twice in a 5-minute period (all while under fairly significant
load).  It's almost always the same memory address, if that provides any
additional insight.

Thanks for any ideas you can provide.

seth


Reply via email to