[egenix-users] seg fault on import mx.DateTime Python2.3.3 egenix-base-2.0.5

Jacob Smullyan smulloni at smullyan.org
Wed Feb 11 13:53:20 CET 2004


On Wed, Feb 11, 2004 at 06:45:19PM +0000, M.-A. Lemburg wrote:
> Jacob Smullyan wrote:
> >Hello --
> >
> >To provide some more (circumstantial) evidence that there is a real
> >bug associated with MXDATETIME_FREELIST:
> >
> >For some time I've been trying to figure out why skunkweb dumps core
> >on Python 2.3.x on Linux x86 (about one in a thousand requests in
> >typical use). The core files showed an attempt to free an invalid
> >pointer, but I could find the smoking gun that tied it to any
> >particular module.  (Alas, I don't know enough to debug this very
> >well.)  By process of elimination, however, I think I've found that
> >the culprit was mx.DateTime (in either 2.0.5 or 2.1.0 incarnations);
> >after rewriting skunkweb so it could run without it, the segfault went
> >away.  Furthermore, the tests I am running right now suggest that
> >undefing MXDATETIME_FREELIST seems to solve the problem.  I'll perform
> >more testing and report back if this is a red herring, but at this
> >point that would be statistically unlikely.
> >
> >Incidentally, I've tested with different compilers (gcc 2.95.3,
> >3.2.3), different 2.3 releases, different configure and CFLAGS, etc.,
> >and the bug is reproducible across the board.  
> 
> Hmm, I've just tried egenix-mx-base 2.0.5, Python 2.3.3, all
> compiled with gcc 3.3 -O3 and don't see any problems (apart from
> a few deprecation warnings in the test script).
> 
> The fact that compiling the package with -O0 suggests that
> something is wrong with the way the optimizer works on your
> machines which is unfortunately not uncommon with gcc these days.

I don't know how to fill in the ellipsis "The fact that compiling the
package with -O0 suggests ...".  Has it been reported that compiling
mx.DateTime with -O0 solves the problem?  I've tried fiddling with
optimization flags and have *not* seen an improvement.  BTW, I never
had a problem with Python 2.2 (without pymalloc; I haven't tried 2.2
with pymalloc).

I don't have a test script to reproduce the segfault, save running
skunkweb and pounding it with siege, and the only evidence I have that
DateTime is a factor is that not using it (or using this patched
version) makes the segfaults go away.  I'm sorry not to have a meatier
or more precise lead for you!

js




More information about the egenix-users mailing list