[Zope-Coders] Re: ParsedXML spinning

Martijn Faassen faassen@vet.uu.nl
Tue, 15 Jan 2002 22:52:21 +0100


Martijn Faassen wrote:
> Matthew T. Kromer wrote:
> > Martijn Faassen wrote:
> > 
> > >Either get the version I released or the latest CVS version:
> > >
> > >http://www.zope.org/Members/faassen/ParsedXML
> > >
> > >http://cvs.zope.org/Products/ParsedXML/ParsedXML.tar.gz?tarball=1
> > 
> > OK I used the CVS tarball, inserted your timon.xml doc -- and still no 
> > crashes.  This is with the latest Zope 2.5 branch (this morning) with 
> > Python 2.1 -- I tried 2.1 with and without the ceval try:continue patch.
> > 
> > It is better than the one I was using before, which would NEVER figure 
> > out some answers.  This one still takes a while though.

Hm, this reminds me to ask; what actions did you take that would never
give a result? Just viewing the document in edit mode shouldn't
have improved, as it goes around the Zope proxying layer. What kind of 
test are you using?

> Yes, the whole parsing into the object database (and fetching from
> the object database, the whole document is one big persistent object..)
> takes a while.
> 
> I'll take a look at it with the newest Zope 2.5.

Okay, just took a look at the latest beta (with a version of Python 2.1 from
last week's CVS, so pretty recent), and the problem remains.

Do note that the problem doesn't occur when you go to the 'edit' tab;
the edit view is generated in plain Python and doesn't access the
DOM through the security machinery. You need to go to the DOM tab
and play with the tree view to see the crash; just
open the top node, open another one, and in a moderate-sized document
the crash will have occurred by now. Just opening a single node
will in fact already destablize Zope; click on some other URL and
Zope will generally crash. Note that you do seem to need a moderately
sized document to trigger this more quickly -- not sure why, though it
may be related to more proxy wrappers being generated.

This behavior is not specific to the tree view but is definitely related
to the DOM: if you write a python script that accesses the DOM it'll
also cause the crash. 

If you put ZOPE_SECURITY_POLICY to PYTHON it'll all work fine, however.

I've reproduced this behavior with various versions of Python 2.1 on
various Linux boxes (Red Hat, Debian).

Did you try this? I'd really like to know what the difference is between
our platforms if you don't experience this issue. Perhaps someone else
can try as well?
 
Regards,

Martijn