Re: [Zope-dev] Re: Python2.4 and Zope 2.7

2004-10-18 Thread Tim Peters
[Matt Hamilton]
 Yes, I've tried increasing the stack size.  I think it is a platform
 specific problem for threads on FreeBSD/AMD64.  Regardless of how large
 I make the stack, or how low I set the recursionlimit, python 2.3.4
 cannot complete test_re.py sucessfully on this platform.

FYI, the sys module's recursion limit only kicks in when Python
functions are calling Python functions.  The re engine is coded
entirely in C, and recursions at the C level don't count toward the
sys module's recursion limit.  IOW, only the stack size is relevant
for test_re in 2.3.4.

 I've tried bringing it up on the FreeBSD lists, but not got much of a
 response.  Python 2.4a3 must do *something* different with threads, as
 it can complete test_re.py on the same platform.

test_re is probably a red herring here:  starting with 2.4a1, Python's
re C implementation became *far* less recursive than prior
implementations.  IOW, running test_re under 2.4 is a very different
(and much easier on the stack) thing than running test_re under 2.3. 
So looking at test_re alone doesn't really imply anything about
threads.

The biggest stack hog in 2.4's test suite is the new test_compiler,
but it takes so long it only runs a subset by default.  Pass -u all
test_compiler to regrtest.py to run the whole thing.  If that passes
(== no output other than 1 test OK.)-- and it should --that's a
severe test of both the C stack and sys's recursion limit.

 I've tried backporting over thread_pthread.py from 2.4a3, but that doesn't do it.  I
 think there may be extra defines set in the Makefile or configure.

Possibly, but I'm not optimistic about that line.  That test_re failed
in 2.3.4 said you have stack problems.  That test_re passed in 2.4
just says that 2.4's re implementation doesn't stress the stack
anymore.  But (the full) test_compiler does, so I'm betting that blows
up under 2.4 for you.
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Python2.4 and Zope 2.7

2004-10-17 Thread Matt Hamilton
chrism wrote:
FWIW, the fact that you get the error at that point means that
cDocumentTemplate can't be imported (it's using pDocumentTemplate, which
nobody uses since it's a fallback).  This is probably the root of the
problem.  I suspect pDocumentTemplate would give the same error on any
platform.  I would start investigating why cDocumentTemplate fails to
import.
Doh!  I bet it is because I have copied over the install from one of our 
other servers, and the C components will have been compiled with py2.3, 
and hence probably not imported successfully into py2.4.

Before I realised this I did a fresh install, using Zope 2.7.3b2 and 
py2.4a3 and after I got all the modules I needed recompiled for py2.4 
(PIL, GD, 4Suite, etc.) I started Zope and is still crashed with a Bus 
Error.  Which was what I was getting with py2.3 on FreeBSD/AMD64.  So it 
looks like it just gets a little further with py2.4, but there are still 
problems.  I'll try and get the recursion limit a bit lower and see if 
that helps it get through.

-Matt
--
Matt Hamilton   [EMAIL PROTECTED]
Netsight Internet Solutions, Ltd.Business Vision on the Internet
http://www.netsight.co.uk +44 (0)117 9090901
Web Design | Zope/Plone Development  Consulting | Co-location | Hosting
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Python2.4 and Zope 2.7

2004-10-17 Thread Tres Seaver
Matt Hamilton wrote:
chrism wrote:
FWIW, the fact that you get the error at that point means that
cDocumentTemplate can't be imported (it's using pDocumentTemplate, which
nobody uses since it's a fallback).  This is probably the root of the
problem.  I suspect pDocumentTemplate would give the same error on any
platform.  I would start investigating why cDocumentTemplate fails to
import.

Doh!  I bet it is because I have copied over the install from one of our 
other servers, and the C components will have been compiled with py2.3, 
and hence probably not imported successfully into py2.4.

Before I realised this I did a fresh install, using Zope 2.7.3b2 and 
py2.4a3 and after I got all the modules I needed recompiled for py2.4 
(PIL, GD, 4Suite, etc.) I started Zope and is still crashed with a Bus 
Error.  Which was what I was getting with py2.3 on FreeBSD/AMD64.  So it 
looks like it just gets a little further with py2.4, but there are still 
problems.  I'll try and get the recursion limit a bit lower and see if 
that helps it get through.
Are  you sure that you have applied whatever patch is required to give 
Python a big enough stack on FreeBSD (Hmm, I foresee a new spam topic, 
Enlarge your Python's Stack!  Make your Zope beg for mercy! ;)

Strange crashes reproducible only on *BSD should be checked first 
against this one:

  http://mail.python.org/pipermail/python-list/2003-February/148277.html
Tres.
--
===
Tres Seaver[EMAIL PROTECTED]
Zope Corporation  Zope Dealers   http://www.zope.com
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )