[Zope-CMF] no mem for new parser
Tres Seaver
tseaver@digicool.com
Sat, 28 Apr 2001 10:56:04 -0400
Norman Khine wrote:
>
> Hello I just gort this error and the server crashed.
>
> My set up
> Zope version: Zope 2.3.2b2 (source release, python 1.5.2, linux2)
> Python version: 2.0 (#2, Jan 8 2001, 16:54:34) [GCC 2.95.2 19991024
> (release)]
> System Platform: freebsd4
>
> no mem for new parser
> Traceback (most recent call last):
> File
> "/usr/home/khine/usr/local/Zope/lib/python/Products/CMFCore/DirectoryView
> .py", line 198, in getContents
>
> Any suggestions will be most appreciated
Hmm, the relevant bits of getContents are (both for CMF 1.0 and
the head of the CVS repository)::
# CMFCore/DirectoryView.py, line #97
try:
self.data = data = self.prepareContents(registry,
register_subdirs=changed)
except:
# DEBUG
import traceback
traceback.print_exc()
I can't see how that code could *possibly* yield the traceback
you post -- did you trim it at all? At any rate, that code is
broken; having caught the exception in order to print it, it
doesn't re-raise it. For the nonce, please try adding
raise
just below the last line of the snippet.
I find that error message deep in the bowels of the Python
2.0 C source::
# $PYTHON_2/Parser/parsetok.c, line #81
static node *
parsetok(struct tok_state *tok, grammar *g, int start
, perrdetail *err_ret)
{
parser_state *ps;
node *n;
int started = 0;
if ((ps = PyParser_New(g, start)) == NULL) {
fprintf(stderr, "no mem for new parser\n");
err_ret->error = E_NOMEM;
return NULL;
}
So, it looks like your system is running out of memory, but
the DirectoryView suppresses the error, and hence you get a core
dump.
Please submit a tracker issue for this problem:
http://www.zope.org/Products/PTK/Tracker
Do note your version of Python on the issue -- that was most
helpful for tracking down the source of the exception.
Tres.
--
===============================================================
Tres Seaver tseaver@digicool.com
Digital Creations "Zope Dealers" http://www.zope.org