From ross at principia.edu Thu Feb 5 22:17:38 2004
From: ross at principia.edu (Ross Brattain)
Date: Fri Jan 13 11:13:21 2006
Subject: [egenix-users]
seg fault on import mx.DateTime Python2.3.3 egenix-base-2.0.5
Message-ID: <87fzdon33x.fsf@maas-neotek.comcast.net>
My usual runtime environment is Python 2.2.3 and egenix-base-2.0.4.
I'm update everything and was surprised with this seg fault.
-Ross B.
Debian unstable
# gcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
Thread model: posix
gcc version 3.3.3 20040125 (prerelease) (Debian)
Python 2.3.3 (#1, Feb 5 2004, 21:57:53)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mx.DateTime
zsh: segmentation fault (core dumped) /charting/bin/python2.3
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
#1 0x402ee68a in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:3998
#2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b78c4, kw=0x1) at Objects/methodobject.c:108
#3 0x080aa664 in call_function (pp_stack=0xbfffcecc, oparg=1) at Python/ceval.c:3439
#4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
#5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b5760, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd8e0 "mx.DateTime.DateTime", co=0x402b5760, pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#8 0x080cdb53 in load_source_module (name=0xbfffd8e0 "mx.DateTime.DateTime", pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
#9 0x080cb8be in load_module (name=0xbfffd8e0 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd450 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
#10 0x080cc7b8 in import_submodule (mod=0x4026138c, subname=0xbfffd8ec "DateTime", fullname=0xbfffd8e0 "mx.DateTime.DateTime") at Python/import.c:2290
#11 0x080cc2e3 in load_next (mod=0x4026138c, altmod=0x8116160, p_name=0xbfffd8ec, buf=0xbfffd8e0 "mx.DateTime.DateTime", p_buflen=0xbfffd8dc) at Python/import.c:2111
#12 0x080ce319 in import_module_ex (name=0x0, globals=0x1, locals=0x402a5dfc, fromlist=0x4028750c) at Python/import.c:1957
#13 0x080cd38c in PyImport_ImportModuleEx (name=0x1
, globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
#14 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
#15 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x402aeeb4, kw=0x1) at Objects/methodobject.c:108
#16 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
#17 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x402aeeb4, kw=0x40269bec) at Python/ceval.c:3346
#18 0x080a8794 in eval_frame (f=0x818b02c) at Python/ceval.c:1996
#19 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7b20, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#20 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#21 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffece0 "mx.DateTime", co=0x402a7b20, pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
#22 0x080cdb53 in load_source_module (name=0xbfffece0 "mx.DateTime", pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc", fp=0x81632a0) at Python/import.c:894
#23 0x080cb8be in load_module (name=0xbfffece0 "mx.DateTime", fp=0x81632a0, buf=0xbfffe3c0 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.py", type=1, loader=0x1) at Python/import.c:1699
#24 0x080ce051 in load_package (name=0xbfffece0 "mx.DateTime", pathname=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime") at Python/import.c:951
#25 0x080cb9ed in load_module (name=0xbfffece0 "mx.DateTime", fp=0xbfffe850, buf=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime", type=5, loader=0x1) at Python/import.c:1722
#26 0x080cc7b8 in import_submodule (mod=0x40261374, subname=0xbfffece3 "DateTime", fullname=0xbfffece0 "mx.DateTime") at Python/import.c:2290
#27 0x080cc2e3 in load_next (mod=0x40261374, altmod=0x40261374, p_name=0xbfffece3, buf=0xbfffece0 "mx.DateTime", p_buflen=0xbfffecdc) at Python/import.c:2111
#28 0x080ce40f in import_module_ex (name=0x0, globals=0x1, locals=0x4027879c, fromlist=0x8116160) at Python/import.c:1964
#29 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
#30 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
#31 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x4028075c, kw=0x1) at Objects/methodobject.c:108
#32 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
#33 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x4028075c, kw=0x40269bec) at Python/ceval.c:3346
#34 0x080a8794 in eval_frame (f=0x8183a54) at Python/ceval.c:1996
#35 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7320, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#36 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#37 0x080d7d1b in run_node (n=0x4027879c, filename=0x1 , globals=0x1, locals=0x1, flags=0x1) at Python/pythonrun.c:1265
#38 0x080d724e in PyRun_InteractiveOneFlags (fp=0x1, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:757
#39 0x080d7043 in PyRun_InteractiveLoopFlags (fp=0x40254e20, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:690
#40 0x080d8642 in PyRun_AnyFileExFlags (fp=0x40254e20, filename=0x80ff46a "", closeit=0, flags=0xbffff428) at Python/pythonrun.c:653
#41 0x08054e35 in Py_Main (argc=0, argv=0xbffff4d4) at Modules/main.c:415
#42 0x0805498b in main (argc=1, argv=0x1) at Modules/python.c:23
From mal at egenix.com Fri Feb 6 10:05:49 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri Jan 13 11:13:21 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87fzdon33x.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
Message-ID: <402358ED.2060401@egenix.com>
Ross Brattain wrote:
>
> My usual runtime environment is Python 2.2.3 and egenix-base-2.0.4.
> I'm update everything and was surprised with this seg fault.
Are you using a Python version that's compiled with debug
mode enabled (or have you used such a Python version to
compile mxDateTime) ?
> -Ross B.
>
>
> Debian unstable
>
> # gcc -v
> Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs
> Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
> Thread model: posix
> gcc version 3.3.3 20040125 (prerelease) (Debian)
>
>
> Python 2.3.3 (#1, Feb 5 2004, 21:57:53)
> [GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>
>>>>import mx.DateTime
>
> zsh: segmentation fault (core dumped) /charting/bin/python2.3
>
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
> #1 0x402ee68a in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:3998
> #2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b78c4, kw=0x1) at Objects/methodobject.c:108
> #3 0x080aa664 in call_function (pp_stack=0xbfffcecc, oparg=1) at Python/ceval.c:3439
> #4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
> #5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b5760, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd8e0 "mx.DateTime.DateTime", co=0x402b5760, pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
> #8 0x080cdb53 in load_source_module (name=0xbfffd8e0 "mx.DateTime.DateTime", pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
> #9 0x080cb8be in load_module (name=0xbfffd8e0 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd450 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
> #10 0x080cc7b8 in import_submodule (mod=0x4026138c, subname=0xbfffd8ec "DateTime", fullname=0xbfffd8e0 "mx.DateTime.DateTime") at Python/import.c:2290
> #11 0x080cc2e3 in load_next (mod=0x4026138c, altmod=0x8116160, p_name=0xbfffd8ec, buf=0xbfffd8e0 "mx.DateTime.DateTime", p_buflen=0xbfffd8dc) at Python/import.c:2111
> #12 0x080ce319 in import_module_ex (name=0x0, globals=0x1, locals=0x402a5dfc, fromlist=0x4028750c) at Python/import.c:1957
> #13 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
> #14 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
> #15 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x402aeeb4, kw=0x1) at Objects/methodobject.c:108
> #16 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
> #17 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x402aeeb4, kw=0x40269bec) at Python/ceval.c:3346
> #18 0x080a8794 in eval_frame (f=0x818b02c) at Python/ceval.c:1996
> #19 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7b20, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #20 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #21 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffece0 "mx.DateTime", co=0x402a7b20, pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
> #22 0x080cdb53 in load_source_module (name=0xbfffece0 "mx.DateTime", pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc", fp=0x81632a0) at Python/import.c:894
> #23 0x080cb8be in load_module (name=0xbfffece0 "mx.DateTime", fp=0x81632a0, buf=0xbfffe3c0 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.py", type=1, loader=0x1) at Python/import.c:1699
> #24 0x080ce051 in load_package (name=0xbfffece0 "mx.DateTime", pathname=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime") at Python/import.c:951
> #25 0x080cb9ed in load_module (name=0xbfffece0 "mx.DateTime", fp=0xbfffe850, buf=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime", type=5, loader=0x1) at Python/import.c:1722
> #26 0x080cc7b8 in import_submodule (mod=0x40261374, subname=0xbfffece3 "DateTime", fullname=0xbfffece0 "mx.DateTime") at Python/import.c:2290
> #27 0x080cc2e3 in load_next (mod=0x40261374, altmod=0x40261374, p_name=0xbfffece3, buf=0xbfffece0 "mx.DateTime", p_buflen=0xbfffecdc) at Python/import.c:2111
> #28 0x080ce40f in import_module_ex (name=0x0, globals=0x1, locals=0x4027879c, fromlist=0x8116160) at Python/import.c:1964
> #29 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
> #30 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
> #31 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x4028075c, kw=0x1) at Objects/methodobject.c:108
> #32 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
> #33 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x4028075c, kw=0x40269bec) at Python/ceval.c:3346
> #34 0x080a8794 in eval_frame (f=0x8183a54) at Python/ceval.c:1996
> #35 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7320, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #36 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #37 0x080d7d1b in run_node (n=0x4027879c, filename=0x1 , globals=0x1, locals=0x1, flags=0x1) at Python/pythonrun.c:1265
> #38 0x080d724e in PyRun_InteractiveOneFlags (fp=0x1, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:757
> #39 0x080d7043 in PyRun_InteractiveLoopFlags (fp=0x40254e20, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:690
> #40 0x080d8642 in PyRun_AnyFileExFlags (fp=0x40254e20, filename=0x80ff46a "", closeit=0, flags=0xbffff428) at Python/pythonrun.c:653
> #41 0x08054e35 in Py_Main (argc=0, argv=0xbffff4d4) at Modules/main.c:415
> #42 0x0805498b in main (argc=1, argv=0x1) at Modules/python.c:23
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 06 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Fri Feb 6 16:16:58 2004
From: ross at principia.edu (Ross Brattain)
Date: Fri Jan 13 11:13:21 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402358ED.2060401@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com>
Message-ID: <87d68rg2v9.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
> Are you using a Python version that's compiled with debug
> mode enabled (or have you used such a Python version to
> compile mxDateTime) ?
>
No, just vanilla ./configure.
I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
Because of this line from the backtrace:
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
mxDateTime.c:333 :
#ifdef MXDATETIME_FREELIST
if (mxDateTime_FreeList) {
datetime = mxDateTime_FreeList;
mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
datetime->ob_type = &mxDateTime_Type;
-> _Py_NewReference(datetime);
}
else
#endif
{
datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
if (datetime == NULL)
return NULL;
}
I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
--- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
+++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
@@ -76,7 +76,7 @@
#define STRFTIME_OUTPUT_SIZE 1024
/* Define these to have the module use free lists (saves malloc calls) */
-#define MXDATETIME_FREELIST
+#undef MXDATETIME_FREELIST
#define MXDATETIMEDELTA_FREELIST
/* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
This is not the root cause because, as mentioned, a rebuild of
Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
problem.
My working production environment (different machine) is:
Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
[GCC 3.2.3 20030415 (Debian prerelease)] on linux2
and egenix-base-2.0.4
I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
works.
So is it a gcc problem?
-Ross B.
From ross at principia.edu Fri Feb 6 16:17:41 2004
From: ross at principia.edu (Ross Brattain)
Date: Fri Jan 13 11:13:21 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402358ED.2060401@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com>
Message-ID: <87r7x7eo9m.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
>
> Are you using a Python version that's compiled with debug
> mode enabled (or have you used such a Python version to
> compile mxDateTime) ?
>
Another data point:
Python 2.3.3 (#1, Feb 6 2004, 01:59:49)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
built from:
egenix-mx-base-2.1.0-2003-07-29.zip
(gdb) bt
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:341
#1 0x402eeaba in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:4091
#2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b7914, kw=0x1) at Objects/methodobject.c:108
#3 0x080aa664 in call_function (pp_stack=0xbfffcefc, oparg=1) at Python/ceval.c:3439
#4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
#5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b47a0, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd910 "mx.DateTime.DateTime", co=0x402b47a0, pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#8 0x080cdb53 in load_source_module (name=0xbfffd910 "mx.DateTime.DateTime", pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
#9 0x080cb8be in load_module (name=0xbfffd910 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd480 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
-Ross B.
From mal at egenix.com Mon Feb 9 11:31:50 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri Jan 13 11:13:21 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87ptcsldts.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87ptcsldts.fsf@maas-neotek.comcast.net>
Message-ID: <40276FA6.6030206@egenix.com>
Ross Brattain wrote:
> "M.-A. Lemburg" writes:
>
>
>>Are you using a Python version that's compiled with debug
>>mode enabled (or have you used such a Python version to
>>compile mxDateTime) ?
>>
>
>
> Another data point:
Could you try compiling the package with optimizations disabled
(-O0) ?!
> Python 2.3.3 (#1, Feb 6 2004, 01:59:49)
> [GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
>
> built from:
> egenix-mx-base-2.1.0-2003-07-29.zip
>
> (gdb) bt
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:341
> #1 0x402eeaba in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:4091
> #2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b7914, kw=0x1) at Objects/methodobject.c:108
> #3 0x080aa664 in call_function (pp_stack=0xbfffcefc, oparg=1) at Python/ceval.c:3439
> #4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
> #5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b47a0, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd910 "mx.DateTime.DateTime", co=0x402b47a0, pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
> #8 0x080cdb53 in load_source_module (name=0xbfffd910 "mx.DateTime.DateTime", pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
> #9 0x080cb8be in load_module (name=0xbfffd910 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd480 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
>
> -Ross B.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 09 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Mon Feb 9 11:59:21 2004
From: ross at principia.edu (Ross Brattain)
Date: Fri Jan 13 11:13:21 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <40276FA6.6030206@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87ptcsldts.fsf@maas-neotek.comcast.net>
<40276FA6.6030206@egenix.com>
Message-ID: <87ekt4f2hy.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
> Could you try compiling the package with optimizations disabled
> (-O0) ?!
Python 2.3.3 (#3, Feb 9 2004, 11:51:59)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mx.DateTime
>>> print mx.DateTime.__version__
2.1.0
Vanilla python 2.3.3 build
egenix-mx-base-2.1.0-2003-07-29.zip built with -O0
-Ross B.
From smulloni at smullyan.org Wed Feb 11 12:41:18 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Fri Jan 13 11:13:21 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87d68rg2v9.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
Message-ID: <20040211174118.GA31434@smullyan.org>
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.
I can provide core files, backtraces, etc., upon request.
Cheers,
Jacob Smullyan
On Fri, Feb 06, 2004 at 04:16:58PM -0800, Ross Brattain wrote:
> "M.-A. Lemburg" writes:
>
> > Are you using a Python version that's compiled with debug
> > mode enabled (or have you used such a Python version to
> > compile mxDateTime) ?
> >
>
> No, just vanilla ./configure.
>
> I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
>
> Because of this line from the backtrace:
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
>
> mxDateTime.c:333 :
>
> #ifdef MXDATETIME_FREELIST
> if (mxDateTime_FreeList) {
> datetime = mxDateTime_FreeList;
> mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
> datetime->ob_type = &mxDateTime_Type;
> -> _Py_NewReference(datetime);
> }
> else
> #endif
> {
> datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
> if (datetime == NULL)
> return NULL;
> }
>
> I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
>
> --- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
> +++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
> @@ -76,7 +76,7 @@
> #define STRFTIME_OUTPUT_SIZE 1024
>
> /* Define these to have the module use free lists (saves malloc calls) */
> -#define MXDATETIME_FREELIST
> +#undef MXDATETIME_FREELIST
> #define MXDATETIMEDELTA_FREELIST
>
> /* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
>
>
> This is not the root cause because, as mentioned, a rebuild of
> Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
> problem.
>
> My working production environment (different machine) is:
> Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
> [GCC 3.2.3 20030415 (Debian prerelease)] on linux2
>
> and egenix-base-2.0.4
>
> I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
> works.
>
> So is it a gcc problem?
>
> -Ross B.
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
>
From mal at egenix.com Wed Feb 11 18:45:19 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri Jan 13 11:13:21 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <20040211174118.GA31434@smullyan.org>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
<20040211174118.GA31434@smullyan.org>
Message-ID: <402A783F.6010909@egenix.com>
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 can provide core files, backtraces, etc., upon request.
>
> Cheers,
>
> Jacob Smullyan
>
> On Fri, Feb 06, 2004 at 04:16:58PM -0800, Ross Brattain wrote:
>
>>"M.-A. Lemburg" writes:
>>
>>
>>>Are you using a Python version that's compiled with debug
>>>mode enabled (or have you used such a Python version to
>>>compile mxDateTime) ?
>>>
>>
>>No, just vanilla ./configure.
>>
>>I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
>>
>>Because of this line from the backtrace:
>>#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
>>
>>mxDateTime.c:333 :
>>
>>#ifdef MXDATETIME_FREELIST
>> if (mxDateTime_FreeList) {
>> datetime = mxDateTime_FreeList;
>> mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
>> datetime->ob_type = &mxDateTime_Type;
>>-> _Py_NewReference(datetime);
>> }
>> else
>>#endif
>> {
>> datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
>> if (datetime == NULL)
>> return NULL;
>> }
>>
>>I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
>>
>>--- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
>>+++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
>>@@ -76,7 +76,7 @@
>> #define STRFTIME_OUTPUT_SIZE 1024
>>
>> /* Define these to have the module use free lists (saves malloc calls) */
>>-#define MXDATETIME_FREELIST
>>+#undef MXDATETIME_FREELIST
>> #define MXDATETIMEDELTA_FREELIST
>>
>> /* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
>>
>>
>>This is not the root cause because, as mentioned, a rebuild of
>>Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
>>problem.
>>
>>My working production environment (different machine) is:
>>Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
>>[GCC 3.2.3 20030415 (Debian prerelease)] on linux2
>>
>>and egenix-base-2.0.4
>>
>>I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
>>works.
>>
>>So is it a gcc problem?
>>
>>-Ross B.
>>
>>_______________________________________________________________________
>>eGenix.com User Mailing List http://www.egenix.com/
>>http://lists.egenix.com/mailman/listinfo/egenix-users
>>
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 11 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From smulloni at smullyan.org Wed Feb 11 13:53:20 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Fri Jan 13 11:13:21 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402A783F.6010909@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
<20040211174118.GA31434@smullyan.org> <402A783F.6010909@egenix.com>
Message-ID: <20040211185320.GA31997@smullyan.org>
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
From egrubbs at rackspace.com Thu Feb 19 12:10:39 2004
From: egrubbs at rackspace.com (Edwin Grubbs)
Date: Fri Jan 13 11:13:21 2006
Subject: [egenix-users] DateTimeFrom parser error
Message-ID: <20040219181039.GX5971@rackspace.com>
I get parse error when parsing a date in this format when the hour is
"12".
>>> from mx.DateTime import DateTimeFrom
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
Traceback (most recent call last):
File "", line 1, in ?
File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
return Parser.DateTimeFromString(arg)
File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
raise DateTime.RangeError,\
mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
>>>
But parsing 11 o'clock works fine:
>>> DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>>>
-Edwin
From Jim.Vickroy at noaa.gov Thu Feb 19 11:20:18 2004
From: Jim.Vickroy at noaa.gov (Jim Vickroy)
Date: Fri Jan 13 11:13:21 2006
Subject: [egenix-users] DateTimeFrom parser error
References: <20040219181039.GX5971@rackspace.com>
Message-ID: <4034FE62.2E888FBC@noaa.gov>
Me too.
But eliminating the "PM" designator does not fail:
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 CST')
>>>
My system:
Microsoft Windows 2000
Python 2.3.3
egenix-mx-base-2.0.5.win32-py2.3.exe
Edwin Grubbs wrote:
> I get parse error when parsing a date in this format when the hour is
> "12".
>
> >>> from mx.DateTime import DateTimeFrom
> >>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
> Traceback (most recent call last):
> File "", line 1, in ?
> File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
> return Parser.DateTimeFromString(arg)
> File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
> raise DateTime.RangeError,\
> mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
> >>>
>
> But parsing 11 o'clock works fine:
>
> >>> DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>
> >>>
>
> -Edwin
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
From mal at egenix.com Thu Feb 19 20:22:34 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri Jan 13 11:13:21 2006
Subject: [egenix-users] DateTimeFrom parser error
In-Reply-To: <4034FE62.2E888FBC@noaa.gov>
References: <20040219181039.GX5971@rackspace.com> <4034FE62.2E888FBC@noaa.gov>
Message-ID: <40351B0A.9070401@egenix.com>
Jim Vickroy wrote:
> Me too.
>
> But eliminating the "PM" designator does not fail:
>
>
>>>>DateTimeFrom('Thursday, February 19, 2004 12:05:34 CST')
>
>
>
>
> My system:
>
> Microsoft Windows 2000
> Python 2.3.3
> egenix-mx-base-2.0.5.win32-py2.3.exe
That's a known bug in 2.0.x. It is fixed in the 2.1.x series which still
hasn't made it to general release version because of too many other projects
keeping us busy:
>>> from mx.DateTime import *
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
FWIW, if you are an mxODBC Zope DA user, you're lucky... it ships
with the current 2.1.x versions of egenix-mx-base under the covers.
> Edwin Grubbs wrote:
>
>
>>I get parse error when parsing a date in this format when the hour is
>>"12".
>>
>>
>>>>>from mx.DateTime import DateTimeFrom
>>>>>DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
>>
>>Traceback (most recent call last):
>> File "", line 1, in ?
>> File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
>> return Parser.DateTimeFromString(arg)
>> File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
>> raise DateTime.RangeError,\
>>mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
>>
>>But parsing 11 o'clock works fine:
>>
>>
>>>>>DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>>
>>
>>
>>-Edwin
>>
>>_______________________________________________________________________
>>eGenix.com User Mailing List http://www.egenix.com/
>>http://lists.egenix.com/mailman/listinfo/egenix-users
>
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 19 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From smulloni at smullyan.org Wed Feb 25 13:53:11 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Fri Jan 13 11:13:21 2006
Subject: [egenix-users]
mx-base 2.0.5 segfaults against Python 2.3.3 --without-pymalloc
--with-pydebug
Message-ID: <20040225185311.GA5226@smullyan.org>
This may be already known, but 2.0.5 segfaults *immediately* with
Python 2.3.3 configured --without-pymalloc --with-pydebug on 2 linux
platforms I've tested (gcc 2.95 and 3.3.2). 2.1.0 does not.
From the core backtrace:
#0 0x08082a5f in _Py_ForgetReference (op=0x81a27d0) at Objects/object.c:2000
#1 0x4031a354 in mxDateTime_Free (datetime=0x81a27d0) at mx/DateTime/mxDateTime/mxDateTime.c:365
#2 0x08082ad6 in _Py_Dealloc (op=0x81a27d0) at Objects/object.c:2022
#3 0x080bdb7f in eval_frame (f=0x81aa20c) at Python/ceval.c:1935
#4 0x080c02ca in PyEval_EvalCodeEx (co=0x821fff8, globals=0x821decc, locals=0x821decc, args=0x0,
argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#5 0x080b8b90 in PyEval_EvalCode (co=0x821fff8, globals=0x821decc, locals=0x821decc) at Python/ceval.c:537
#6 0x080da8a2 in PyImport_ExecCodeModuleEx (name=0xbfffda00 "mx.DateTime.DateTime", co=0x821fff8,
pathname=0xbfffd0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#7 0x080dafc2 in load_source_module (name=0xbfffda00 "mx.DateTime.DateTime",
pathname=0xbfffd0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x82088f0) at Python/import.c:894
#8 0x080dc2f0 in load_module (name=0xbfffda00 "mx.DateTime.DateTime", fp=0x82088f0,
buf=0xbfffd560 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.py",
type=1, loader=0x0) at Python/import.c:1699
#9 0x080dd991 in import_submodule (mod=0x8208c1c, subname=0xbfffda0c "DateTime",
fullname=0xbfffda00 "mx.DateTime.DateTime") at Python/import.c:2290
#10 0x080dd14d in load_next (mod=0x8208c1c, altmod=0x812e308, p_name=0xbfffde20,
buf=0xbfffda00 "mx.DateTime.DateTime", p_buflen=0xbfffd9fc) at Python/import.c:2111
#11 0x080dca9a in import_module_ex (name=0x0, globals=0x820849c, locals=0x820849c, fromlist=0x819af9c)
at Python/import.c:1957
#12 0x080dcd87 in PyImport_ImportModuleEx (name=0x8208f1c "DateTime", globals=0x820849c, locals=0x820849c,
fromlist=0x819af9c) at Python/import.c:1998
#13 0x080af037 in builtin___import__ (self=0x0, args=0x820a36c) at Python/bltinmodule.c:45
#14 0x0810ca6e in PyCFunction_Call (func=0x8173ffc, arg=0x820a36c, kw=0x0) at Objects/methodobject.c:73
#15 0x0805c483 in PyObject_Call (func=0x8173ffc, arg=0x820a36c, kw=0x0) at Objects/abstract.c:1755
#16 0x080c1a44 in PyEval_CallObjectWithKeywords (func=0x8173ffc, arg=0x820a36c, kw=0x0)
at Python/ceval.c:3346
#17 0x080bdf28 in eval_frame (f=0x81e5724) at Python/ceval.c:1996
#18 0x080c02ca in PyEval_EvalCodeEx (co=0x820a290, globals=0x820849c, locals=0x820849c, args=0x0,
argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#19 0x080b8b90 in PyEval_EvalCode (co=0x820a290, globals=0x820849c, locals=0x820849c) at Python/ceval.c:537
#20 0x080da8a2 in PyImport_ExecCodeModuleEx (name=0xbfffeea0 "mx.DateTime", co=0x820a290,
pathname=0xbfffe0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
etc. This core was produced simply by importing mx.DateTime.
Cheers,
Jacob Smullyan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /mailman-archives/egenix-users/attachments/20040225/a71bc3d7/attachment.bin
From mal at egenix.com Fri Feb 27 10:14:04 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri Jan 13 11:13:21 2006
Subject: [egenix-users] mx-base 2.0.5 segfaults against Python 2.3.3
--without-pymalloc --with-pydebug
In-Reply-To: <20040225185311.GA5226@smullyan.org>
References: <20040225185311.GA5226@smullyan.org>
Message-ID: <403F0A5C.5010901@egenix.com>
Jacob Smullyan wrote:
> This may be already known, but 2.0.5 segfaults *immediately* with
> Python 2.3.3 configured --without-pymalloc --with-pydebug on 2 linux
> platforms I've tested (gcc 2.95 and 3.3.2). 2.1.0 does not.
While 2.1.0 is more suited for Python versions compiled with
--with-debug, I have to say that we don't support that option.
There are simply too many different configure options available
in Python that it's not possible to accomodate for each and every
combination.
Standard Python compiles should and do work, though. If you find that
there is a problem with the free lists in e.g. mxDateTime causing
a seg fault, then it's the compiler's optimizer not doing a proper
job. Apperently the compilers have a problem with optimizing this
piece of code:
datetime = mxDateTime_FreeList;
mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
datetime->ob_type = &mxDateTime_Type;
In such a case, please edit the C files and comment out the
free list #defines, e.g. for mxDateTime:
/* Define these to have the module use free lists (saves malloc calls) */
#define MXDATETIME_FREELIST
#define MXDATETIMEDELTA_FREELIST
Patches are welcome, of course. It's hard for us to fix bugs that
we cannot reproduce using our standard tools, so if you want these
things fixed, please make suggestions on how to work around the
problem.
Thanks,
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 27 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Thu Feb 5 22:17:38 2004
From: ross at principia.edu (Ross Brattain)
Date: Fri Jan 13 15:13:53 2006
Subject: [egenix-users]
seg fault on import mx.DateTime Python2.3.3 egenix-base-2.0.5
Message-ID: <87fzdon33x.fsf@maas-neotek.comcast.net>
My usual runtime environment is Python 2.2.3 and egenix-base-2.0.4.
I'm update everything and was surprised with this seg fault.
-Ross B.
Debian unstable
# gcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
Thread model: posix
gcc version 3.3.3 20040125 (prerelease) (Debian)
Python 2.3.3 (#1, Feb 5 2004, 21:57:53)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mx.DateTime
zsh: segmentation fault (core dumped) /charting/bin/python2.3
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
#1 0x402ee68a in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:3998
#2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b78c4, kw=0x1) at Objects/methodobject.c:108
#3 0x080aa664 in call_function (pp_stack=0xbfffcecc, oparg=1) at Python/ceval.c:3439
#4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
#5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b5760, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd8e0 "mx.DateTime.DateTime", co=0x402b5760, pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#8 0x080cdb53 in load_source_module (name=0xbfffd8e0 "mx.DateTime.DateTime", pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
#9 0x080cb8be in load_module (name=0xbfffd8e0 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd450 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
#10 0x080cc7b8 in import_submodule (mod=0x4026138c, subname=0xbfffd8ec "DateTime", fullname=0xbfffd8e0 "mx.DateTime.DateTime") at Python/import.c:2290
#11 0x080cc2e3 in load_next (mod=0x4026138c, altmod=0x8116160, p_name=0xbfffd8ec, buf=0xbfffd8e0 "mx.DateTime.DateTime", p_buflen=0xbfffd8dc) at Python/import.c:2111
#12 0x080ce319 in import_module_ex (name=0x0, globals=0x1, locals=0x402a5dfc, fromlist=0x4028750c) at Python/import.c:1957
#13 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
#14 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
#15 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x402aeeb4, kw=0x1) at Objects/methodobject.c:108
#16 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
#17 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x402aeeb4, kw=0x40269bec) at Python/ceval.c:3346
#18 0x080a8794 in eval_frame (f=0x818b02c) at Python/ceval.c:1996
#19 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7b20, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#20 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#21 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffece0 "mx.DateTime", co=0x402a7b20, pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
#22 0x080cdb53 in load_source_module (name=0xbfffece0 "mx.DateTime", pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc", fp=0x81632a0) at Python/import.c:894
#23 0x080cb8be in load_module (name=0xbfffece0 "mx.DateTime", fp=0x81632a0, buf=0xbfffe3c0 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.py", type=1, loader=0x1) at Python/import.c:1699
#24 0x080ce051 in load_package (name=0xbfffece0 "mx.DateTime", pathname=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime") at Python/import.c:951
#25 0x080cb9ed in load_module (name=0xbfffece0 "mx.DateTime", fp=0xbfffe850, buf=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime", type=5, loader=0x1) at Python/import.c:1722
#26 0x080cc7b8 in import_submodule (mod=0x40261374, subname=0xbfffece3 "DateTime", fullname=0xbfffece0 "mx.DateTime") at Python/import.c:2290
#27 0x080cc2e3 in load_next (mod=0x40261374, altmod=0x40261374, p_name=0xbfffece3, buf=0xbfffece0 "mx.DateTime", p_buflen=0xbfffecdc) at Python/import.c:2111
#28 0x080ce40f in import_module_ex (name=0x0, globals=0x1, locals=0x4027879c, fromlist=0x8116160) at Python/import.c:1964
#29 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
#30 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
#31 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x4028075c, kw=0x1) at Objects/methodobject.c:108
#32 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
#33 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x4028075c, kw=0x40269bec) at Python/ceval.c:3346
#34 0x080a8794 in eval_frame (f=0x8183a54) at Python/ceval.c:1996
#35 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7320, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#36 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#37 0x080d7d1b in run_node (n=0x4027879c, filename=0x1 , globals=0x1, locals=0x1, flags=0x1) at Python/pythonrun.c:1265
#38 0x080d724e in PyRun_InteractiveOneFlags (fp=0x1, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:757
#39 0x080d7043 in PyRun_InteractiveLoopFlags (fp=0x40254e20, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:690
#40 0x080d8642 in PyRun_AnyFileExFlags (fp=0x40254e20, filename=0x80ff46a "", closeit=0, flags=0xbffff428) at Python/pythonrun.c:653
#41 0x08054e35 in Py_Main (argc=0, argv=0xbffff4d4) at Modules/main.c:415
#42 0x0805498b in main (argc=1, argv=0x1) at Modules/python.c:23
From mal at egenix.com Fri Feb 6 10:05:49 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri Jan 13 15:13:53 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87fzdon33x.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
Message-ID: <402358ED.2060401@egenix.com>
Ross Brattain wrote:
>
> My usual runtime environment is Python 2.2.3 and egenix-base-2.0.4.
> I'm update everything and was surprised with this seg fault.
Are you using a Python version that's compiled with debug
mode enabled (or have you used such a Python version to
compile mxDateTime) ?
> -Ross B.
>
>
> Debian unstable
>
> # gcc -v
> Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs
> Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
> Thread model: posix
> gcc version 3.3.3 20040125 (prerelease) (Debian)
>
>
> Python 2.3.3 (#1, Feb 5 2004, 21:57:53)
> [GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>
>>>>import mx.DateTime
>
> zsh: segmentation fault (core dumped) /charting/bin/python2.3
>
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
> #1 0x402ee68a in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:3998
> #2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b78c4, kw=0x1) at Objects/methodobject.c:108
> #3 0x080aa664 in call_function (pp_stack=0xbfffcecc, oparg=1) at Python/ceval.c:3439
> #4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
> #5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b5760, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd8e0 "mx.DateTime.DateTime", co=0x402b5760, pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
> #8 0x080cdb53 in load_source_module (name=0xbfffd8e0 "mx.DateTime.DateTime", pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
> #9 0x080cb8be in load_module (name=0xbfffd8e0 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd450 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
> #10 0x080cc7b8 in import_submodule (mod=0x4026138c, subname=0xbfffd8ec "DateTime", fullname=0xbfffd8e0 "mx.DateTime.DateTime") at Python/import.c:2290
> #11 0x080cc2e3 in load_next (mod=0x4026138c, altmod=0x8116160, p_name=0xbfffd8ec, buf=0xbfffd8e0 "mx.DateTime.DateTime", p_buflen=0xbfffd8dc) at Python/import.c:2111
> #12 0x080ce319 in import_module_ex (name=0x0, globals=0x1, locals=0x402a5dfc, fromlist=0x4028750c) at Python/import.c:1957
> #13 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
> #14 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
> #15 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x402aeeb4, kw=0x1) at Objects/methodobject.c:108
> #16 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
> #17 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x402aeeb4, kw=0x40269bec) at Python/ceval.c:3346
> #18 0x080a8794 in eval_frame (f=0x818b02c) at Python/ceval.c:1996
> #19 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7b20, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #20 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #21 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffece0 "mx.DateTime", co=0x402a7b20, pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
> #22 0x080cdb53 in load_source_module (name=0xbfffece0 "mx.DateTime", pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc", fp=0x81632a0) at Python/import.c:894
> #23 0x080cb8be in load_module (name=0xbfffece0 "mx.DateTime", fp=0x81632a0, buf=0xbfffe3c0 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.py", type=1, loader=0x1) at Python/import.c:1699
> #24 0x080ce051 in load_package (name=0xbfffece0 "mx.DateTime", pathname=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime") at Python/import.c:951
> #25 0x080cb9ed in load_module (name=0xbfffece0 "mx.DateTime", fp=0xbfffe850, buf=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime", type=5, loader=0x1) at Python/import.c:1722
> #26 0x080cc7b8 in import_submodule (mod=0x40261374, subname=0xbfffece3 "DateTime", fullname=0xbfffece0 "mx.DateTime") at Python/import.c:2290
> #27 0x080cc2e3 in load_next (mod=0x40261374, altmod=0x40261374, p_name=0xbfffece3, buf=0xbfffece0 "mx.DateTime", p_buflen=0xbfffecdc) at Python/import.c:2111
> #28 0x080ce40f in import_module_ex (name=0x0, globals=0x1, locals=0x4027879c, fromlist=0x8116160) at Python/import.c:1964
> #29 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
> #30 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
> #31 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x4028075c, kw=0x1) at Objects/methodobject.c:108
> #32 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
> #33 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x4028075c, kw=0x40269bec) at Python/ceval.c:3346
> #34 0x080a8794 in eval_frame (f=0x8183a54) at Python/ceval.c:1996
> #35 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7320, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #36 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #37 0x080d7d1b in run_node (n=0x4027879c, filename=0x1 , globals=0x1, locals=0x1, flags=0x1) at Python/pythonrun.c:1265
> #38 0x080d724e in PyRun_InteractiveOneFlags (fp=0x1, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:757
> #39 0x080d7043 in PyRun_InteractiveLoopFlags (fp=0x40254e20, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:690
> #40 0x080d8642 in PyRun_AnyFileExFlags (fp=0x40254e20, filename=0x80ff46a "", closeit=0, flags=0xbffff428) at Python/pythonrun.c:653
> #41 0x08054e35 in Py_Main (argc=0, argv=0xbffff4d4) at Modules/main.c:415
> #42 0x0805498b in main (argc=1, argv=0x1) at Modules/python.c:23
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 06 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Fri Feb 6 16:16:58 2004
From: ross at principia.edu (Ross Brattain)
Date: Fri Jan 13 15:13:54 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402358ED.2060401@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com>
Message-ID: <87d68rg2v9.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
> Are you using a Python version that's compiled with debug
> mode enabled (or have you used such a Python version to
> compile mxDateTime) ?
>
No, just vanilla ./configure.
I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
Because of this line from the backtrace:
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
mxDateTime.c:333 :
#ifdef MXDATETIME_FREELIST
if (mxDateTime_FreeList) {
datetime = mxDateTime_FreeList;
mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
datetime->ob_type = &mxDateTime_Type;
-> _Py_NewReference(datetime);
}
else
#endif
{
datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
if (datetime == NULL)
return NULL;
}
I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
--- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
+++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
@@ -76,7 +76,7 @@
#define STRFTIME_OUTPUT_SIZE 1024
/* Define these to have the module use free lists (saves malloc calls) */
-#define MXDATETIME_FREELIST
+#undef MXDATETIME_FREELIST
#define MXDATETIMEDELTA_FREELIST
/* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
This is not the root cause because, as mentioned, a rebuild of
Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
problem.
My working production environment (different machine) is:
Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
[GCC 3.2.3 20030415 (Debian prerelease)] on linux2
and egenix-base-2.0.4
I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
works.
So is it a gcc problem?
-Ross B.
From ross at principia.edu Fri Feb 6 16:17:41 2004
From: ross at principia.edu (Ross Brattain)
Date: Fri Jan 13 15:13:54 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402358ED.2060401@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com>
Message-ID: <87r7x7eo9m.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
>
> Are you using a Python version that's compiled with debug
> mode enabled (or have you used such a Python version to
> compile mxDateTime) ?
>
Another data point:
Python 2.3.3 (#1, Feb 6 2004, 01:59:49)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
built from:
egenix-mx-base-2.1.0-2003-07-29.zip
(gdb) bt
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:341
#1 0x402eeaba in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:4091
#2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b7914, kw=0x1) at Objects/methodobject.c:108
#3 0x080aa664 in call_function (pp_stack=0xbfffcefc, oparg=1) at Python/ceval.c:3439
#4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
#5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b47a0, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd910 "mx.DateTime.DateTime", co=0x402b47a0, pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#8 0x080cdb53 in load_source_module (name=0xbfffd910 "mx.DateTime.DateTime", pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
#9 0x080cb8be in load_module (name=0xbfffd910 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd480 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
-Ross B.
From mal at egenix.com Mon Feb 9 11:31:50 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri Jan 13 15:13:54 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87ptcsldts.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87ptcsldts.fsf@maas-neotek.comcast.net>
Message-ID: <40276FA6.6030206@egenix.com>
Ross Brattain wrote:
> "M.-A. Lemburg" writes:
>
>
>>Are you using a Python version that's compiled with debug
>>mode enabled (or have you used such a Python version to
>>compile mxDateTime) ?
>>
>
>
> Another data point:
Could you try compiling the package with optimizations disabled
(-O0) ?!
> Python 2.3.3 (#1, Feb 6 2004, 01:59:49)
> [GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
>
> built from:
> egenix-mx-base-2.1.0-2003-07-29.zip
>
> (gdb) bt
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:341
> #1 0x402eeaba in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:4091
> #2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b7914, kw=0x1) at Objects/methodobject.c:108
> #3 0x080aa664 in call_function (pp_stack=0xbfffcefc, oparg=1) at Python/ceval.c:3439
> #4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
> #5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b47a0, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd910 "mx.DateTime.DateTime", co=0x402b47a0, pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
> #8 0x080cdb53 in load_source_module (name=0xbfffd910 "mx.DateTime.DateTime", pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
> #9 0x080cb8be in load_module (name=0xbfffd910 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd480 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
>
> -Ross B.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 09 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Mon Feb 9 11:59:21 2004
From: ross at principia.edu (Ross Brattain)
Date: Fri Jan 13 15:13:54 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <40276FA6.6030206@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87ptcsldts.fsf@maas-neotek.comcast.net>
<40276FA6.6030206@egenix.com>
Message-ID: <87ekt4f2hy.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
> Could you try compiling the package with optimizations disabled
> (-O0) ?!
Python 2.3.3 (#3, Feb 9 2004, 11:51:59)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mx.DateTime
>>> print mx.DateTime.__version__
2.1.0
Vanilla python 2.3.3 build
egenix-mx-base-2.1.0-2003-07-29.zip built with -O0
-Ross B.
From smulloni at smullyan.org Wed Feb 11 12:41:18 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Fri Jan 13 15:13:54 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87d68rg2v9.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
Message-ID: <20040211174118.GA31434@smullyan.org>
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.
I can provide core files, backtraces, etc., upon request.
Cheers,
Jacob Smullyan
On Fri, Feb 06, 2004 at 04:16:58PM -0800, Ross Brattain wrote:
> "M.-A. Lemburg" writes:
>
> > Are you using a Python version that's compiled with debug
> > mode enabled (or have you used such a Python version to
> > compile mxDateTime) ?
> >
>
> No, just vanilla ./configure.
>
> I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
>
> Because of this line from the backtrace:
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
>
> mxDateTime.c:333 :
>
> #ifdef MXDATETIME_FREELIST
> if (mxDateTime_FreeList) {
> datetime = mxDateTime_FreeList;
> mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
> datetime->ob_type = &mxDateTime_Type;
> -> _Py_NewReference(datetime);
> }
> else
> #endif
> {
> datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
> if (datetime == NULL)
> return NULL;
> }
>
> I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
>
> --- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
> +++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
> @@ -76,7 +76,7 @@
> #define STRFTIME_OUTPUT_SIZE 1024
>
> /* Define these to have the module use free lists (saves malloc calls) */
> -#define MXDATETIME_FREELIST
> +#undef MXDATETIME_FREELIST
> #define MXDATETIMEDELTA_FREELIST
>
> /* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
>
>
> This is not the root cause because, as mentioned, a rebuild of
> Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
> problem.
>
> My working production environment (different machine) is:
> Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
> [GCC 3.2.3 20030415 (Debian prerelease)] on linux2
>
> and egenix-base-2.0.4
>
> I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
> works.
>
> So is it a gcc problem?
>
> -Ross B.
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
>
From mal at egenix.com Wed Feb 11 18:45:19 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri Jan 13 15:13:54 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <20040211174118.GA31434@smullyan.org>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
<20040211174118.GA31434@smullyan.org>
Message-ID: <402A783F.6010909@egenix.com>
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 can provide core files, backtraces, etc., upon request.
>
> Cheers,
>
> Jacob Smullyan
>
> On Fri, Feb 06, 2004 at 04:16:58PM -0800, Ross Brattain wrote:
>
>>"M.-A. Lemburg" writes:
>>
>>
>>>Are you using a Python version that's compiled with debug
>>>mode enabled (or have you used such a Python version to
>>>compile mxDateTime) ?
>>>
>>
>>No, just vanilla ./configure.
>>
>>I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
>>
>>Because of this line from the backtrace:
>>#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
>>
>>mxDateTime.c:333 :
>>
>>#ifdef MXDATETIME_FREELIST
>> if (mxDateTime_FreeList) {
>> datetime = mxDateTime_FreeList;
>> mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
>> datetime->ob_type = &mxDateTime_Type;
>>-> _Py_NewReference(datetime);
>> }
>> else
>>#endif
>> {
>> datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
>> if (datetime == NULL)
>> return NULL;
>> }
>>
>>I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
>>
>>--- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
>>+++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
>>@@ -76,7 +76,7 @@
>> #define STRFTIME_OUTPUT_SIZE 1024
>>
>> /* Define these to have the module use free lists (saves malloc calls) */
>>-#define MXDATETIME_FREELIST
>>+#undef MXDATETIME_FREELIST
>> #define MXDATETIMEDELTA_FREELIST
>>
>> /* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
>>
>>
>>This is not the root cause because, as mentioned, a rebuild of
>>Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
>>problem.
>>
>>My working production environment (different machine) is:
>>Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
>>[GCC 3.2.3 20030415 (Debian prerelease)] on linux2
>>
>>and egenix-base-2.0.4
>>
>>I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
>>works.
>>
>>So is it a gcc problem?
>>
>>-Ross B.
>>
>>_______________________________________________________________________
>>eGenix.com User Mailing List http://www.egenix.com/
>>http://lists.egenix.com/mailman/listinfo/egenix-users
>>
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 11 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From smulloni at smullyan.org Wed Feb 11 13:53:20 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Fri Jan 13 15:13:54 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402A783F.6010909@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
<20040211174118.GA31434@smullyan.org> <402A783F.6010909@egenix.com>
Message-ID: <20040211185320.GA31997@smullyan.org>
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
From egrubbs at rackspace.com Thu Feb 19 12:10:39 2004
From: egrubbs at rackspace.com (Edwin Grubbs)
Date: Fri Jan 13 15:13:54 2006
Subject: [egenix-users] DateTimeFrom parser error
Message-ID: <20040219181039.GX5971@rackspace.com>
I get parse error when parsing a date in this format when the hour is
"12".
>>> from mx.DateTime import DateTimeFrom
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
Traceback (most recent call last):
File "", line 1, in ?
File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
return Parser.DateTimeFromString(arg)
File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
raise DateTime.RangeError,\
mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
>>>
But parsing 11 o'clock works fine:
>>> DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>>>
-Edwin
From Jim.Vickroy at noaa.gov Thu Feb 19 11:20:18 2004
From: Jim.Vickroy at noaa.gov (Jim Vickroy)
Date: Fri Jan 13 15:13:54 2006
Subject: [egenix-users] DateTimeFrom parser error
References: <20040219181039.GX5971@rackspace.com>
Message-ID: <4034FE62.2E888FBC@noaa.gov>
Me too.
But eliminating the "PM" designator does not fail:
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 CST')
>>>
My system:
Microsoft Windows 2000
Python 2.3.3
egenix-mx-base-2.0.5.win32-py2.3.exe
Edwin Grubbs wrote:
> I get parse error when parsing a date in this format when the hour is
> "12".
>
> >>> from mx.DateTime import DateTimeFrom
> >>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
> Traceback (most recent call last):
> File "", line 1, in ?
> File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
> return Parser.DateTimeFromString(arg)
> File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
> raise DateTime.RangeError,\
> mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
> >>>
>
> But parsing 11 o'clock works fine:
>
> >>> DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>
> >>>
>
> -Edwin
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
From mal at egenix.com Thu Feb 19 20:22:34 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri Jan 13 15:13:54 2006
Subject: [egenix-users] DateTimeFrom parser error
In-Reply-To: <4034FE62.2E888FBC@noaa.gov>
References: <20040219181039.GX5971@rackspace.com> <4034FE62.2E888FBC@noaa.gov>
Message-ID: <40351B0A.9070401@egenix.com>
Jim Vickroy wrote:
> Me too.
>
> But eliminating the "PM" designator does not fail:
>
>
>>>>DateTimeFrom('Thursday, February 19, 2004 12:05:34 CST')
>
>
>
>
> My system:
>
> Microsoft Windows 2000
> Python 2.3.3
> egenix-mx-base-2.0.5.win32-py2.3.exe
That's a known bug in 2.0.x. It is fixed in the 2.1.x series which still
hasn't made it to general release version because of too many other projects
keeping us busy:
>>> from mx.DateTime import *
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
FWIW, if you are an mxODBC Zope DA user, you're lucky... it ships
with the current 2.1.x versions of egenix-mx-base under the covers.
> Edwin Grubbs wrote:
>
>
>>I get parse error when parsing a date in this format when the hour is
>>"12".
>>
>>
>>>>>from mx.DateTime import DateTimeFrom
>>>>>DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
>>
>>Traceback (most recent call last):
>> File "", line 1, in ?
>> File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
>> return Parser.DateTimeFromString(arg)
>> File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
>> raise DateTime.RangeError,\
>>mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
>>
>>But parsing 11 o'clock works fine:
>>
>>
>>>>>DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>>
>>
>>
>>-Edwin
>>
>>_______________________________________________________________________
>>eGenix.com User Mailing List http://www.egenix.com/
>>http://lists.egenix.com/mailman/listinfo/egenix-users
>
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 19 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From smulloni at smullyan.org Wed Feb 25 13:53:11 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Fri Jan 13 15:13:54 2006
Subject: [egenix-users]
mx-base 2.0.5 segfaults against Python 2.3.3 --without-pymalloc
--with-pydebug
Message-ID: <20040225185311.GA5226@smullyan.org>
This may be already known, but 2.0.5 segfaults *immediately* with
Python 2.3.3 configured --without-pymalloc --with-pydebug on 2 linux
platforms I've tested (gcc 2.95 and 3.3.2). 2.1.0 does not.
From the core backtrace:
#0 0x08082a5f in _Py_ForgetReference (op=0x81a27d0) at Objects/object.c:2000
#1 0x4031a354 in mxDateTime_Free (datetime=0x81a27d0) at mx/DateTime/mxDateTime/mxDateTime.c:365
#2 0x08082ad6 in _Py_Dealloc (op=0x81a27d0) at Objects/object.c:2022
#3 0x080bdb7f in eval_frame (f=0x81aa20c) at Python/ceval.c:1935
#4 0x080c02ca in PyEval_EvalCodeEx (co=0x821fff8, globals=0x821decc, locals=0x821decc, args=0x0,
argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#5 0x080b8b90 in PyEval_EvalCode (co=0x821fff8, globals=0x821decc, locals=0x821decc) at Python/ceval.c:537
#6 0x080da8a2 in PyImport_ExecCodeModuleEx (name=0xbfffda00 "mx.DateTime.DateTime", co=0x821fff8,
pathname=0xbfffd0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#7 0x080dafc2 in load_source_module (name=0xbfffda00 "mx.DateTime.DateTime",
pathname=0xbfffd0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x82088f0) at Python/import.c:894
#8 0x080dc2f0 in load_module (name=0xbfffda00 "mx.DateTime.DateTime", fp=0x82088f0,
buf=0xbfffd560 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.py",
type=1, loader=0x0) at Python/import.c:1699
#9 0x080dd991 in import_submodule (mod=0x8208c1c, subname=0xbfffda0c "DateTime",
fullname=0xbfffda00 "mx.DateTime.DateTime") at Python/import.c:2290
#10 0x080dd14d in load_next (mod=0x8208c1c, altmod=0x812e308, p_name=0xbfffde20,
buf=0xbfffda00 "mx.DateTime.DateTime", p_buflen=0xbfffd9fc) at Python/import.c:2111
#11 0x080dca9a in import_module_ex (name=0x0, globals=0x820849c, locals=0x820849c, fromlist=0x819af9c)
at Python/import.c:1957
#12 0x080dcd87 in PyImport_ImportModuleEx (name=0x8208f1c "DateTime", globals=0x820849c, locals=0x820849c,
fromlist=0x819af9c) at Python/import.c:1998
#13 0x080af037 in builtin___import__ (self=0x0, args=0x820a36c) at Python/bltinmodule.c:45
#14 0x0810ca6e in PyCFunction_Call (func=0x8173ffc, arg=0x820a36c, kw=0x0) at Objects/methodobject.c:73
#15 0x0805c483 in PyObject_Call (func=0x8173ffc, arg=0x820a36c, kw=0x0) at Objects/abstract.c:1755
#16 0x080c1a44 in PyEval_CallObjectWithKeywords (func=0x8173ffc, arg=0x820a36c, kw=0x0)
at Python/ceval.c:3346
#17 0x080bdf28 in eval_frame (f=0x81e5724) at Python/ceval.c:1996
#18 0x080c02ca in PyEval_EvalCodeEx (co=0x820a290, globals=0x820849c, locals=0x820849c, args=0x0,
argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#19 0x080b8b90 in PyEval_EvalCode (co=0x820a290, globals=0x820849c, locals=0x820849c) at Python/ceval.c:537
#20 0x080da8a2 in PyImport_ExecCodeModuleEx (name=0xbfffeea0 "mx.DateTime", co=0x820a290,
pathname=0xbfffe0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
etc. This core was produced simply by importing mx.DateTime.
Cheers,
Jacob Smullyan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /mailman-archives/egenix-users/attachments/20040225/a71bc3d7/attachment-0001.bin
From mal at egenix.com Fri Feb 27 10:14:04 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri Jan 13 15:13:54 2006
Subject: [egenix-users] mx-base 2.0.5 segfaults against Python 2.3.3
--without-pymalloc --with-pydebug
In-Reply-To: <20040225185311.GA5226@smullyan.org>
References: <20040225185311.GA5226@smullyan.org>
Message-ID: <403F0A5C.5010901@egenix.com>
Jacob Smullyan wrote:
> This may be already known, but 2.0.5 segfaults *immediately* with
> Python 2.3.3 configured --without-pymalloc --with-pydebug on 2 linux
> platforms I've tested (gcc 2.95 and 3.3.2). 2.1.0 does not.
While 2.1.0 is more suited for Python versions compiled with
--with-debug, I have to say that we don't support that option.
There are simply too many different configure options available
in Python that it's not possible to accomodate for each and every
combination.
Standard Python compiles should and do work, though. If you find that
there is a problem with the free lists in e.g. mxDateTime causing
a seg fault, then it's the compiler's optimizer not doing a proper
job. Apperently the compilers have a problem with optimizing this
piece of code:
datetime = mxDateTime_FreeList;
mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
datetime->ob_type = &mxDateTime_Type;
In such a case, please edit the C files and comment out the
free list #defines, e.g. for mxDateTime:
/* Define these to have the module use free lists (saves malloc calls) */
#define MXDATETIME_FREELIST
#define MXDATETIMEDELTA_FREELIST
Patches are welcome, of course. It's hard for us to fix bugs that
we cannot reproduce using our standard tools, so if you want these
things fixed, please make suggestions on how to work around the
problem.
Thanks,
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 27 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Thu Feb 5 22:17:38 2004
From: ross at principia.edu (Ross Brattain)
Date: Fri Jan 13 15:21:16 2006
Subject: [egenix-users]
seg fault on import mx.DateTime Python2.3.3 egenix-base-2.0.5
Message-ID: <87fzdon33x.fsf@maas-neotek.comcast.net>
My usual runtime environment is Python 2.2.3 and egenix-base-2.0.4.
I'm update everything and was surprised with this seg fault.
-Ross B.
Debian unstable
# gcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
Thread model: posix
gcc version 3.3.3 20040125 (prerelease) (Debian)
Python 2.3.3 (#1, Feb 5 2004, 21:57:53)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mx.DateTime
zsh: segmentation fault (core dumped) /charting/bin/python2.3
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
#1 0x402ee68a in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:3998
#2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b78c4, kw=0x1) at Objects/methodobject.c:108
#3 0x080aa664 in call_function (pp_stack=0xbfffcecc, oparg=1) at Python/ceval.c:3439
#4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
#5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b5760, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd8e0 "mx.DateTime.DateTime", co=0x402b5760, pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#8 0x080cdb53 in load_source_module (name=0xbfffd8e0 "mx.DateTime.DateTime", pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
#9 0x080cb8be in load_module (name=0xbfffd8e0 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd450 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
#10 0x080cc7b8 in import_submodule (mod=0x4026138c, subname=0xbfffd8ec "DateTime", fullname=0xbfffd8e0 "mx.DateTime.DateTime") at Python/import.c:2290
#11 0x080cc2e3 in load_next (mod=0x4026138c, altmod=0x8116160, p_name=0xbfffd8ec, buf=0xbfffd8e0 "mx.DateTime.DateTime", p_buflen=0xbfffd8dc) at Python/import.c:2111
#12 0x080ce319 in import_module_ex (name=0x0, globals=0x1, locals=0x402a5dfc, fromlist=0x4028750c) at Python/import.c:1957
#13 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
#14 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
#15 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x402aeeb4, kw=0x1) at Objects/methodobject.c:108
#16 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
#17 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x402aeeb4, kw=0x40269bec) at Python/ceval.c:3346
#18 0x080a8794 in eval_frame (f=0x818b02c) at Python/ceval.c:1996
#19 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7b20, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#20 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#21 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffece0 "mx.DateTime", co=0x402a7b20, pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
#22 0x080cdb53 in load_source_module (name=0xbfffece0 "mx.DateTime", pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc", fp=0x81632a0) at Python/import.c:894
#23 0x080cb8be in load_module (name=0xbfffece0 "mx.DateTime", fp=0x81632a0, buf=0xbfffe3c0 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.py", type=1, loader=0x1) at Python/import.c:1699
#24 0x080ce051 in load_package (name=0xbfffece0 "mx.DateTime", pathname=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime") at Python/import.c:951
#25 0x080cb9ed in load_module (name=0xbfffece0 "mx.DateTime", fp=0xbfffe850, buf=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime", type=5, loader=0x1) at Python/import.c:1722
#26 0x080cc7b8 in import_submodule (mod=0x40261374, subname=0xbfffece3 "DateTime", fullname=0xbfffece0 "mx.DateTime") at Python/import.c:2290
#27 0x080cc2e3 in load_next (mod=0x40261374, altmod=0x40261374, p_name=0xbfffece3, buf=0xbfffece0 "mx.DateTime", p_buflen=0xbfffecdc) at Python/import.c:2111
#28 0x080ce40f in import_module_ex (name=0x0, globals=0x1, locals=0x4027879c, fromlist=0x8116160) at Python/import.c:1964
#29 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
#30 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
#31 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x4028075c, kw=0x1) at Objects/methodobject.c:108
#32 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
#33 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x4028075c, kw=0x40269bec) at Python/ceval.c:3346
#34 0x080a8794 in eval_frame (f=0x8183a54) at Python/ceval.c:1996
#35 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7320, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#36 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#37 0x080d7d1b in run_node (n=0x4027879c, filename=0x1 , globals=0x1, locals=0x1, flags=0x1) at Python/pythonrun.c:1265
#38 0x080d724e in PyRun_InteractiveOneFlags (fp=0x1, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:757
#39 0x080d7043 in PyRun_InteractiveLoopFlags (fp=0x40254e20, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:690
#40 0x080d8642 in PyRun_AnyFileExFlags (fp=0x40254e20, filename=0x80ff46a "", closeit=0, flags=0xbffff428) at Python/pythonrun.c:653
#41 0x08054e35 in Py_Main (argc=0, argv=0xbffff4d4) at Modules/main.c:415
#42 0x0805498b in main (argc=1, argv=0x1) at Modules/python.c:23
From mal at egenix.com Fri Feb 6 10:05:49 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri Jan 13 15:21:16 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87fzdon33x.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
Message-ID: <402358ED.2060401@egenix.com>
Ross Brattain wrote:
>
> My usual runtime environment is Python 2.2.3 and egenix-base-2.0.4.
> I'm update everything and was surprised with this seg fault.
Are you using a Python version that's compiled with debug
mode enabled (or have you used such a Python version to
compile mxDateTime) ?
> -Ross B.
>
>
> Debian unstable
>
> # gcc -v
> Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs
> Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
> Thread model: posix
> gcc version 3.3.3 20040125 (prerelease) (Debian)
>
>
> Python 2.3.3 (#1, Feb 5 2004, 21:57:53)
> [GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>
>>>>import mx.DateTime
>
> zsh: segmentation fault (core dumped) /charting/bin/python2.3
>
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
> #1 0x402ee68a in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:3998
> #2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b78c4, kw=0x1) at Objects/methodobject.c:108
> #3 0x080aa664 in call_function (pp_stack=0xbfffcecc, oparg=1) at Python/ceval.c:3439
> #4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
> #5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b5760, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd8e0 "mx.DateTime.DateTime", co=0x402b5760, pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
> #8 0x080cdb53 in load_source_module (name=0xbfffd8e0 "mx.DateTime.DateTime", pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
> #9 0x080cb8be in load_module (name=0xbfffd8e0 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd450 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
> #10 0x080cc7b8 in import_submodule (mod=0x4026138c, subname=0xbfffd8ec "DateTime", fullname=0xbfffd8e0 "mx.DateTime.DateTime") at Python/import.c:2290
> #11 0x080cc2e3 in load_next (mod=0x4026138c, altmod=0x8116160, p_name=0xbfffd8ec, buf=0xbfffd8e0 "mx.DateTime.DateTime", p_buflen=0xbfffd8dc) at Python/import.c:2111
> #12 0x080ce319 in import_module_ex (name=0x0, globals=0x1, locals=0x402a5dfc, fromlist=0x4028750c) at Python/import.c:1957
> #13 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
> #14 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
> #15 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x402aeeb4, kw=0x1) at Objects/methodobject.c:108
> #16 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
> #17 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x402aeeb4, kw=0x40269bec) at Python/ceval.c:3346
> #18 0x080a8794 in eval_frame (f=0x818b02c) at Python/ceval.c:1996
> #19 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7b20, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #20 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #21 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffece0 "mx.DateTime", co=0x402a7b20, pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
> #22 0x080cdb53 in load_source_module (name=0xbfffece0 "mx.DateTime", pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc", fp=0x81632a0) at Python/import.c:894
> #23 0x080cb8be in load_module (name=0xbfffece0 "mx.DateTime", fp=0x81632a0, buf=0xbfffe3c0 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.py", type=1, loader=0x1) at Python/import.c:1699
> #24 0x080ce051 in load_package (name=0xbfffece0 "mx.DateTime", pathname=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime") at Python/import.c:951
> #25 0x080cb9ed in load_module (name=0xbfffece0 "mx.DateTime", fp=0xbfffe850, buf=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime", type=5, loader=0x1) at Python/import.c:1722
> #26 0x080cc7b8 in import_submodule (mod=0x40261374, subname=0xbfffece3 "DateTime", fullname=0xbfffece0 "mx.DateTime") at Python/import.c:2290
> #27 0x080cc2e3 in load_next (mod=0x40261374, altmod=0x40261374, p_name=0xbfffece3, buf=0xbfffece0 "mx.DateTime", p_buflen=0xbfffecdc) at Python/import.c:2111
> #28 0x080ce40f in import_module_ex (name=0x0, globals=0x1, locals=0x4027879c, fromlist=0x8116160) at Python/import.c:1964
> #29 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
> #30 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
> #31 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x4028075c, kw=0x1) at Objects/methodobject.c:108
> #32 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
> #33 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x4028075c, kw=0x40269bec) at Python/ceval.c:3346
> #34 0x080a8794 in eval_frame (f=0x8183a54) at Python/ceval.c:1996
> #35 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7320, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #36 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #37 0x080d7d1b in run_node (n=0x4027879c, filename=0x1 , globals=0x1, locals=0x1, flags=0x1) at Python/pythonrun.c:1265
> #38 0x080d724e in PyRun_InteractiveOneFlags (fp=0x1, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:757
> #39 0x080d7043 in PyRun_InteractiveLoopFlags (fp=0x40254e20, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:690
> #40 0x080d8642 in PyRun_AnyFileExFlags (fp=0x40254e20, filename=0x80ff46a "", closeit=0, flags=0xbffff428) at Python/pythonrun.c:653
> #41 0x08054e35 in Py_Main (argc=0, argv=0xbffff4d4) at Modules/main.c:415
> #42 0x0805498b in main (argc=1, argv=0x1) at Modules/python.c:23
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 06 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Fri Feb 6 16:16:58 2004
From: ross at principia.edu (Ross Brattain)
Date: Fri Jan 13 15:21:16 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402358ED.2060401@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com>
Message-ID: <87d68rg2v9.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
> Are you using a Python version that's compiled with debug
> mode enabled (or have you used such a Python version to
> compile mxDateTime) ?
>
No, just vanilla ./configure.
I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
Because of this line from the backtrace:
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
mxDateTime.c:333 :
#ifdef MXDATETIME_FREELIST
if (mxDateTime_FreeList) {
datetime = mxDateTime_FreeList;
mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
datetime->ob_type = &mxDateTime_Type;
-> _Py_NewReference(datetime);
}
else
#endif
{
datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
if (datetime == NULL)
return NULL;
}
I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
--- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
+++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
@@ -76,7 +76,7 @@
#define STRFTIME_OUTPUT_SIZE 1024
/* Define these to have the module use free lists (saves malloc calls) */
-#define MXDATETIME_FREELIST
+#undef MXDATETIME_FREELIST
#define MXDATETIMEDELTA_FREELIST
/* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
This is not the root cause because, as mentioned, a rebuild of
Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
problem.
My working production environment (different machine) is:
Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
[GCC 3.2.3 20030415 (Debian prerelease)] on linux2
and egenix-base-2.0.4
I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
works.
So is it a gcc problem?
-Ross B.
From ross at principia.edu Fri Feb 6 16:17:41 2004
From: ross at principia.edu (Ross Brattain)
Date: Fri Jan 13 15:21:16 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402358ED.2060401@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com>
Message-ID: <87r7x7eo9m.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
>
> Are you using a Python version that's compiled with debug
> mode enabled (or have you used such a Python version to
> compile mxDateTime) ?
>
Another data point:
Python 2.3.3 (#1, Feb 6 2004, 01:59:49)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
built from:
egenix-mx-base-2.1.0-2003-07-29.zip
(gdb) bt
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:341
#1 0x402eeaba in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:4091
#2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b7914, kw=0x1) at Objects/methodobject.c:108
#3 0x080aa664 in call_function (pp_stack=0xbfffcefc, oparg=1) at Python/ceval.c:3439
#4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
#5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b47a0, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd910 "mx.DateTime.DateTime", co=0x402b47a0, pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#8 0x080cdb53 in load_source_module (name=0xbfffd910 "mx.DateTime.DateTime", pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
#9 0x080cb8be in load_module (name=0xbfffd910 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd480 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
-Ross B.
From mal at egenix.com Mon Feb 9 11:31:50 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri Jan 13 15:21:16 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87ptcsldts.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87ptcsldts.fsf@maas-neotek.comcast.net>
Message-ID: <40276FA6.6030206@egenix.com>
Ross Brattain wrote:
> "M.-A. Lemburg" writes:
>
>
>>Are you using a Python version that's compiled with debug
>>mode enabled (or have you used such a Python version to
>>compile mxDateTime) ?
>>
>
>
> Another data point:
Could you try compiling the package with optimizations disabled
(-O0) ?!
> Python 2.3.3 (#1, Feb 6 2004, 01:59:49)
> [GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
>
> built from:
> egenix-mx-base-2.1.0-2003-07-29.zip
>
> (gdb) bt
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:341
> #1 0x402eeaba in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:4091
> #2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b7914, kw=0x1) at Objects/methodobject.c:108
> #3 0x080aa664 in call_function (pp_stack=0xbfffcefc, oparg=1) at Python/ceval.c:3439
> #4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
> #5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b47a0, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd910 "mx.DateTime.DateTime", co=0x402b47a0, pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
> #8 0x080cdb53 in load_source_module (name=0xbfffd910 "mx.DateTime.DateTime", pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
> #9 0x080cb8be in load_module (name=0xbfffd910 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd480 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
>
> -Ross B.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 09 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Mon Feb 9 11:59:21 2004
From: ross at principia.edu (Ross Brattain)
Date: Fri Jan 13 15:21:16 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <40276FA6.6030206@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87ptcsldts.fsf@maas-neotek.comcast.net>
<40276FA6.6030206@egenix.com>
Message-ID: <87ekt4f2hy.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
> Could you try compiling the package with optimizations disabled
> (-O0) ?!
Python 2.3.3 (#3, Feb 9 2004, 11:51:59)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mx.DateTime
>>> print mx.DateTime.__version__
2.1.0
Vanilla python 2.3.3 build
egenix-mx-base-2.1.0-2003-07-29.zip built with -O0
-Ross B.
From smulloni at smullyan.org Wed Feb 11 12:41:18 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Fri Jan 13 15:21:16 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87d68rg2v9.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
Message-ID: <20040211174118.GA31434@smullyan.org>
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.
I can provide core files, backtraces, etc., upon request.
Cheers,
Jacob Smullyan
On Fri, Feb 06, 2004 at 04:16:58PM -0800, Ross Brattain wrote:
> "M.-A. Lemburg" writes:
>
> > Are you using a Python version that's compiled with debug
> > mode enabled (or have you used such a Python version to
> > compile mxDateTime) ?
> >
>
> No, just vanilla ./configure.
>
> I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
>
> Because of this line from the backtrace:
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
>
> mxDateTime.c:333 :
>
> #ifdef MXDATETIME_FREELIST
> if (mxDateTime_FreeList) {
> datetime = mxDateTime_FreeList;
> mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
> datetime->ob_type = &mxDateTime_Type;
> -> _Py_NewReference(datetime);
> }
> else
> #endif
> {
> datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
> if (datetime == NULL)
> return NULL;
> }
>
> I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
>
> --- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
> +++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
> @@ -76,7 +76,7 @@
> #define STRFTIME_OUTPUT_SIZE 1024
>
> /* Define these to have the module use free lists (saves malloc calls) */
> -#define MXDATETIME_FREELIST
> +#undef MXDATETIME_FREELIST
> #define MXDATETIMEDELTA_FREELIST
>
> /* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
>
>
> This is not the root cause because, as mentioned, a rebuild of
> Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
> problem.
>
> My working production environment (different machine) is:
> Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
> [GCC 3.2.3 20030415 (Debian prerelease)] on linux2
>
> and egenix-base-2.0.4
>
> I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
> works.
>
> So is it a gcc problem?
>
> -Ross B.
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
>
From mal at egenix.com Wed Feb 11 18:45:19 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri Jan 13 15:21:16 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <20040211174118.GA31434@smullyan.org>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
<20040211174118.GA31434@smullyan.org>
Message-ID: <402A783F.6010909@egenix.com>
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 can provide core files, backtraces, etc., upon request.
>
> Cheers,
>
> Jacob Smullyan
>
> On Fri, Feb 06, 2004 at 04:16:58PM -0800, Ross Brattain wrote:
>
>>"M.-A. Lemburg" writes:
>>
>>
>>>Are you using a Python version that's compiled with debug
>>>mode enabled (or have you used such a Python version to
>>>compile mxDateTime) ?
>>>
>>
>>No, just vanilla ./configure.
>>
>>I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
>>
>>Because of this line from the backtrace:
>>#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
>>
>>mxDateTime.c:333 :
>>
>>#ifdef MXDATETIME_FREELIST
>> if (mxDateTime_FreeList) {
>> datetime = mxDateTime_FreeList;
>> mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
>> datetime->ob_type = &mxDateTime_Type;
>>-> _Py_NewReference(datetime);
>> }
>> else
>>#endif
>> {
>> datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
>> if (datetime == NULL)
>> return NULL;
>> }
>>
>>I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
>>
>>--- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
>>+++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
>>@@ -76,7 +76,7 @@
>> #define STRFTIME_OUTPUT_SIZE 1024
>>
>> /* Define these to have the module use free lists (saves malloc calls) */
>>-#define MXDATETIME_FREELIST
>>+#undef MXDATETIME_FREELIST
>> #define MXDATETIMEDELTA_FREELIST
>>
>> /* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
>>
>>
>>This is not the root cause because, as mentioned, a rebuild of
>>Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
>>problem.
>>
>>My working production environment (different machine) is:
>>Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
>>[GCC 3.2.3 20030415 (Debian prerelease)] on linux2
>>
>>and egenix-base-2.0.4
>>
>>I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
>>works.
>>
>>So is it a gcc problem?
>>
>>-Ross B.
>>
>>_______________________________________________________________________
>>eGenix.com User Mailing List http://www.egenix.com/
>>http://lists.egenix.com/mailman/listinfo/egenix-users
>>
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 11 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From smulloni at smullyan.org Wed Feb 11 13:53:20 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Fri Jan 13 15:21:16 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402A783F.6010909@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
<20040211174118.GA31434@smullyan.org> <402A783F.6010909@egenix.com>
Message-ID: <20040211185320.GA31997@smullyan.org>
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
From egrubbs at rackspace.com Thu Feb 19 12:10:39 2004
From: egrubbs at rackspace.com (Edwin Grubbs)
Date: Fri Jan 13 15:21:16 2006
Subject: [egenix-users] DateTimeFrom parser error
Message-ID: <20040219181039.GX5971@rackspace.com>
I get parse error when parsing a date in this format when the hour is
"12".
>>> from mx.DateTime import DateTimeFrom
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
Traceback (most recent call last):
File "", line 1, in ?
File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
return Parser.DateTimeFromString(arg)
File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
raise DateTime.RangeError,\
mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
>>>
But parsing 11 o'clock works fine:
>>> DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>>>
-Edwin
From Jim.Vickroy at noaa.gov Thu Feb 19 11:20:18 2004
From: Jim.Vickroy at noaa.gov (Jim Vickroy)
Date: Fri Jan 13 15:21:16 2006
Subject: [egenix-users] DateTimeFrom parser error
References: <20040219181039.GX5971@rackspace.com>
Message-ID: <4034FE62.2E888FBC@noaa.gov>
Me too.
But eliminating the "PM" designator does not fail:
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 CST')
>>>
My system:
Microsoft Windows 2000
Python 2.3.3
egenix-mx-base-2.0.5.win32-py2.3.exe
Edwin Grubbs wrote:
> I get parse error when parsing a date in this format when the hour is
> "12".
>
> >>> from mx.DateTime import DateTimeFrom
> >>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
> Traceback (most recent call last):
> File "", line 1, in ?
> File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
> return Parser.DateTimeFromString(arg)
> File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
> raise DateTime.RangeError,\
> mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
> >>>
>
> But parsing 11 o'clock works fine:
>
> >>> DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>
> >>>
>
> -Edwin
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
From mal at egenix.com Thu Feb 19 20:22:34 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri Jan 13 15:21:16 2006
Subject: [egenix-users] DateTimeFrom parser error
In-Reply-To: <4034FE62.2E888FBC@noaa.gov>
References: <20040219181039.GX5971@rackspace.com> <4034FE62.2E888FBC@noaa.gov>
Message-ID: <40351B0A.9070401@egenix.com>
Jim Vickroy wrote:
> Me too.
>
> But eliminating the "PM" designator does not fail:
>
>
>>>>DateTimeFrom('Thursday, February 19, 2004 12:05:34 CST')
>
>
>
>
> My system:
>
> Microsoft Windows 2000
> Python 2.3.3
> egenix-mx-base-2.0.5.win32-py2.3.exe
That's a known bug in 2.0.x. It is fixed in the 2.1.x series which still
hasn't made it to general release version because of too many other projects
keeping us busy:
>>> from mx.DateTime import *
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
FWIW, if you are an mxODBC Zope DA user, you're lucky... it ships
with the current 2.1.x versions of egenix-mx-base under the covers.
> Edwin Grubbs wrote:
>
>
>>I get parse error when parsing a date in this format when the hour is
>>"12".
>>
>>
>>>>>from mx.DateTime import DateTimeFrom
>>>>>DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
>>
>>Traceback (most recent call last):
>> File "", line 1, in ?
>> File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
>> return Parser.DateTimeFromString(arg)
>> File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
>> raise DateTime.RangeError,\
>>mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
>>
>>But parsing 11 o'clock works fine:
>>
>>
>>>>>DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>>
>>
>>
>>-Edwin
>>
>>_______________________________________________________________________
>>eGenix.com User Mailing List http://www.egenix.com/
>>http://lists.egenix.com/mailman/listinfo/egenix-users
>
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 19 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From smulloni at smullyan.org Wed Feb 25 13:53:11 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Fri Jan 13 15:21:16 2006
Subject: [egenix-users]
mx-base 2.0.5 segfaults against Python 2.3.3 --without-pymalloc
--with-pydebug
Message-ID: <20040225185311.GA5226@smullyan.org>
This may be already known, but 2.0.5 segfaults *immediately* with
Python 2.3.3 configured --without-pymalloc --with-pydebug on 2 linux
platforms I've tested (gcc 2.95 and 3.3.2). 2.1.0 does not.
From the core backtrace:
#0 0x08082a5f in _Py_ForgetReference (op=0x81a27d0) at Objects/object.c:2000
#1 0x4031a354 in mxDateTime_Free (datetime=0x81a27d0) at mx/DateTime/mxDateTime/mxDateTime.c:365
#2 0x08082ad6 in _Py_Dealloc (op=0x81a27d0) at Objects/object.c:2022
#3 0x080bdb7f in eval_frame (f=0x81aa20c) at Python/ceval.c:1935
#4 0x080c02ca in PyEval_EvalCodeEx (co=0x821fff8, globals=0x821decc, locals=0x821decc, args=0x0,
argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#5 0x080b8b90 in PyEval_EvalCode (co=0x821fff8, globals=0x821decc, locals=0x821decc) at Python/ceval.c:537
#6 0x080da8a2 in PyImport_ExecCodeModuleEx (name=0xbfffda00 "mx.DateTime.DateTime", co=0x821fff8,
pathname=0xbfffd0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#7 0x080dafc2 in load_source_module (name=0xbfffda00 "mx.DateTime.DateTime",
pathname=0xbfffd0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x82088f0) at Python/import.c:894
#8 0x080dc2f0 in load_module (name=0xbfffda00 "mx.DateTime.DateTime", fp=0x82088f0,
buf=0xbfffd560 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.py",
type=1, loader=0x0) at Python/import.c:1699
#9 0x080dd991 in import_submodule (mod=0x8208c1c, subname=0xbfffda0c "DateTime",
fullname=0xbfffda00 "mx.DateTime.DateTime") at Python/import.c:2290
#10 0x080dd14d in load_next (mod=0x8208c1c, altmod=0x812e308, p_name=0xbfffde20,
buf=0xbfffda00 "mx.DateTime.DateTime", p_buflen=0xbfffd9fc) at Python/import.c:2111
#11 0x080dca9a in import_module_ex (name=0x0, globals=0x820849c, locals=0x820849c, fromlist=0x819af9c)
at Python/import.c:1957
#12 0x080dcd87 in PyImport_ImportModuleEx (name=0x8208f1c "DateTime", globals=0x820849c, locals=0x820849c,
fromlist=0x819af9c) at Python/import.c:1998
#13 0x080af037 in builtin___import__ (self=0x0, args=0x820a36c) at Python/bltinmodule.c:45
#14 0x0810ca6e in PyCFunction_Call (func=0x8173ffc, arg=0x820a36c, kw=0x0) at Objects/methodobject.c:73
#15 0x0805c483 in PyObject_Call (func=0x8173ffc, arg=0x820a36c, kw=0x0) at Objects/abstract.c:1755
#16 0x080c1a44 in PyEval_CallObjectWithKeywords (func=0x8173ffc, arg=0x820a36c, kw=0x0)
at Python/ceval.c:3346
#17 0x080bdf28 in eval_frame (f=0x81e5724) at Python/ceval.c:1996
#18 0x080c02ca in PyEval_EvalCodeEx (co=0x820a290, globals=0x820849c, locals=0x820849c, args=0x0,
argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#19 0x080b8b90 in PyEval_EvalCode (co=0x820a290, globals=0x820849c, locals=0x820849c) at Python/ceval.c:537
#20 0x080da8a2 in PyImport_ExecCodeModuleEx (name=0xbfffeea0 "mx.DateTime", co=0x820a290,
pathname=0xbfffe0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
etc. This core was produced simply by importing mx.DateTime.
Cheers,
Jacob Smullyan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /mailman-archives/egenix-users/attachments/20040225/a71bc3d7/attachment-0002.bin
From mal at egenix.com Fri Feb 27 10:14:04 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri Jan 13 15:21:16 2006
Subject: [egenix-users] mx-base 2.0.5 segfaults against Python 2.3.3
--without-pymalloc --with-pydebug
In-Reply-To: <20040225185311.GA5226@smullyan.org>
References: <20040225185311.GA5226@smullyan.org>
Message-ID: <403F0A5C.5010901@egenix.com>
Jacob Smullyan wrote:
> This may be already known, but 2.0.5 segfaults *immediately* with
> Python 2.3.3 configured --without-pymalloc --with-pydebug on 2 linux
> platforms I've tested (gcc 2.95 and 3.3.2). 2.1.0 does not.
While 2.1.0 is more suited for Python versions compiled with
--with-debug, I have to say that we don't support that option.
There are simply too many different configure options available
in Python that it's not possible to accomodate for each and every
combination.
Standard Python compiles should and do work, though. If you find that
there is a problem with the free lists in e.g. mxDateTime causing
a seg fault, then it's the compiler's optimizer not doing a proper
job. Apperently the compilers have a problem with optimizing this
piece of code:
datetime = mxDateTime_FreeList;
mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
datetime->ob_type = &mxDateTime_Type;
In such a case, please edit the C files and comment out the
free list #defines, e.g. for mxDateTime:
/* Define these to have the module use free lists (saves malloc calls) */
#define MXDATETIME_FREELIST
#define MXDATETIMEDELTA_FREELIST
Patches are welcome, of course. It's hard for us to fix bugs that
we cannot reproduce using our standard tools, so if you want these
things fixed, please make suggestions on how to work around the
problem.
Thanks,
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 27 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Thu Feb 5 22:17:38 2004
From: ross at principia.edu (Ross Brattain)
Date: Fri Jan 13 16:00:49 2006
Subject: [egenix-users]
seg fault on import mx.DateTime Python2.3.3 egenix-base-2.0.5
Message-ID: <87fzdon33x.fsf@maas-neotek.comcast.net>
My usual runtime environment is Python 2.2.3 and egenix-base-2.0.4.
I'm update everything and was surprised with this seg fault.
-Ross B.
Debian unstable
# gcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
Thread model: posix
gcc version 3.3.3 20040125 (prerelease) (Debian)
Python 2.3.3 (#1, Feb 5 2004, 21:57:53)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mx.DateTime
zsh: segmentation fault (core dumped) /charting/bin/python2.3
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
#1 0x402ee68a in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:3998
#2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b78c4, kw=0x1) at Objects/methodobject.c:108
#3 0x080aa664 in call_function (pp_stack=0xbfffcecc, oparg=1) at Python/ceval.c:3439
#4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
#5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b5760, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd8e0 "mx.DateTime.DateTime", co=0x402b5760, pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#8 0x080cdb53 in load_source_module (name=0xbfffd8e0 "mx.DateTime.DateTime", pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
#9 0x080cb8be in load_module (name=0xbfffd8e0 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd450 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
#10 0x080cc7b8 in import_submodule (mod=0x4026138c, subname=0xbfffd8ec "DateTime", fullname=0xbfffd8e0 "mx.DateTime.DateTime") at Python/import.c:2290
#11 0x080cc2e3 in load_next (mod=0x4026138c, altmod=0x8116160, p_name=0xbfffd8ec, buf=0xbfffd8e0 "mx.DateTime.DateTime", p_buflen=0xbfffd8dc) at Python/import.c:2111
#12 0x080ce319 in import_module_ex (name=0x0, globals=0x1, locals=0x402a5dfc, fromlist=0x4028750c) at Python/import.c:1957
#13 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
#14 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
#15 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x402aeeb4, kw=0x1) at Objects/methodobject.c:108
#16 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
#17 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x402aeeb4, kw=0x40269bec) at Python/ceval.c:3346
#18 0x080a8794 in eval_frame (f=0x818b02c) at Python/ceval.c:1996
#19 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7b20, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#20 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#21 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffece0 "mx.DateTime", co=0x402a7b20, pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
#22 0x080cdb53 in load_source_module (name=0xbfffece0 "mx.DateTime", pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc", fp=0x81632a0) at Python/import.c:894
#23 0x080cb8be in load_module (name=0xbfffece0 "mx.DateTime", fp=0x81632a0, buf=0xbfffe3c0 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.py", type=1, loader=0x1) at Python/import.c:1699
#24 0x080ce051 in load_package (name=0xbfffece0 "mx.DateTime", pathname=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime") at Python/import.c:951
#25 0x080cb9ed in load_module (name=0xbfffece0 "mx.DateTime", fp=0xbfffe850, buf=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime", type=5, loader=0x1) at Python/import.c:1722
#26 0x080cc7b8 in import_submodule (mod=0x40261374, subname=0xbfffece3 "DateTime", fullname=0xbfffece0 "mx.DateTime") at Python/import.c:2290
#27 0x080cc2e3 in load_next (mod=0x40261374, altmod=0x40261374, p_name=0xbfffece3, buf=0xbfffece0 "mx.DateTime", p_buflen=0xbfffecdc) at Python/import.c:2111
#28 0x080ce40f in import_module_ex (name=0x0, globals=0x1, locals=0x4027879c, fromlist=0x8116160) at Python/import.c:1964
#29 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
#30 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
#31 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x4028075c, kw=0x1) at Objects/methodobject.c:108
#32 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
#33 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x4028075c, kw=0x40269bec) at Python/ceval.c:3346
#34 0x080a8794 in eval_frame (f=0x8183a54) at Python/ceval.c:1996
#35 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7320, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#36 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#37 0x080d7d1b in run_node (n=0x4027879c, filename=0x1 , globals=0x1, locals=0x1, flags=0x1) at Python/pythonrun.c:1265
#38 0x080d724e in PyRun_InteractiveOneFlags (fp=0x1, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:757
#39 0x080d7043 in PyRun_InteractiveLoopFlags (fp=0x40254e20, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:690
#40 0x080d8642 in PyRun_AnyFileExFlags (fp=0x40254e20, filename=0x80ff46a "", closeit=0, flags=0xbffff428) at Python/pythonrun.c:653
#41 0x08054e35 in Py_Main (argc=0, argv=0xbffff4d4) at Modules/main.c:415
#42 0x0805498b in main (argc=1, argv=0x1) at Modules/python.c:23
From mal at egenix.com Fri Feb 6 10:05:49 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri Jan 13 16:00:49 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87fzdon33x.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
Message-ID: <402358ED.2060401@egenix.com>
Ross Brattain wrote:
>
> My usual runtime environment is Python 2.2.3 and egenix-base-2.0.4.
> I'm update everything and was surprised with this seg fault.
Are you using a Python version that's compiled with debug
mode enabled (or have you used such a Python version to
compile mxDateTime) ?
> -Ross B.
>
>
> Debian unstable
>
> # gcc -v
> Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs
> Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
> Thread model: posix
> gcc version 3.3.3 20040125 (prerelease) (Debian)
>
>
> Python 2.3.3 (#1, Feb 5 2004, 21:57:53)
> [GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>
>>>>import mx.DateTime
>
> zsh: segmentation fault (core dumped) /charting/bin/python2.3
>
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
> #1 0x402ee68a in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:3998
> #2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b78c4, kw=0x1) at Objects/methodobject.c:108
> #3 0x080aa664 in call_function (pp_stack=0xbfffcecc, oparg=1) at Python/ceval.c:3439
> #4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
> #5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b5760, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd8e0 "mx.DateTime.DateTime", co=0x402b5760, pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
> #8 0x080cdb53 in load_source_module (name=0xbfffd8e0 "mx.DateTime.DateTime", pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
> #9 0x080cb8be in load_module (name=0xbfffd8e0 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd450 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
> #10 0x080cc7b8 in import_submodule (mod=0x4026138c, subname=0xbfffd8ec "DateTime", fullname=0xbfffd8e0 "mx.DateTime.DateTime") at Python/import.c:2290
> #11 0x080cc2e3 in load_next (mod=0x4026138c, altmod=0x8116160, p_name=0xbfffd8ec, buf=0xbfffd8e0 "mx.DateTime.DateTime", p_buflen=0xbfffd8dc) at Python/import.c:2111
> #12 0x080ce319 in import_module_ex (name=0x0, globals=0x1, locals=0x402a5dfc, fromlist=0x4028750c) at Python/import.c:1957
> #13 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
> #14 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
> #15 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x402aeeb4, kw=0x1) at Objects/methodobject.c:108
> #16 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
> #17 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x402aeeb4, kw=0x40269bec) at Python/ceval.c:3346
> #18 0x080a8794 in eval_frame (f=0x818b02c) at Python/ceval.c:1996
> #19 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7b20, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #20 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #21 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffece0 "mx.DateTime", co=0x402a7b20, pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
> #22 0x080cdb53 in load_source_module (name=0xbfffece0 "mx.DateTime", pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc", fp=0x81632a0) at Python/import.c:894
> #23 0x080cb8be in load_module (name=0xbfffece0 "mx.DateTime", fp=0x81632a0, buf=0xbfffe3c0 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.py", type=1, loader=0x1) at Python/import.c:1699
> #24 0x080ce051 in load_package (name=0xbfffece0 "mx.DateTime", pathname=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime") at Python/import.c:951
> #25 0x080cb9ed in load_module (name=0xbfffece0 "mx.DateTime", fp=0xbfffe850, buf=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime", type=5, loader=0x1) at Python/import.c:1722
> #26 0x080cc7b8 in import_submodule (mod=0x40261374, subname=0xbfffece3 "DateTime", fullname=0xbfffece0 "mx.DateTime") at Python/import.c:2290
> #27 0x080cc2e3 in load_next (mod=0x40261374, altmod=0x40261374, p_name=0xbfffece3, buf=0xbfffece0 "mx.DateTime", p_buflen=0xbfffecdc) at Python/import.c:2111
> #28 0x080ce40f in import_module_ex (name=0x0, globals=0x1, locals=0x4027879c, fromlist=0x8116160) at Python/import.c:1964
> #29 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
> #30 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
> #31 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x4028075c, kw=0x1) at Objects/methodobject.c:108
> #32 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
> #33 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x4028075c, kw=0x40269bec) at Python/ceval.c:3346
> #34 0x080a8794 in eval_frame (f=0x8183a54) at Python/ceval.c:1996
> #35 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7320, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #36 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #37 0x080d7d1b in run_node (n=0x4027879c, filename=0x1 , globals=0x1, locals=0x1, flags=0x1) at Python/pythonrun.c:1265
> #38 0x080d724e in PyRun_InteractiveOneFlags (fp=0x1, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:757
> #39 0x080d7043 in PyRun_InteractiveLoopFlags (fp=0x40254e20, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:690
> #40 0x080d8642 in PyRun_AnyFileExFlags (fp=0x40254e20, filename=0x80ff46a "", closeit=0, flags=0xbffff428) at Python/pythonrun.c:653
> #41 0x08054e35 in Py_Main (argc=0, argv=0xbffff4d4) at Modules/main.c:415
> #42 0x0805498b in main (argc=1, argv=0x1) at Modules/python.c:23
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 06 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Fri Feb 6 16:16:58 2004
From: ross at principia.edu (Ross Brattain)
Date: Fri Jan 13 16:00:49 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402358ED.2060401@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com>
Message-ID: <87d68rg2v9.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
> Are you using a Python version that's compiled with debug
> mode enabled (or have you used such a Python version to
> compile mxDateTime) ?
>
No, just vanilla ./configure.
I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
Because of this line from the backtrace:
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
mxDateTime.c:333 :
#ifdef MXDATETIME_FREELIST
if (mxDateTime_FreeList) {
datetime = mxDateTime_FreeList;
mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
datetime->ob_type = &mxDateTime_Type;
-> _Py_NewReference(datetime);
}
else
#endif
{
datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
if (datetime == NULL)
return NULL;
}
I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
--- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
+++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
@@ -76,7 +76,7 @@
#define STRFTIME_OUTPUT_SIZE 1024
/* Define these to have the module use free lists (saves malloc calls) */
-#define MXDATETIME_FREELIST
+#undef MXDATETIME_FREELIST
#define MXDATETIMEDELTA_FREELIST
/* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
This is not the root cause because, as mentioned, a rebuild of
Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
problem.
My working production environment (different machine) is:
Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
[GCC 3.2.3 20030415 (Debian prerelease)] on linux2
and egenix-base-2.0.4
I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
works.
So is it a gcc problem?
-Ross B.
From ross at principia.edu Fri Feb 6 16:17:41 2004
From: ross at principia.edu (Ross Brattain)
Date: Fri Jan 13 16:00:49 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402358ED.2060401@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com>
Message-ID: <87r7x7eo9m.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
>
> Are you using a Python version that's compiled with debug
> mode enabled (or have you used such a Python version to
> compile mxDateTime) ?
>
Another data point:
Python 2.3.3 (#1, Feb 6 2004, 01:59:49)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
built from:
egenix-mx-base-2.1.0-2003-07-29.zip
(gdb) bt
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:341
#1 0x402eeaba in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:4091
#2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b7914, kw=0x1) at Objects/methodobject.c:108
#3 0x080aa664 in call_function (pp_stack=0xbfffcefc, oparg=1) at Python/ceval.c:3439
#4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
#5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b47a0, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd910 "mx.DateTime.DateTime", co=0x402b47a0, pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#8 0x080cdb53 in load_source_module (name=0xbfffd910 "mx.DateTime.DateTime", pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
#9 0x080cb8be in load_module (name=0xbfffd910 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd480 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
-Ross B.
From mal at egenix.com Mon Feb 9 11:31:50 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri Jan 13 16:00:49 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87ptcsldts.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87ptcsldts.fsf@maas-neotek.comcast.net>
Message-ID: <40276FA6.6030206@egenix.com>
Ross Brattain wrote:
> "M.-A. Lemburg" writes:
>
>
>>Are you using a Python version that's compiled with debug
>>mode enabled (or have you used such a Python version to
>>compile mxDateTime) ?
>>
>
>
> Another data point:
Could you try compiling the package with optimizations disabled
(-O0) ?!
> Python 2.3.3 (#1, Feb 6 2004, 01:59:49)
> [GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
>
> built from:
> egenix-mx-base-2.1.0-2003-07-29.zip
>
> (gdb) bt
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:341
> #1 0x402eeaba in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:4091
> #2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b7914, kw=0x1) at Objects/methodobject.c:108
> #3 0x080aa664 in call_function (pp_stack=0xbfffcefc, oparg=1) at Python/ceval.c:3439
> #4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
> #5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b47a0, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd910 "mx.DateTime.DateTime", co=0x402b47a0, pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
> #8 0x080cdb53 in load_source_module (name=0xbfffd910 "mx.DateTime.DateTime", pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
> #9 0x080cb8be in load_module (name=0xbfffd910 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd480 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
>
> -Ross B.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 09 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Mon Feb 9 11:59:21 2004
From: ross at principia.edu (Ross Brattain)
Date: Fri Jan 13 16:00:49 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <40276FA6.6030206@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87ptcsldts.fsf@maas-neotek.comcast.net>
<40276FA6.6030206@egenix.com>
Message-ID: <87ekt4f2hy.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
> Could you try compiling the package with optimizations disabled
> (-O0) ?!
Python 2.3.3 (#3, Feb 9 2004, 11:51:59)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mx.DateTime
>>> print mx.DateTime.__version__
2.1.0
Vanilla python 2.3.3 build
egenix-mx-base-2.1.0-2003-07-29.zip built with -O0
-Ross B.
From smulloni at smullyan.org Wed Feb 11 12:41:18 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Fri Jan 13 16:00:49 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87d68rg2v9.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
Message-ID: <20040211174118.GA31434@smullyan.org>
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.
I can provide core files, backtraces, etc., upon request.
Cheers,
Jacob Smullyan
On Fri, Feb 06, 2004 at 04:16:58PM -0800, Ross Brattain wrote:
> "M.-A. Lemburg" writes:
>
> > Are you using a Python version that's compiled with debug
> > mode enabled (or have you used such a Python version to
> > compile mxDateTime) ?
> >
>
> No, just vanilla ./configure.
>
> I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
>
> Because of this line from the backtrace:
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
>
> mxDateTime.c:333 :
>
> #ifdef MXDATETIME_FREELIST
> if (mxDateTime_FreeList) {
> datetime = mxDateTime_FreeList;
> mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
> datetime->ob_type = &mxDateTime_Type;
> -> _Py_NewReference(datetime);
> }
> else
> #endif
> {
> datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
> if (datetime == NULL)
> return NULL;
> }
>
> I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
>
> --- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
> +++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
> @@ -76,7 +76,7 @@
> #define STRFTIME_OUTPUT_SIZE 1024
>
> /* Define these to have the module use free lists (saves malloc calls) */
> -#define MXDATETIME_FREELIST
> +#undef MXDATETIME_FREELIST
> #define MXDATETIMEDELTA_FREELIST
>
> /* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
>
>
> This is not the root cause because, as mentioned, a rebuild of
> Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
> problem.
>
> My working production environment (different machine) is:
> Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
> [GCC 3.2.3 20030415 (Debian prerelease)] on linux2
>
> and egenix-base-2.0.4
>
> I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
> works.
>
> So is it a gcc problem?
>
> -Ross B.
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
>
From mal at egenix.com Wed Feb 11 18:45:19 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri Jan 13 16:00:49 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <20040211174118.GA31434@smullyan.org>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
<20040211174118.GA31434@smullyan.org>
Message-ID: <402A783F.6010909@egenix.com>
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 can provide core files, backtraces, etc., upon request.
>
> Cheers,
>
> Jacob Smullyan
>
> On Fri, Feb 06, 2004 at 04:16:58PM -0800, Ross Brattain wrote:
>
>>"M.-A. Lemburg" writes:
>>
>>
>>>Are you using a Python version that's compiled with debug
>>>mode enabled (or have you used such a Python version to
>>>compile mxDateTime) ?
>>>
>>
>>No, just vanilla ./configure.
>>
>>I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
>>
>>Because of this line from the backtrace:
>>#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
>>
>>mxDateTime.c:333 :
>>
>>#ifdef MXDATETIME_FREELIST
>> if (mxDateTime_FreeList) {
>> datetime = mxDateTime_FreeList;
>> mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
>> datetime->ob_type = &mxDateTime_Type;
>>-> _Py_NewReference(datetime);
>> }
>> else
>>#endif
>> {
>> datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
>> if (datetime == NULL)
>> return NULL;
>> }
>>
>>I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
>>
>>--- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
>>+++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
>>@@ -76,7 +76,7 @@
>> #define STRFTIME_OUTPUT_SIZE 1024
>>
>> /* Define these to have the module use free lists (saves malloc calls) */
>>-#define MXDATETIME_FREELIST
>>+#undef MXDATETIME_FREELIST
>> #define MXDATETIMEDELTA_FREELIST
>>
>> /* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
>>
>>
>>This is not the root cause because, as mentioned, a rebuild of
>>Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
>>problem.
>>
>>My working production environment (different machine) is:
>>Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
>>[GCC 3.2.3 20030415 (Debian prerelease)] on linux2
>>
>>and egenix-base-2.0.4
>>
>>I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
>>works.
>>
>>So is it a gcc problem?
>>
>>-Ross B.
>>
>>_______________________________________________________________________
>>eGenix.com User Mailing List http://www.egenix.com/
>>http://lists.egenix.com/mailman/listinfo/egenix-users
>>
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 11 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From smulloni at smullyan.org Wed Feb 11 13:53:20 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Fri Jan 13 16:00:49 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402A783F.6010909@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
<20040211174118.GA31434@smullyan.org> <402A783F.6010909@egenix.com>
Message-ID: <20040211185320.GA31997@smullyan.org>
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
From egrubbs at rackspace.com Thu Feb 19 12:10:39 2004
From: egrubbs at rackspace.com (Edwin Grubbs)
Date: Fri Jan 13 16:00:49 2006
Subject: [egenix-users] DateTimeFrom parser error
Message-ID: <20040219181039.GX5971@rackspace.com>
I get parse error when parsing a date in this format when the hour is
"12".
>>> from mx.DateTime import DateTimeFrom
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
Traceback (most recent call last):
File "", line 1, in ?
File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
return Parser.DateTimeFromString(arg)
File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
raise DateTime.RangeError,\
mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
>>>
But parsing 11 o'clock works fine:
>>> DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>>>
-Edwin
From Jim.Vickroy at noaa.gov Thu Feb 19 11:20:18 2004
From: Jim.Vickroy at noaa.gov (Jim Vickroy)
Date: Fri Jan 13 16:00:49 2006
Subject: [egenix-users] DateTimeFrom parser error
References: <20040219181039.GX5971@rackspace.com>
Message-ID: <4034FE62.2E888FBC@noaa.gov>
Me too.
But eliminating the "PM" designator does not fail:
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 CST')
>>>
My system:
Microsoft Windows 2000
Python 2.3.3
egenix-mx-base-2.0.5.win32-py2.3.exe
Edwin Grubbs wrote:
> I get parse error when parsing a date in this format when the hour is
> "12".
>
> >>> from mx.DateTime import DateTimeFrom
> >>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
> Traceback (most recent call last):
> File "", line 1, in ?
> File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
> return Parser.DateTimeFromString(arg)
> File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
> raise DateTime.RangeError,\
> mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
> >>>
>
> But parsing 11 o'clock works fine:
>
> >>> DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>
> >>>
>
> -Edwin
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
From mal at egenix.com Thu Feb 19 20:22:34 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri Jan 13 16:00:49 2006
Subject: [egenix-users] DateTimeFrom parser error
In-Reply-To: <4034FE62.2E888FBC@noaa.gov>
References: <20040219181039.GX5971@rackspace.com> <4034FE62.2E888FBC@noaa.gov>
Message-ID: <40351B0A.9070401@egenix.com>
Jim Vickroy wrote:
> Me too.
>
> But eliminating the "PM" designator does not fail:
>
>
>>>>DateTimeFrom('Thursday, February 19, 2004 12:05:34 CST')
>
>
>
>
> My system:
>
> Microsoft Windows 2000
> Python 2.3.3
> egenix-mx-base-2.0.5.win32-py2.3.exe
That's a known bug in 2.0.x. It is fixed in the 2.1.x series which still
hasn't made it to general release version because of too many other projects
keeping us busy:
>>> from mx.DateTime import *
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
FWIW, if you are an mxODBC Zope DA user, you're lucky... it ships
with the current 2.1.x versions of egenix-mx-base under the covers.
> Edwin Grubbs wrote:
>
>
>>I get parse error when parsing a date in this format when the hour is
>>"12".
>>
>>
>>>>>from mx.DateTime import DateTimeFrom
>>>>>DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
>>
>>Traceback (most recent call last):
>> File "", line 1, in ?
>> File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
>> return Parser.DateTimeFromString(arg)
>> File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
>> raise DateTime.RangeError,\
>>mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
>>
>>But parsing 11 o'clock works fine:
>>
>>
>>>>>DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>>
>>
>>
>>-Edwin
>>
>>_______________________________________________________________________
>>eGenix.com User Mailing List http://www.egenix.com/
>>http://lists.egenix.com/mailman/listinfo/egenix-users
>
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 19 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From smulloni at smullyan.org Wed Feb 25 13:53:11 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Fri Jan 13 16:00:49 2006
Subject: [egenix-users]
mx-base 2.0.5 segfaults against Python 2.3.3 --without-pymalloc
--with-pydebug
Message-ID: <20040225185311.GA5226@smullyan.org>
This may be already known, but 2.0.5 segfaults *immediately* with
Python 2.3.3 configured --without-pymalloc --with-pydebug on 2 linux
platforms I've tested (gcc 2.95 and 3.3.2). 2.1.0 does not.
From the core backtrace:
#0 0x08082a5f in _Py_ForgetReference (op=0x81a27d0) at Objects/object.c:2000
#1 0x4031a354 in mxDateTime_Free (datetime=0x81a27d0) at mx/DateTime/mxDateTime/mxDateTime.c:365
#2 0x08082ad6 in _Py_Dealloc (op=0x81a27d0) at Objects/object.c:2022
#3 0x080bdb7f in eval_frame (f=0x81aa20c) at Python/ceval.c:1935
#4 0x080c02ca in PyEval_EvalCodeEx (co=0x821fff8, globals=0x821decc, locals=0x821decc, args=0x0,
argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#5 0x080b8b90 in PyEval_EvalCode (co=0x821fff8, globals=0x821decc, locals=0x821decc) at Python/ceval.c:537
#6 0x080da8a2 in PyImport_ExecCodeModuleEx (name=0xbfffda00 "mx.DateTime.DateTime", co=0x821fff8,
pathname=0xbfffd0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#7 0x080dafc2 in load_source_module (name=0xbfffda00 "mx.DateTime.DateTime",
pathname=0xbfffd0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x82088f0) at Python/import.c:894
#8 0x080dc2f0 in load_module (name=0xbfffda00 "mx.DateTime.DateTime", fp=0x82088f0,
buf=0xbfffd560 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.py",
type=1, loader=0x0) at Python/import.c:1699
#9 0x080dd991 in import_submodule (mod=0x8208c1c, subname=0xbfffda0c "DateTime",
fullname=0xbfffda00 "mx.DateTime.DateTime") at Python/import.c:2290
#10 0x080dd14d in load_next (mod=0x8208c1c, altmod=0x812e308, p_name=0xbfffde20,
buf=0xbfffda00 "mx.DateTime.DateTime", p_buflen=0xbfffd9fc) at Python/import.c:2111
#11 0x080dca9a in import_module_ex (name=0x0, globals=0x820849c, locals=0x820849c, fromlist=0x819af9c)
at Python/import.c:1957
#12 0x080dcd87 in PyImport_ImportModuleEx (name=0x8208f1c "DateTime", globals=0x820849c, locals=0x820849c,
fromlist=0x819af9c) at Python/import.c:1998
#13 0x080af037 in builtin___import__ (self=0x0, args=0x820a36c) at Python/bltinmodule.c:45
#14 0x0810ca6e in PyCFunction_Call (func=0x8173ffc, arg=0x820a36c, kw=0x0) at Objects/methodobject.c:73
#15 0x0805c483 in PyObject_Call (func=0x8173ffc, arg=0x820a36c, kw=0x0) at Objects/abstract.c:1755
#16 0x080c1a44 in PyEval_CallObjectWithKeywords (func=0x8173ffc, arg=0x820a36c, kw=0x0)
at Python/ceval.c:3346
#17 0x080bdf28 in eval_frame (f=0x81e5724) at Python/ceval.c:1996
#18 0x080c02ca in PyEval_EvalCodeEx (co=0x820a290, globals=0x820849c, locals=0x820849c, args=0x0,
argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#19 0x080b8b90 in PyEval_EvalCode (co=0x820a290, globals=0x820849c, locals=0x820849c) at Python/ceval.c:537
#20 0x080da8a2 in PyImport_ExecCodeModuleEx (name=0xbfffeea0 "mx.DateTime", co=0x820a290,
pathname=0xbfffe0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
etc. This core was produced simply by importing mx.DateTime.
Cheers,
Jacob Smullyan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /mailman-archives/egenix-users/attachments/20040225/a71bc3d7/attachment-0003.bin
From mal at egenix.com Fri Feb 27 10:14:04 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri Jan 13 16:00:49 2006
Subject: [egenix-users] mx-base 2.0.5 segfaults against Python 2.3.3
--without-pymalloc --with-pydebug
In-Reply-To: <20040225185311.GA5226@smullyan.org>
References: <20040225185311.GA5226@smullyan.org>
Message-ID: <403F0A5C.5010901@egenix.com>
Jacob Smullyan wrote:
> This may be already known, but 2.0.5 segfaults *immediately* with
> Python 2.3.3 configured --without-pymalloc --with-pydebug on 2 linux
> platforms I've tested (gcc 2.95 and 3.3.2). 2.1.0 does not.
While 2.1.0 is more suited for Python versions compiled with
--with-debug, I have to say that we don't support that option.
There are simply too many different configure options available
in Python that it's not possible to accomodate for each and every
combination.
Standard Python compiles should and do work, though. If you find that
there is a problem with the free lists in e.g. mxDateTime causing
a seg fault, then it's the compiler's optimizer not doing a proper
job. Apperently the compilers have a problem with optimizing this
piece of code:
datetime = mxDateTime_FreeList;
mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
datetime->ob_type = &mxDateTime_Type;
In such a case, please edit the C files and comment out the
free list #defines, e.g. for mxDateTime:
/* Define these to have the module use free lists (saves malloc calls) */
#define MXDATETIME_FREELIST
#define MXDATETIMEDELTA_FREELIST
Patches are welcome, of course. It's hard for us to fix bugs that
we cannot reproduce using our standard tools, so if you want these
things fixed, please make suggestions on how to work around the
problem.
Thanks,
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 27 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Thu Feb 5 22:17:38 2004
From: ross at principia.edu (Ross Brattain)
Date: Fri Jan 13 20:01:40 2006
Subject: [egenix-users]
seg fault on import mx.DateTime Python2.3.3 egenix-base-2.0.5
Message-ID: <87fzdon33x.fsf@maas-neotek.comcast.net>
My usual runtime environment is Python 2.2.3 and egenix-base-2.0.4.
I'm update everything and was surprised with this seg fault.
-Ross B.
Debian unstable
# gcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
Thread model: posix
gcc version 3.3.3 20040125 (prerelease) (Debian)
Python 2.3.3 (#1, Feb 5 2004, 21:57:53)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mx.DateTime
zsh: segmentation fault (core dumped) /charting/bin/python2.3
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
#1 0x402ee68a in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:3998
#2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b78c4, kw=0x1) at Objects/methodobject.c:108
#3 0x080aa664 in call_function (pp_stack=0xbfffcecc, oparg=1) at Python/ceval.c:3439
#4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
#5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b5760, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd8e0 "mx.DateTime.DateTime", co=0x402b5760, pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#8 0x080cdb53 in load_source_module (name=0xbfffd8e0 "mx.DateTime.DateTime", pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
#9 0x080cb8be in load_module (name=0xbfffd8e0 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd450 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
#10 0x080cc7b8 in import_submodule (mod=0x4026138c, subname=0xbfffd8ec "DateTime", fullname=0xbfffd8e0 "mx.DateTime.DateTime") at Python/import.c:2290
#11 0x080cc2e3 in load_next (mod=0x4026138c, altmod=0x8116160, p_name=0xbfffd8ec, buf=0xbfffd8e0 "mx.DateTime.DateTime", p_buflen=0xbfffd8dc) at Python/import.c:2111
#12 0x080ce319 in import_module_ex (name=0x0, globals=0x1, locals=0x402a5dfc, fromlist=0x4028750c) at Python/import.c:1957
#13 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
#14 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
#15 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x402aeeb4, kw=0x1) at Objects/methodobject.c:108
#16 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
#17 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x402aeeb4, kw=0x40269bec) at Python/ceval.c:3346
#18 0x080a8794 in eval_frame (f=0x818b02c) at Python/ceval.c:1996
#19 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7b20, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#20 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#21 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffece0 "mx.DateTime", co=0x402a7b20, pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
#22 0x080cdb53 in load_source_module (name=0xbfffece0 "mx.DateTime", pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc", fp=0x81632a0) at Python/import.c:894
#23 0x080cb8be in load_module (name=0xbfffece0 "mx.DateTime", fp=0x81632a0, buf=0xbfffe3c0 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.py", type=1, loader=0x1) at Python/import.c:1699
#24 0x080ce051 in load_package (name=0xbfffece0 "mx.DateTime", pathname=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime") at Python/import.c:951
#25 0x080cb9ed in load_module (name=0xbfffece0 "mx.DateTime", fp=0xbfffe850, buf=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime", type=5, loader=0x1) at Python/import.c:1722
#26 0x080cc7b8 in import_submodule (mod=0x40261374, subname=0xbfffece3 "DateTime", fullname=0xbfffece0 "mx.DateTime") at Python/import.c:2290
#27 0x080cc2e3 in load_next (mod=0x40261374, altmod=0x40261374, p_name=0xbfffece3, buf=0xbfffece0 "mx.DateTime", p_buflen=0xbfffecdc) at Python/import.c:2111
#28 0x080ce40f in import_module_ex (name=0x0, globals=0x1, locals=0x4027879c, fromlist=0x8116160) at Python/import.c:1964
#29 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
#30 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
#31 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x4028075c, kw=0x1) at Objects/methodobject.c:108
#32 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
#33 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x4028075c, kw=0x40269bec) at Python/ceval.c:3346
#34 0x080a8794 in eval_frame (f=0x8183a54) at Python/ceval.c:1996
#35 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7320, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#36 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#37 0x080d7d1b in run_node (n=0x4027879c, filename=0x1 , globals=0x1, locals=0x1, flags=0x1) at Python/pythonrun.c:1265
#38 0x080d724e in PyRun_InteractiveOneFlags (fp=0x1, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:757
#39 0x080d7043 in PyRun_InteractiveLoopFlags (fp=0x40254e20, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:690
#40 0x080d8642 in PyRun_AnyFileExFlags (fp=0x40254e20, filename=0x80ff46a "", closeit=0, flags=0xbffff428) at Python/pythonrun.c:653
#41 0x08054e35 in Py_Main (argc=0, argv=0xbffff4d4) at Modules/main.c:415
#42 0x0805498b in main (argc=1, argv=0x1) at Modules/python.c:23
From mal at egenix.com Fri Feb 6 10:05:49 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri Jan 13 20:01:40 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87fzdon33x.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
Message-ID: <402358ED.2060401@egenix.com>
Ross Brattain wrote:
>
> My usual runtime environment is Python 2.2.3 and egenix-base-2.0.4.
> I'm update everything and was surprised with this seg fault.
Are you using a Python version that's compiled with debug
mode enabled (or have you used such a Python version to
compile mxDateTime) ?
> -Ross B.
>
>
> Debian unstable
>
> # gcc -v
> Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs
> Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
> Thread model: posix
> gcc version 3.3.3 20040125 (prerelease) (Debian)
>
>
> Python 2.3.3 (#1, Feb 5 2004, 21:57:53)
> [GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>
>>>>import mx.DateTime
>
> zsh: segmentation fault (core dumped) /charting/bin/python2.3
>
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
> #1 0x402ee68a in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:3998
> #2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b78c4, kw=0x1) at Objects/methodobject.c:108
> #3 0x080aa664 in call_function (pp_stack=0xbfffcecc, oparg=1) at Python/ceval.c:3439
> #4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
> #5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b5760, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd8e0 "mx.DateTime.DateTime", co=0x402b5760, pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
> #8 0x080cdb53 in load_source_module (name=0xbfffd8e0 "mx.DateTime.DateTime", pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
> #9 0x080cb8be in load_module (name=0xbfffd8e0 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd450 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
> #10 0x080cc7b8 in import_submodule (mod=0x4026138c, subname=0xbfffd8ec "DateTime", fullname=0xbfffd8e0 "mx.DateTime.DateTime") at Python/import.c:2290
> #11 0x080cc2e3 in load_next (mod=0x4026138c, altmod=0x8116160, p_name=0xbfffd8ec, buf=0xbfffd8e0 "mx.DateTime.DateTime", p_buflen=0xbfffd8dc) at Python/import.c:2111
> #12 0x080ce319 in import_module_ex (name=0x0, globals=0x1, locals=0x402a5dfc, fromlist=0x4028750c) at Python/import.c:1957
> #13 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
> #14 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
> #15 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x402aeeb4, kw=0x1) at Objects/methodobject.c:108
> #16 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
> #17 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x402aeeb4, kw=0x40269bec) at Python/ceval.c:3346
> #18 0x080a8794 in eval_frame (f=0x818b02c) at Python/ceval.c:1996
> #19 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7b20, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #20 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #21 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffece0 "mx.DateTime", co=0x402a7b20, pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
> #22 0x080cdb53 in load_source_module (name=0xbfffece0 "mx.DateTime", pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc", fp=0x81632a0) at Python/import.c:894
> #23 0x080cb8be in load_module (name=0xbfffece0 "mx.DateTime", fp=0x81632a0, buf=0xbfffe3c0 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.py", type=1, loader=0x1) at Python/import.c:1699
> #24 0x080ce051 in load_package (name=0xbfffece0 "mx.DateTime", pathname=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime") at Python/import.c:951
> #25 0x080cb9ed in load_module (name=0xbfffece0 "mx.DateTime", fp=0xbfffe850, buf=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime", type=5, loader=0x1) at Python/import.c:1722
> #26 0x080cc7b8 in import_submodule (mod=0x40261374, subname=0xbfffece3 "DateTime", fullname=0xbfffece0 "mx.DateTime") at Python/import.c:2290
> #27 0x080cc2e3 in load_next (mod=0x40261374, altmod=0x40261374, p_name=0xbfffece3, buf=0xbfffece0 "mx.DateTime", p_buflen=0xbfffecdc) at Python/import.c:2111
> #28 0x080ce40f in import_module_ex (name=0x0, globals=0x1, locals=0x4027879c, fromlist=0x8116160) at Python/import.c:1964
> #29 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
> #30 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
> #31 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x4028075c, kw=0x1) at Objects/methodobject.c:108
> #32 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
> #33 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x4028075c, kw=0x40269bec) at Python/ceval.c:3346
> #34 0x080a8794 in eval_frame (f=0x8183a54) at Python/ceval.c:1996
> #35 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7320, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #36 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #37 0x080d7d1b in run_node (n=0x4027879c, filename=0x1 , globals=0x1, locals=0x1, flags=0x1) at Python/pythonrun.c:1265
> #38 0x080d724e in PyRun_InteractiveOneFlags (fp=0x1, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:757
> #39 0x080d7043 in PyRun_InteractiveLoopFlags (fp=0x40254e20, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:690
> #40 0x080d8642 in PyRun_AnyFileExFlags (fp=0x40254e20, filename=0x80ff46a "", closeit=0, flags=0xbffff428) at Python/pythonrun.c:653
> #41 0x08054e35 in Py_Main (argc=0, argv=0xbffff4d4) at Modules/main.c:415
> #42 0x0805498b in main (argc=1, argv=0x1) at Modules/python.c:23
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 06 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Fri Feb 6 16:16:58 2004
From: ross at principia.edu (Ross Brattain)
Date: Fri Jan 13 20:01:40 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402358ED.2060401@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com>
Message-ID: <87d68rg2v9.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
> Are you using a Python version that's compiled with debug
> mode enabled (or have you used such a Python version to
> compile mxDateTime) ?
>
No, just vanilla ./configure.
I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
Because of this line from the backtrace:
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
mxDateTime.c:333 :
#ifdef MXDATETIME_FREELIST
if (mxDateTime_FreeList) {
datetime = mxDateTime_FreeList;
mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
datetime->ob_type = &mxDateTime_Type;
-> _Py_NewReference(datetime);
}
else
#endif
{
datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
if (datetime == NULL)
return NULL;
}
I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
--- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
+++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
@@ -76,7 +76,7 @@
#define STRFTIME_OUTPUT_SIZE 1024
/* Define these to have the module use free lists (saves malloc calls) */
-#define MXDATETIME_FREELIST
+#undef MXDATETIME_FREELIST
#define MXDATETIMEDELTA_FREELIST
/* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
This is not the root cause because, as mentioned, a rebuild of
Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
problem.
My working production environment (different machine) is:
Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
[GCC 3.2.3 20030415 (Debian prerelease)] on linux2
and egenix-base-2.0.4
I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
works.
So is it a gcc problem?
-Ross B.
From ross at principia.edu Fri Feb 6 16:17:41 2004
From: ross at principia.edu (Ross Brattain)
Date: Fri Jan 13 20:01:40 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402358ED.2060401@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com>
Message-ID: <87r7x7eo9m.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
>
> Are you using a Python version that's compiled with debug
> mode enabled (or have you used such a Python version to
> compile mxDateTime) ?
>
Another data point:
Python 2.3.3 (#1, Feb 6 2004, 01:59:49)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
built from:
egenix-mx-base-2.1.0-2003-07-29.zip
(gdb) bt
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:341
#1 0x402eeaba in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:4091
#2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b7914, kw=0x1) at Objects/methodobject.c:108
#3 0x080aa664 in call_function (pp_stack=0xbfffcefc, oparg=1) at Python/ceval.c:3439
#4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
#5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b47a0, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd910 "mx.DateTime.DateTime", co=0x402b47a0, pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#8 0x080cdb53 in load_source_module (name=0xbfffd910 "mx.DateTime.DateTime", pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
#9 0x080cb8be in load_module (name=0xbfffd910 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd480 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
-Ross B.
From mal at egenix.com Mon Feb 9 11:31:50 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri Jan 13 20:01:40 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87ptcsldts.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87ptcsldts.fsf@maas-neotek.comcast.net>
Message-ID: <40276FA6.6030206@egenix.com>
Ross Brattain wrote:
> "M.-A. Lemburg" writes:
>
>
>>Are you using a Python version that's compiled with debug
>>mode enabled (or have you used such a Python version to
>>compile mxDateTime) ?
>>
>
>
> Another data point:
Could you try compiling the package with optimizations disabled
(-O0) ?!
> Python 2.3.3 (#1, Feb 6 2004, 01:59:49)
> [GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
>
> built from:
> egenix-mx-base-2.1.0-2003-07-29.zip
>
> (gdb) bt
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:341
> #1 0x402eeaba in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:4091
> #2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b7914, kw=0x1) at Objects/methodobject.c:108
> #3 0x080aa664 in call_function (pp_stack=0xbfffcefc, oparg=1) at Python/ceval.c:3439
> #4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
> #5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b47a0, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd910 "mx.DateTime.DateTime", co=0x402b47a0, pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
> #8 0x080cdb53 in load_source_module (name=0xbfffd910 "mx.DateTime.DateTime", pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
> #9 0x080cb8be in load_module (name=0xbfffd910 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd480 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
>
> -Ross B.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 09 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Mon Feb 9 11:59:21 2004
From: ross at principia.edu (Ross Brattain)
Date: Fri Jan 13 20:01:40 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <40276FA6.6030206@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87ptcsldts.fsf@maas-neotek.comcast.net>
<40276FA6.6030206@egenix.com>
Message-ID: <87ekt4f2hy.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
> Could you try compiling the package with optimizations disabled
> (-O0) ?!
Python 2.3.3 (#3, Feb 9 2004, 11:51:59)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mx.DateTime
>>> print mx.DateTime.__version__
2.1.0
Vanilla python 2.3.3 build
egenix-mx-base-2.1.0-2003-07-29.zip built with -O0
-Ross B.
From smulloni at smullyan.org Wed Feb 11 12:41:18 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Fri Jan 13 20:01:40 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87d68rg2v9.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
Message-ID: <20040211174118.GA31434@smullyan.org>
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.
I can provide core files, backtraces, etc., upon request.
Cheers,
Jacob Smullyan
On Fri, Feb 06, 2004 at 04:16:58PM -0800, Ross Brattain wrote:
> "M.-A. Lemburg" writes:
>
> > Are you using a Python version that's compiled with debug
> > mode enabled (or have you used such a Python version to
> > compile mxDateTime) ?
> >
>
> No, just vanilla ./configure.
>
> I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
>
> Because of this line from the backtrace:
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
>
> mxDateTime.c:333 :
>
> #ifdef MXDATETIME_FREELIST
> if (mxDateTime_FreeList) {
> datetime = mxDateTime_FreeList;
> mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
> datetime->ob_type = &mxDateTime_Type;
> -> _Py_NewReference(datetime);
> }
> else
> #endif
> {
> datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
> if (datetime == NULL)
> return NULL;
> }
>
> I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
>
> --- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
> +++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
> @@ -76,7 +76,7 @@
> #define STRFTIME_OUTPUT_SIZE 1024
>
> /* Define these to have the module use free lists (saves malloc calls) */
> -#define MXDATETIME_FREELIST
> +#undef MXDATETIME_FREELIST
> #define MXDATETIMEDELTA_FREELIST
>
> /* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
>
>
> This is not the root cause because, as mentioned, a rebuild of
> Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
> problem.
>
> My working production environment (different machine) is:
> Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
> [GCC 3.2.3 20030415 (Debian prerelease)] on linux2
>
> and egenix-base-2.0.4
>
> I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
> works.
>
> So is it a gcc problem?
>
> -Ross B.
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
>
From mal at egenix.com Wed Feb 11 18:45:19 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri Jan 13 20:01:40 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <20040211174118.GA31434@smullyan.org>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
<20040211174118.GA31434@smullyan.org>
Message-ID: <402A783F.6010909@egenix.com>
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 can provide core files, backtraces, etc., upon request.
>
> Cheers,
>
> Jacob Smullyan
>
> On Fri, Feb 06, 2004 at 04:16:58PM -0800, Ross Brattain wrote:
>
>>"M.-A. Lemburg" writes:
>>
>>
>>>Are you using a Python version that's compiled with debug
>>>mode enabled (or have you used such a Python version to
>>>compile mxDateTime) ?
>>>
>>
>>No, just vanilla ./configure.
>>
>>I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
>>
>>Because of this line from the backtrace:
>>#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
>>
>>mxDateTime.c:333 :
>>
>>#ifdef MXDATETIME_FREELIST
>> if (mxDateTime_FreeList) {
>> datetime = mxDateTime_FreeList;
>> mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
>> datetime->ob_type = &mxDateTime_Type;
>>-> _Py_NewReference(datetime);
>> }
>> else
>>#endif
>> {
>> datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
>> if (datetime == NULL)
>> return NULL;
>> }
>>
>>I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
>>
>>--- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
>>+++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
>>@@ -76,7 +76,7 @@
>> #define STRFTIME_OUTPUT_SIZE 1024
>>
>> /* Define these to have the module use free lists (saves malloc calls) */
>>-#define MXDATETIME_FREELIST
>>+#undef MXDATETIME_FREELIST
>> #define MXDATETIMEDELTA_FREELIST
>>
>> /* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
>>
>>
>>This is not the root cause because, as mentioned, a rebuild of
>>Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
>>problem.
>>
>>My working production environment (different machine) is:
>>Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
>>[GCC 3.2.3 20030415 (Debian prerelease)] on linux2
>>
>>and egenix-base-2.0.4
>>
>>I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
>>works.
>>
>>So is it a gcc problem?
>>
>>-Ross B.
>>
>>_______________________________________________________________________
>>eGenix.com User Mailing List http://www.egenix.com/
>>http://lists.egenix.com/mailman/listinfo/egenix-users
>>
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 11 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From smulloni at smullyan.org Wed Feb 11 13:53:20 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Fri Jan 13 20:01:40 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402A783F.6010909@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
<20040211174118.GA31434@smullyan.org> <402A783F.6010909@egenix.com>
Message-ID: <20040211185320.GA31997@smullyan.org>
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
From egrubbs at rackspace.com Thu Feb 19 12:10:39 2004
From: egrubbs at rackspace.com (Edwin Grubbs)
Date: Fri Jan 13 20:01:40 2006
Subject: [egenix-users] DateTimeFrom parser error
Message-ID: <20040219181039.GX5971@rackspace.com>
I get parse error when parsing a date in this format when the hour is
"12".
>>> from mx.DateTime import DateTimeFrom
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
Traceback (most recent call last):
File "", line 1, in ?
File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
return Parser.DateTimeFromString(arg)
File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
raise DateTime.RangeError,\
mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
>>>
But parsing 11 o'clock works fine:
>>> DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>>>
-Edwin
From Jim.Vickroy at noaa.gov Thu Feb 19 11:20:18 2004
From: Jim.Vickroy at noaa.gov (Jim Vickroy)
Date: Fri Jan 13 20:01:40 2006
Subject: [egenix-users] DateTimeFrom parser error
References: <20040219181039.GX5971@rackspace.com>
Message-ID: <4034FE62.2E888FBC@noaa.gov>
Me too.
But eliminating the "PM" designator does not fail:
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 CST')
>>>
My system:
Microsoft Windows 2000
Python 2.3.3
egenix-mx-base-2.0.5.win32-py2.3.exe
Edwin Grubbs wrote:
> I get parse error when parsing a date in this format when the hour is
> "12".
>
> >>> from mx.DateTime import DateTimeFrom
> >>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
> Traceback (most recent call last):
> File "", line 1, in ?
> File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
> return Parser.DateTimeFromString(arg)
> File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
> raise DateTime.RangeError,\
> mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
> >>>
>
> But parsing 11 o'clock works fine:
>
> >>> DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>
> >>>
>
> -Edwin
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
From mal at egenix.com Thu Feb 19 20:22:34 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri Jan 13 20:01:40 2006
Subject: [egenix-users] DateTimeFrom parser error
In-Reply-To: <4034FE62.2E888FBC@noaa.gov>
References: <20040219181039.GX5971@rackspace.com> <4034FE62.2E888FBC@noaa.gov>
Message-ID: <40351B0A.9070401@egenix.com>
Jim Vickroy wrote:
> Me too.
>
> But eliminating the "PM" designator does not fail:
>
>
>>>>DateTimeFrom('Thursday, February 19, 2004 12:05:34 CST')
>
>
>
>
> My system:
>
> Microsoft Windows 2000
> Python 2.3.3
> egenix-mx-base-2.0.5.win32-py2.3.exe
That's a known bug in 2.0.x. It is fixed in the 2.1.x series which still
hasn't made it to general release version because of too many other projects
keeping us busy:
>>> from mx.DateTime import *
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
FWIW, if you are an mxODBC Zope DA user, you're lucky... it ships
with the current 2.1.x versions of egenix-mx-base under the covers.
> Edwin Grubbs wrote:
>
>
>>I get parse error when parsing a date in this format when the hour is
>>"12".
>>
>>
>>>>>from mx.DateTime import DateTimeFrom
>>>>>DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
>>
>>Traceback (most recent call last):
>> File "", line 1, in ?
>> File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
>> return Parser.DateTimeFromString(arg)
>> File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
>> raise DateTime.RangeError,\
>>mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
>>
>>But parsing 11 o'clock works fine:
>>
>>
>>>>>DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>>
>>
>>
>>-Edwin
>>
>>_______________________________________________________________________
>>eGenix.com User Mailing List http://www.egenix.com/
>>http://lists.egenix.com/mailman/listinfo/egenix-users
>
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 19 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From smulloni at smullyan.org Wed Feb 25 13:53:11 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Fri Jan 13 20:01:41 2006
Subject: [egenix-users]
mx-base 2.0.5 segfaults against Python 2.3.3 --without-pymalloc
--with-pydebug
Message-ID: <20040225185311.GA5226@smullyan.org>
This may be already known, but 2.0.5 segfaults *immediately* with
Python 2.3.3 configured --without-pymalloc --with-pydebug on 2 linux
platforms I've tested (gcc 2.95 and 3.3.2). 2.1.0 does not.
From the core backtrace:
#0 0x08082a5f in _Py_ForgetReference (op=0x81a27d0) at Objects/object.c:2000
#1 0x4031a354 in mxDateTime_Free (datetime=0x81a27d0) at mx/DateTime/mxDateTime/mxDateTime.c:365
#2 0x08082ad6 in _Py_Dealloc (op=0x81a27d0) at Objects/object.c:2022
#3 0x080bdb7f in eval_frame (f=0x81aa20c) at Python/ceval.c:1935
#4 0x080c02ca in PyEval_EvalCodeEx (co=0x821fff8, globals=0x821decc, locals=0x821decc, args=0x0,
argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#5 0x080b8b90 in PyEval_EvalCode (co=0x821fff8, globals=0x821decc, locals=0x821decc) at Python/ceval.c:537
#6 0x080da8a2 in PyImport_ExecCodeModuleEx (name=0xbfffda00 "mx.DateTime.DateTime", co=0x821fff8,
pathname=0xbfffd0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#7 0x080dafc2 in load_source_module (name=0xbfffda00 "mx.DateTime.DateTime",
pathname=0xbfffd0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x82088f0) at Python/import.c:894
#8 0x080dc2f0 in load_module (name=0xbfffda00 "mx.DateTime.DateTime", fp=0x82088f0,
buf=0xbfffd560 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.py",
type=1, loader=0x0) at Python/import.c:1699
#9 0x080dd991 in import_submodule (mod=0x8208c1c, subname=0xbfffda0c "DateTime",
fullname=0xbfffda00 "mx.DateTime.DateTime") at Python/import.c:2290
#10 0x080dd14d in load_next (mod=0x8208c1c, altmod=0x812e308, p_name=0xbfffde20,
buf=0xbfffda00 "mx.DateTime.DateTime", p_buflen=0xbfffd9fc) at Python/import.c:2111
#11 0x080dca9a in import_module_ex (name=0x0, globals=0x820849c, locals=0x820849c, fromlist=0x819af9c)
at Python/import.c:1957
#12 0x080dcd87 in PyImport_ImportModuleEx (name=0x8208f1c "DateTime", globals=0x820849c, locals=0x820849c,
fromlist=0x819af9c) at Python/import.c:1998
#13 0x080af037 in builtin___import__ (self=0x0, args=0x820a36c) at Python/bltinmodule.c:45
#14 0x0810ca6e in PyCFunction_Call (func=0x8173ffc, arg=0x820a36c, kw=0x0) at Objects/methodobject.c:73
#15 0x0805c483 in PyObject_Call (func=0x8173ffc, arg=0x820a36c, kw=0x0) at Objects/abstract.c:1755
#16 0x080c1a44 in PyEval_CallObjectWithKeywords (func=0x8173ffc, arg=0x820a36c, kw=0x0)
at Python/ceval.c:3346
#17 0x080bdf28 in eval_frame (f=0x81e5724) at Python/ceval.c:1996
#18 0x080c02ca in PyEval_EvalCodeEx (co=0x820a290, globals=0x820849c, locals=0x820849c, args=0x0,
argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#19 0x080b8b90 in PyEval_EvalCode (co=0x820a290, globals=0x820849c, locals=0x820849c) at Python/ceval.c:537
#20 0x080da8a2 in PyImport_ExecCodeModuleEx (name=0xbfffeea0 "mx.DateTime", co=0x820a290,
pathname=0xbfffe0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
etc. This core was produced simply by importing mx.DateTime.
Cheers,
Jacob Smullyan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /mailman-archives/egenix-users/attachments/20040225/a71bc3d7/attachment-0004.bin
From mal at egenix.com Fri Feb 27 10:14:04 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri Jan 13 20:01:41 2006
Subject: [egenix-users] mx-base 2.0.5 segfaults against Python 2.3.3
--without-pymalloc --with-pydebug
In-Reply-To: <20040225185311.GA5226@smullyan.org>
References: <20040225185311.GA5226@smullyan.org>
Message-ID: <403F0A5C.5010901@egenix.com>
Jacob Smullyan wrote:
> This may be already known, but 2.0.5 segfaults *immediately* with
> Python 2.3.3 configured --without-pymalloc --with-pydebug on 2 linux
> platforms I've tested (gcc 2.95 and 3.3.2). 2.1.0 does not.
While 2.1.0 is more suited for Python versions compiled with
--with-debug, I have to say that we don't support that option.
There are simply too many different configure options available
in Python that it's not possible to accomodate for each and every
combination.
Standard Python compiles should and do work, though. If you find that
there is a problem with the free lists in e.g. mxDateTime causing
a seg fault, then it's the compiler's optimizer not doing a proper
job. Apperently the compilers have a problem with optimizing this
piece of code:
datetime = mxDateTime_FreeList;
mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
datetime->ob_type = &mxDateTime_Type;
In such a case, please edit the C files and comment out the
free list #defines, e.g. for mxDateTime:
/* Define these to have the module use free lists (saves malloc calls) */
#define MXDATETIME_FREELIST
#define MXDATETIMEDELTA_FREELIST
Patches are welcome, of course. It's hard for us to fix bugs that
we cannot reproduce using our standard tools, so if you want these
things fixed, please make suggestions on how to work around the
problem.
Thanks,
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 27 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Thu Feb 5 22:17:38 2004
From: ross at principia.edu (Ross Brattain)
Date: Sat Jan 14 08:02:20 2006
Subject: [egenix-users]
seg fault on import mx.DateTime Python2.3.3 egenix-base-2.0.5
Message-ID: <87fzdon33x.fsf@maas-neotek.comcast.net>
My usual runtime environment is Python 2.2.3 and egenix-base-2.0.4.
I'm update everything and was surprised with this seg fault.
-Ross B.
Debian unstable
# gcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
Thread model: posix
gcc version 3.3.3 20040125 (prerelease) (Debian)
Python 2.3.3 (#1, Feb 5 2004, 21:57:53)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mx.DateTime
zsh: segmentation fault (core dumped) /charting/bin/python2.3
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
#1 0x402ee68a in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:3998
#2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b78c4, kw=0x1) at Objects/methodobject.c:108
#3 0x080aa664 in call_function (pp_stack=0xbfffcecc, oparg=1) at Python/ceval.c:3439
#4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
#5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b5760, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd8e0 "mx.DateTime.DateTime", co=0x402b5760, pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#8 0x080cdb53 in load_source_module (name=0xbfffd8e0 "mx.DateTime.DateTime", pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
#9 0x080cb8be in load_module (name=0xbfffd8e0 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd450 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
#10 0x080cc7b8 in import_submodule (mod=0x4026138c, subname=0xbfffd8ec "DateTime", fullname=0xbfffd8e0 "mx.DateTime.DateTime") at Python/import.c:2290
#11 0x080cc2e3 in load_next (mod=0x4026138c, altmod=0x8116160, p_name=0xbfffd8ec, buf=0xbfffd8e0 "mx.DateTime.DateTime", p_buflen=0xbfffd8dc) at Python/import.c:2111
#12 0x080ce319 in import_module_ex (name=0x0, globals=0x1, locals=0x402a5dfc, fromlist=0x4028750c) at Python/import.c:1957
#13 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
#14 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
#15 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x402aeeb4, kw=0x1) at Objects/methodobject.c:108
#16 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
#17 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x402aeeb4, kw=0x40269bec) at Python/ceval.c:3346
#18 0x080a8794 in eval_frame (f=0x818b02c) at Python/ceval.c:1996
#19 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7b20, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#20 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#21 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffece0 "mx.DateTime", co=0x402a7b20, pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
#22 0x080cdb53 in load_source_module (name=0xbfffece0 "mx.DateTime", pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc", fp=0x81632a0) at Python/import.c:894
#23 0x080cb8be in load_module (name=0xbfffece0 "mx.DateTime", fp=0x81632a0, buf=0xbfffe3c0 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.py", type=1, loader=0x1) at Python/import.c:1699
#24 0x080ce051 in load_package (name=0xbfffece0 "mx.DateTime", pathname=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime") at Python/import.c:951
#25 0x080cb9ed in load_module (name=0xbfffece0 "mx.DateTime", fp=0xbfffe850, buf=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime", type=5, loader=0x1) at Python/import.c:1722
#26 0x080cc7b8 in import_submodule (mod=0x40261374, subname=0xbfffece3 "DateTime", fullname=0xbfffece0 "mx.DateTime") at Python/import.c:2290
#27 0x080cc2e3 in load_next (mod=0x40261374, altmod=0x40261374, p_name=0xbfffece3, buf=0xbfffece0 "mx.DateTime", p_buflen=0xbfffecdc) at Python/import.c:2111
#28 0x080ce40f in import_module_ex (name=0x0, globals=0x1, locals=0x4027879c, fromlist=0x8116160) at Python/import.c:1964
#29 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
#30 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
#31 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x4028075c, kw=0x1) at Objects/methodobject.c:108
#32 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
#33 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x4028075c, kw=0x40269bec) at Python/ceval.c:3346
#34 0x080a8794 in eval_frame (f=0x8183a54) at Python/ceval.c:1996
#35 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7320, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#36 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#37 0x080d7d1b in run_node (n=0x4027879c, filename=0x1 , globals=0x1, locals=0x1, flags=0x1) at Python/pythonrun.c:1265
#38 0x080d724e in PyRun_InteractiveOneFlags (fp=0x1, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:757
#39 0x080d7043 in PyRun_InteractiveLoopFlags (fp=0x40254e20, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:690
#40 0x080d8642 in PyRun_AnyFileExFlags (fp=0x40254e20, filename=0x80ff46a "", closeit=0, flags=0xbffff428) at Python/pythonrun.c:653
#41 0x08054e35 in Py_Main (argc=0, argv=0xbffff4d4) at Modules/main.c:415
#42 0x0805498b in main (argc=1, argv=0x1) at Modules/python.c:23
From mal at egenix.com Fri Feb 6 10:05:49 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Sat Jan 14 08:02:21 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87fzdon33x.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
Message-ID: <402358ED.2060401@egenix.com>
Ross Brattain wrote:
>
> My usual runtime environment is Python 2.2.3 and egenix-base-2.0.4.
> I'm update everything and was surprised with this seg fault.
Are you using a Python version that's compiled with debug
mode enabled (or have you used such a Python version to
compile mxDateTime) ?
> -Ross B.
>
>
> Debian unstable
>
> # gcc -v
> Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs
> Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
> Thread model: posix
> gcc version 3.3.3 20040125 (prerelease) (Debian)
>
>
> Python 2.3.3 (#1, Feb 5 2004, 21:57:53)
> [GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>
>>>>import mx.DateTime
>
> zsh: segmentation fault (core dumped) /charting/bin/python2.3
>
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
> #1 0x402ee68a in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:3998
> #2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b78c4, kw=0x1) at Objects/methodobject.c:108
> #3 0x080aa664 in call_function (pp_stack=0xbfffcecc, oparg=1) at Python/ceval.c:3439
> #4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
> #5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b5760, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd8e0 "mx.DateTime.DateTime", co=0x402b5760, pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
> #8 0x080cdb53 in load_source_module (name=0xbfffd8e0 "mx.DateTime.DateTime", pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
> #9 0x080cb8be in load_module (name=0xbfffd8e0 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd450 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
> #10 0x080cc7b8 in import_submodule (mod=0x4026138c, subname=0xbfffd8ec "DateTime", fullname=0xbfffd8e0 "mx.DateTime.DateTime") at Python/import.c:2290
> #11 0x080cc2e3 in load_next (mod=0x4026138c, altmod=0x8116160, p_name=0xbfffd8ec, buf=0xbfffd8e0 "mx.DateTime.DateTime", p_buflen=0xbfffd8dc) at Python/import.c:2111
> #12 0x080ce319 in import_module_ex (name=0x0, globals=0x1, locals=0x402a5dfc, fromlist=0x4028750c) at Python/import.c:1957
> #13 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
> #14 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
> #15 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x402aeeb4, kw=0x1) at Objects/methodobject.c:108
> #16 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
> #17 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x402aeeb4, kw=0x40269bec) at Python/ceval.c:3346
> #18 0x080a8794 in eval_frame (f=0x818b02c) at Python/ceval.c:1996
> #19 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7b20, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #20 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #21 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffece0 "mx.DateTime", co=0x402a7b20, pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
> #22 0x080cdb53 in load_source_module (name=0xbfffece0 "mx.DateTime", pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc", fp=0x81632a0) at Python/import.c:894
> #23 0x080cb8be in load_module (name=0xbfffece0 "mx.DateTime", fp=0x81632a0, buf=0xbfffe3c0 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.py", type=1, loader=0x1) at Python/import.c:1699
> #24 0x080ce051 in load_package (name=0xbfffece0 "mx.DateTime", pathname=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime") at Python/import.c:951
> #25 0x080cb9ed in load_module (name=0xbfffece0 "mx.DateTime", fp=0xbfffe850, buf=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime", type=5, loader=0x1) at Python/import.c:1722
> #26 0x080cc7b8 in import_submodule (mod=0x40261374, subname=0xbfffece3 "DateTime", fullname=0xbfffece0 "mx.DateTime") at Python/import.c:2290
> #27 0x080cc2e3 in load_next (mod=0x40261374, altmod=0x40261374, p_name=0xbfffece3, buf=0xbfffece0 "mx.DateTime", p_buflen=0xbfffecdc) at Python/import.c:2111
> #28 0x080ce40f in import_module_ex (name=0x0, globals=0x1, locals=0x4027879c, fromlist=0x8116160) at Python/import.c:1964
> #29 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
> #30 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
> #31 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x4028075c, kw=0x1) at Objects/methodobject.c:108
> #32 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
> #33 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x4028075c, kw=0x40269bec) at Python/ceval.c:3346
> #34 0x080a8794 in eval_frame (f=0x8183a54) at Python/ceval.c:1996
> #35 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7320, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #36 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #37 0x080d7d1b in run_node (n=0x4027879c, filename=0x1 , globals=0x1, locals=0x1, flags=0x1) at Python/pythonrun.c:1265
> #38 0x080d724e in PyRun_InteractiveOneFlags (fp=0x1, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:757
> #39 0x080d7043 in PyRun_InteractiveLoopFlags (fp=0x40254e20, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:690
> #40 0x080d8642 in PyRun_AnyFileExFlags (fp=0x40254e20, filename=0x80ff46a "", closeit=0, flags=0xbffff428) at Python/pythonrun.c:653
> #41 0x08054e35 in Py_Main (argc=0, argv=0xbffff4d4) at Modules/main.c:415
> #42 0x0805498b in main (argc=1, argv=0x1) at Modules/python.c:23
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 06 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Fri Feb 6 16:16:58 2004
From: ross at principia.edu (Ross Brattain)
Date: Sat Jan 14 08:02:21 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402358ED.2060401@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com>
Message-ID: <87d68rg2v9.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
> Are you using a Python version that's compiled with debug
> mode enabled (or have you used such a Python version to
> compile mxDateTime) ?
>
No, just vanilla ./configure.
I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
Because of this line from the backtrace:
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
mxDateTime.c:333 :
#ifdef MXDATETIME_FREELIST
if (mxDateTime_FreeList) {
datetime = mxDateTime_FreeList;
mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
datetime->ob_type = &mxDateTime_Type;
-> _Py_NewReference(datetime);
}
else
#endif
{
datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
if (datetime == NULL)
return NULL;
}
I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
--- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
+++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
@@ -76,7 +76,7 @@
#define STRFTIME_OUTPUT_SIZE 1024
/* Define these to have the module use free lists (saves malloc calls) */
-#define MXDATETIME_FREELIST
+#undef MXDATETIME_FREELIST
#define MXDATETIMEDELTA_FREELIST
/* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
This is not the root cause because, as mentioned, a rebuild of
Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
problem.
My working production environment (different machine) is:
Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
[GCC 3.2.3 20030415 (Debian prerelease)] on linux2
and egenix-base-2.0.4
I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
works.
So is it a gcc problem?
-Ross B.
From ross at principia.edu Fri Feb 6 16:17:41 2004
From: ross at principia.edu (Ross Brattain)
Date: Sat Jan 14 08:02:21 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402358ED.2060401@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com>
Message-ID: <87r7x7eo9m.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
>
> Are you using a Python version that's compiled with debug
> mode enabled (or have you used such a Python version to
> compile mxDateTime) ?
>
Another data point:
Python 2.3.3 (#1, Feb 6 2004, 01:59:49)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
built from:
egenix-mx-base-2.1.0-2003-07-29.zip
(gdb) bt
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:341
#1 0x402eeaba in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:4091
#2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b7914, kw=0x1) at Objects/methodobject.c:108
#3 0x080aa664 in call_function (pp_stack=0xbfffcefc, oparg=1) at Python/ceval.c:3439
#4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
#5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b47a0, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd910 "mx.DateTime.DateTime", co=0x402b47a0, pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#8 0x080cdb53 in load_source_module (name=0xbfffd910 "mx.DateTime.DateTime", pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
#9 0x080cb8be in load_module (name=0xbfffd910 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd480 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
-Ross B.
From mal at egenix.com Mon Feb 9 11:31:50 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Sat Jan 14 08:02:21 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87ptcsldts.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87ptcsldts.fsf@maas-neotek.comcast.net>
Message-ID: <40276FA6.6030206@egenix.com>
Ross Brattain wrote:
> "M.-A. Lemburg" writes:
>
>
>>Are you using a Python version that's compiled with debug
>>mode enabled (or have you used such a Python version to
>>compile mxDateTime) ?
>>
>
>
> Another data point:
Could you try compiling the package with optimizations disabled
(-O0) ?!
> Python 2.3.3 (#1, Feb 6 2004, 01:59:49)
> [GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
>
> built from:
> egenix-mx-base-2.1.0-2003-07-29.zip
>
> (gdb) bt
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:341
> #1 0x402eeaba in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:4091
> #2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b7914, kw=0x1) at Objects/methodobject.c:108
> #3 0x080aa664 in call_function (pp_stack=0xbfffcefc, oparg=1) at Python/ceval.c:3439
> #4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
> #5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b47a0, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd910 "mx.DateTime.DateTime", co=0x402b47a0, pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
> #8 0x080cdb53 in load_source_module (name=0xbfffd910 "mx.DateTime.DateTime", pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
> #9 0x080cb8be in load_module (name=0xbfffd910 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd480 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
>
> -Ross B.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 09 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Mon Feb 9 11:59:21 2004
From: ross at principia.edu (Ross Brattain)
Date: Sat Jan 14 08:02:21 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <40276FA6.6030206@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87ptcsldts.fsf@maas-neotek.comcast.net>
<40276FA6.6030206@egenix.com>
Message-ID: <87ekt4f2hy.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
> Could you try compiling the package with optimizations disabled
> (-O0) ?!
Python 2.3.3 (#3, Feb 9 2004, 11:51:59)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mx.DateTime
>>> print mx.DateTime.__version__
2.1.0
Vanilla python 2.3.3 build
egenix-mx-base-2.1.0-2003-07-29.zip built with -O0
-Ross B.
From smulloni at smullyan.org Wed Feb 11 12:41:18 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Sat Jan 14 08:02:21 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87d68rg2v9.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
Message-ID: <20040211174118.GA31434@smullyan.org>
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.
I can provide core files, backtraces, etc., upon request.
Cheers,
Jacob Smullyan
On Fri, Feb 06, 2004 at 04:16:58PM -0800, Ross Brattain wrote:
> "M.-A. Lemburg" writes:
>
> > Are you using a Python version that's compiled with debug
> > mode enabled (or have you used such a Python version to
> > compile mxDateTime) ?
> >
>
> No, just vanilla ./configure.
>
> I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
>
> Because of this line from the backtrace:
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
>
> mxDateTime.c:333 :
>
> #ifdef MXDATETIME_FREELIST
> if (mxDateTime_FreeList) {
> datetime = mxDateTime_FreeList;
> mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
> datetime->ob_type = &mxDateTime_Type;
> -> _Py_NewReference(datetime);
> }
> else
> #endif
> {
> datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
> if (datetime == NULL)
> return NULL;
> }
>
> I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
>
> --- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
> +++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
> @@ -76,7 +76,7 @@
> #define STRFTIME_OUTPUT_SIZE 1024
>
> /* Define these to have the module use free lists (saves malloc calls) */
> -#define MXDATETIME_FREELIST
> +#undef MXDATETIME_FREELIST
> #define MXDATETIMEDELTA_FREELIST
>
> /* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
>
>
> This is not the root cause because, as mentioned, a rebuild of
> Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
> problem.
>
> My working production environment (different machine) is:
> Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
> [GCC 3.2.3 20030415 (Debian prerelease)] on linux2
>
> and egenix-base-2.0.4
>
> I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
> works.
>
> So is it a gcc problem?
>
> -Ross B.
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
>
From mal at egenix.com Wed Feb 11 18:45:19 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Sat Jan 14 08:02:21 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <20040211174118.GA31434@smullyan.org>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
<20040211174118.GA31434@smullyan.org>
Message-ID: <402A783F.6010909@egenix.com>
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 can provide core files, backtraces, etc., upon request.
>
> Cheers,
>
> Jacob Smullyan
>
> On Fri, Feb 06, 2004 at 04:16:58PM -0800, Ross Brattain wrote:
>
>>"M.-A. Lemburg" writes:
>>
>>
>>>Are you using a Python version that's compiled with debug
>>>mode enabled (or have you used such a Python version to
>>>compile mxDateTime) ?
>>>
>>
>>No, just vanilla ./configure.
>>
>>I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
>>
>>Because of this line from the backtrace:
>>#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
>>
>>mxDateTime.c:333 :
>>
>>#ifdef MXDATETIME_FREELIST
>> if (mxDateTime_FreeList) {
>> datetime = mxDateTime_FreeList;
>> mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
>> datetime->ob_type = &mxDateTime_Type;
>>-> _Py_NewReference(datetime);
>> }
>> else
>>#endif
>> {
>> datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
>> if (datetime == NULL)
>> return NULL;
>> }
>>
>>I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
>>
>>--- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
>>+++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
>>@@ -76,7 +76,7 @@
>> #define STRFTIME_OUTPUT_SIZE 1024
>>
>> /* Define these to have the module use free lists (saves malloc calls) */
>>-#define MXDATETIME_FREELIST
>>+#undef MXDATETIME_FREELIST
>> #define MXDATETIMEDELTA_FREELIST
>>
>> /* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
>>
>>
>>This is not the root cause because, as mentioned, a rebuild of
>>Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
>>problem.
>>
>>My working production environment (different machine) is:
>>Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
>>[GCC 3.2.3 20030415 (Debian prerelease)] on linux2
>>
>>and egenix-base-2.0.4
>>
>>I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
>>works.
>>
>>So is it a gcc problem?
>>
>>-Ross B.
>>
>>_______________________________________________________________________
>>eGenix.com User Mailing List http://www.egenix.com/
>>http://lists.egenix.com/mailman/listinfo/egenix-users
>>
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 11 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From smulloni at smullyan.org Wed Feb 11 13:53:20 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Sat Jan 14 08:02:21 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402A783F.6010909@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
<20040211174118.GA31434@smullyan.org> <402A783F.6010909@egenix.com>
Message-ID: <20040211185320.GA31997@smullyan.org>
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
From egrubbs at rackspace.com Thu Feb 19 12:10:39 2004
From: egrubbs at rackspace.com (Edwin Grubbs)
Date: Sat Jan 14 08:02:21 2006
Subject: [egenix-users] DateTimeFrom parser error
Message-ID: <20040219181039.GX5971@rackspace.com>
I get parse error when parsing a date in this format when the hour is
"12".
>>> from mx.DateTime import DateTimeFrom
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
Traceback (most recent call last):
File "", line 1, in ?
File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
return Parser.DateTimeFromString(arg)
File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
raise DateTime.RangeError,\
mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
>>>
But parsing 11 o'clock works fine:
>>> DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>>>
-Edwin
From Jim.Vickroy at noaa.gov Thu Feb 19 11:20:18 2004
From: Jim.Vickroy at noaa.gov (Jim Vickroy)
Date: Sat Jan 14 08:02:21 2006
Subject: [egenix-users] DateTimeFrom parser error
References: <20040219181039.GX5971@rackspace.com>
Message-ID: <4034FE62.2E888FBC@noaa.gov>
Me too.
But eliminating the "PM" designator does not fail:
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 CST')
>>>
My system:
Microsoft Windows 2000
Python 2.3.3
egenix-mx-base-2.0.5.win32-py2.3.exe
Edwin Grubbs wrote:
> I get parse error when parsing a date in this format when the hour is
> "12".
>
> >>> from mx.DateTime import DateTimeFrom
> >>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
> Traceback (most recent call last):
> File "", line 1, in ?
> File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
> return Parser.DateTimeFromString(arg)
> File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
> raise DateTime.RangeError,\
> mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
> >>>
>
> But parsing 11 o'clock works fine:
>
> >>> DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>
> >>>
>
> -Edwin
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
From mal at egenix.com Thu Feb 19 20:22:34 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Sat Jan 14 08:02:21 2006
Subject: [egenix-users] DateTimeFrom parser error
In-Reply-To: <4034FE62.2E888FBC@noaa.gov>
References: <20040219181039.GX5971@rackspace.com> <4034FE62.2E888FBC@noaa.gov>
Message-ID: <40351B0A.9070401@egenix.com>
Jim Vickroy wrote:
> Me too.
>
> But eliminating the "PM" designator does not fail:
>
>
>>>>DateTimeFrom('Thursday, February 19, 2004 12:05:34 CST')
>
>
>
>
> My system:
>
> Microsoft Windows 2000
> Python 2.3.3
> egenix-mx-base-2.0.5.win32-py2.3.exe
That's a known bug in 2.0.x. It is fixed in the 2.1.x series which still
hasn't made it to general release version because of too many other projects
keeping us busy:
>>> from mx.DateTime import *
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
FWIW, if you are an mxODBC Zope DA user, you're lucky... it ships
with the current 2.1.x versions of egenix-mx-base under the covers.
> Edwin Grubbs wrote:
>
>
>>I get parse error when parsing a date in this format when the hour is
>>"12".
>>
>>
>>>>>from mx.DateTime import DateTimeFrom
>>>>>DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
>>
>>Traceback (most recent call last):
>> File "", line 1, in ?
>> File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
>> return Parser.DateTimeFromString(arg)
>> File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
>> raise DateTime.RangeError,\
>>mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
>>
>>But parsing 11 o'clock works fine:
>>
>>
>>>>>DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>>
>>
>>
>>-Edwin
>>
>>_______________________________________________________________________
>>eGenix.com User Mailing List http://www.egenix.com/
>>http://lists.egenix.com/mailman/listinfo/egenix-users
>
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 19 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From smulloni at smullyan.org Wed Feb 25 13:53:11 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Sat Jan 14 08:02:21 2006
Subject: [egenix-users]
mx-base 2.0.5 segfaults against Python 2.3.3 --without-pymalloc
--with-pydebug
Message-ID: <20040225185311.GA5226@smullyan.org>
This may be already known, but 2.0.5 segfaults *immediately* with
Python 2.3.3 configured --without-pymalloc --with-pydebug on 2 linux
platforms I've tested (gcc 2.95 and 3.3.2). 2.1.0 does not.
From the core backtrace:
#0 0x08082a5f in _Py_ForgetReference (op=0x81a27d0) at Objects/object.c:2000
#1 0x4031a354 in mxDateTime_Free (datetime=0x81a27d0) at mx/DateTime/mxDateTime/mxDateTime.c:365
#2 0x08082ad6 in _Py_Dealloc (op=0x81a27d0) at Objects/object.c:2022
#3 0x080bdb7f in eval_frame (f=0x81aa20c) at Python/ceval.c:1935
#4 0x080c02ca in PyEval_EvalCodeEx (co=0x821fff8, globals=0x821decc, locals=0x821decc, args=0x0,
argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#5 0x080b8b90 in PyEval_EvalCode (co=0x821fff8, globals=0x821decc, locals=0x821decc) at Python/ceval.c:537
#6 0x080da8a2 in PyImport_ExecCodeModuleEx (name=0xbfffda00 "mx.DateTime.DateTime", co=0x821fff8,
pathname=0xbfffd0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#7 0x080dafc2 in load_source_module (name=0xbfffda00 "mx.DateTime.DateTime",
pathname=0xbfffd0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x82088f0) at Python/import.c:894
#8 0x080dc2f0 in load_module (name=0xbfffda00 "mx.DateTime.DateTime", fp=0x82088f0,
buf=0xbfffd560 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.py",
type=1, loader=0x0) at Python/import.c:1699
#9 0x080dd991 in import_submodule (mod=0x8208c1c, subname=0xbfffda0c "DateTime",
fullname=0xbfffda00 "mx.DateTime.DateTime") at Python/import.c:2290
#10 0x080dd14d in load_next (mod=0x8208c1c, altmod=0x812e308, p_name=0xbfffde20,
buf=0xbfffda00 "mx.DateTime.DateTime", p_buflen=0xbfffd9fc) at Python/import.c:2111
#11 0x080dca9a in import_module_ex (name=0x0, globals=0x820849c, locals=0x820849c, fromlist=0x819af9c)
at Python/import.c:1957
#12 0x080dcd87 in PyImport_ImportModuleEx (name=0x8208f1c "DateTime", globals=0x820849c, locals=0x820849c,
fromlist=0x819af9c) at Python/import.c:1998
#13 0x080af037 in builtin___import__ (self=0x0, args=0x820a36c) at Python/bltinmodule.c:45
#14 0x0810ca6e in PyCFunction_Call (func=0x8173ffc, arg=0x820a36c, kw=0x0) at Objects/methodobject.c:73
#15 0x0805c483 in PyObject_Call (func=0x8173ffc, arg=0x820a36c, kw=0x0) at Objects/abstract.c:1755
#16 0x080c1a44 in PyEval_CallObjectWithKeywords (func=0x8173ffc, arg=0x820a36c, kw=0x0)
at Python/ceval.c:3346
#17 0x080bdf28 in eval_frame (f=0x81e5724) at Python/ceval.c:1996
#18 0x080c02ca in PyEval_EvalCodeEx (co=0x820a290, globals=0x820849c, locals=0x820849c, args=0x0,
argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#19 0x080b8b90 in PyEval_EvalCode (co=0x820a290, globals=0x820849c, locals=0x820849c) at Python/ceval.c:537
#20 0x080da8a2 in PyImport_ExecCodeModuleEx (name=0xbfffeea0 "mx.DateTime", co=0x820a290,
pathname=0xbfffe0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
etc. This core was produced simply by importing mx.DateTime.
Cheers,
Jacob Smullyan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /mailman-archives/egenix-users/attachments/20040225/a71bc3d7/attachment-0005.bin
From mal at egenix.com Fri Feb 27 10:14:04 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Sat Jan 14 08:02:21 2006
Subject: [egenix-users] mx-base 2.0.5 segfaults against Python 2.3.3
--without-pymalloc --with-pydebug
In-Reply-To: <20040225185311.GA5226@smullyan.org>
References: <20040225185311.GA5226@smullyan.org>
Message-ID: <403F0A5C.5010901@egenix.com>
Jacob Smullyan wrote:
> This may be already known, but 2.0.5 segfaults *immediately* with
> Python 2.3.3 configured --without-pymalloc --with-pydebug on 2 linux
> platforms I've tested (gcc 2.95 and 3.3.2). 2.1.0 does not.
While 2.1.0 is more suited for Python versions compiled with
--with-debug, I have to say that we don't support that option.
There are simply too many different configure options available
in Python that it's not possible to accomodate for each and every
combination.
Standard Python compiles should and do work, though. If you find that
there is a problem with the free lists in e.g. mxDateTime causing
a seg fault, then it's the compiler's optimizer not doing a proper
job. Apperently the compilers have a problem with optimizing this
piece of code:
datetime = mxDateTime_FreeList;
mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
datetime->ob_type = &mxDateTime_Type;
In such a case, please edit the C files and comment out the
free list #defines, e.g. for mxDateTime:
/* Define these to have the module use free lists (saves malloc calls) */
#define MXDATETIME_FREELIST
#define MXDATETIMEDELTA_FREELIST
Patches are welcome, of course. It's hard for us to fix bugs that
we cannot reproduce using our standard tools, so if you want these
things fixed, please make suggestions on how to work around the
problem.
Thanks,
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 27 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Thu Feb 5 22:17:38 2004
From: ross at principia.edu (Ross Brattain)
Date: Sat Jan 14 12:00:46 2006
Subject: [egenix-users]
seg fault on import mx.DateTime Python2.3.3 egenix-base-2.0.5
Message-ID: <87fzdon33x.fsf@maas-neotek.comcast.net>
My usual runtime environment is Python 2.2.3 and egenix-base-2.0.4.
I'm update everything and was surprised with this seg fault.
-Ross B.
Debian unstable
# gcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
Thread model: posix
gcc version 3.3.3 20040125 (prerelease) (Debian)
Python 2.3.3 (#1, Feb 5 2004, 21:57:53)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mx.DateTime
zsh: segmentation fault (core dumped) /charting/bin/python2.3
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
#1 0x402ee68a in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:3998
#2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b78c4, kw=0x1) at Objects/methodobject.c:108
#3 0x080aa664 in call_function (pp_stack=0xbfffcecc, oparg=1) at Python/ceval.c:3439
#4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
#5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b5760, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd8e0 "mx.DateTime.DateTime", co=0x402b5760, pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#8 0x080cdb53 in load_source_module (name=0xbfffd8e0 "mx.DateTime.DateTime", pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
#9 0x080cb8be in load_module (name=0xbfffd8e0 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd450 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
#10 0x080cc7b8 in import_submodule (mod=0x4026138c, subname=0xbfffd8ec "DateTime", fullname=0xbfffd8e0 "mx.DateTime.DateTime") at Python/import.c:2290
#11 0x080cc2e3 in load_next (mod=0x4026138c, altmod=0x8116160, p_name=0xbfffd8ec, buf=0xbfffd8e0 "mx.DateTime.DateTime", p_buflen=0xbfffd8dc) at Python/import.c:2111
#12 0x080ce319 in import_module_ex (name=0x0, globals=0x1, locals=0x402a5dfc, fromlist=0x4028750c) at Python/import.c:1957
#13 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
#14 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
#15 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x402aeeb4, kw=0x1) at Objects/methodobject.c:108
#16 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
#17 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x402aeeb4, kw=0x40269bec) at Python/ceval.c:3346
#18 0x080a8794 in eval_frame (f=0x818b02c) at Python/ceval.c:1996
#19 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7b20, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#20 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#21 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffece0 "mx.DateTime", co=0x402a7b20, pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
#22 0x080cdb53 in load_source_module (name=0xbfffece0 "mx.DateTime", pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc", fp=0x81632a0) at Python/import.c:894
#23 0x080cb8be in load_module (name=0xbfffece0 "mx.DateTime", fp=0x81632a0, buf=0xbfffe3c0 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.py", type=1, loader=0x1) at Python/import.c:1699
#24 0x080ce051 in load_package (name=0xbfffece0 "mx.DateTime", pathname=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime") at Python/import.c:951
#25 0x080cb9ed in load_module (name=0xbfffece0 "mx.DateTime", fp=0xbfffe850, buf=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime", type=5, loader=0x1) at Python/import.c:1722
#26 0x080cc7b8 in import_submodule (mod=0x40261374, subname=0xbfffece3 "DateTime", fullname=0xbfffece0 "mx.DateTime") at Python/import.c:2290
#27 0x080cc2e3 in load_next (mod=0x40261374, altmod=0x40261374, p_name=0xbfffece3, buf=0xbfffece0 "mx.DateTime", p_buflen=0xbfffecdc) at Python/import.c:2111
#28 0x080ce40f in import_module_ex (name=0x0, globals=0x1, locals=0x4027879c, fromlist=0x8116160) at Python/import.c:1964
#29 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
#30 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
#31 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x4028075c, kw=0x1) at Objects/methodobject.c:108
#32 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
#33 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x4028075c, kw=0x40269bec) at Python/ceval.c:3346
#34 0x080a8794 in eval_frame (f=0x8183a54) at Python/ceval.c:1996
#35 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7320, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#36 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#37 0x080d7d1b in run_node (n=0x4027879c, filename=0x1 , globals=0x1, locals=0x1, flags=0x1) at Python/pythonrun.c:1265
#38 0x080d724e in PyRun_InteractiveOneFlags (fp=0x1, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:757
#39 0x080d7043 in PyRun_InteractiveLoopFlags (fp=0x40254e20, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:690
#40 0x080d8642 in PyRun_AnyFileExFlags (fp=0x40254e20, filename=0x80ff46a "", closeit=0, flags=0xbffff428) at Python/pythonrun.c:653
#41 0x08054e35 in Py_Main (argc=0, argv=0xbffff4d4) at Modules/main.c:415
#42 0x0805498b in main (argc=1, argv=0x1) at Modules/python.c:23
From mal at egenix.com Fri Feb 6 10:05:49 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Sat Jan 14 12:00:46 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87fzdon33x.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
Message-ID: <402358ED.2060401@egenix.com>
Ross Brattain wrote:
>
> My usual runtime environment is Python 2.2.3 and egenix-base-2.0.4.
> I'm update everything and was surprised with this seg fault.
Are you using a Python version that's compiled with debug
mode enabled (or have you used such a Python version to
compile mxDateTime) ?
> -Ross B.
>
>
> Debian unstable
>
> # gcc -v
> Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs
> Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
> Thread model: posix
> gcc version 3.3.3 20040125 (prerelease) (Debian)
>
>
> Python 2.3.3 (#1, Feb 5 2004, 21:57:53)
> [GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>
>>>>import mx.DateTime
>
> zsh: segmentation fault (core dumped) /charting/bin/python2.3
>
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
> #1 0x402ee68a in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:3998
> #2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b78c4, kw=0x1) at Objects/methodobject.c:108
> #3 0x080aa664 in call_function (pp_stack=0xbfffcecc, oparg=1) at Python/ceval.c:3439
> #4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
> #5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b5760, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd8e0 "mx.DateTime.DateTime", co=0x402b5760, pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
> #8 0x080cdb53 in load_source_module (name=0xbfffd8e0 "mx.DateTime.DateTime", pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
> #9 0x080cb8be in load_module (name=0xbfffd8e0 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd450 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
> #10 0x080cc7b8 in import_submodule (mod=0x4026138c, subname=0xbfffd8ec "DateTime", fullname=0xbfffd8e0 "mx.DateTime.DateTime") at Python/import.c:2290
> #11 0x080cc2e3 in load_next (mod=0x4026138c, altmod=0x8116160, p_name=0xbfffd8ec, buf=0xbfffd8e0 "mx.DateTime.DateTime", p_buflen=0xbfffd8dc) at Python/import.c:2111
> #12 0x080ce319 in import_module_ex (name=0x0, globals=0x1, locals=0x402a5dfc, fromlist=0x4028750c) at Python/import.c:1957
> #13 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
> #14 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
> #15 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x402aeeb4, kw=0x1) at Objects/methodobject.c:108
> #16 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
> #17 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x402aeeb4, kw=0x40269bec) at Python/ceval.c:3346
> #18 0x080a8794 in eval_frame (f=0x818b02c) at Python/ceval.c:1996
> #19 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7b20, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #20 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #21 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffece0 "mx.DateTime", co=0x402a7b20, pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
> #22 0x080cdb53 in load_source_module (name=0xbfffece0 "mx.DateTime", pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc", fp=0x81632a0) at Python/import.c:894
> #23 0x080cb8be in load_module (name=0xbfffece0 "mx.DateTime", fp=0x81632a0, buf=0xbfffe3c0 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.py", type=1, loader=0x1) at Python/import.c:1699
> #24 0x080ce051 in load_package (name=0xbfffece0 "mx.DateTime", pathname=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime") at Python/import.c:951
> #25 0x080cb9ed in load_module (name=0xbfffece0 "mx.DateTime", fp=0xbfffe850, buf=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime", type=5, loader=0x1) at Python/import.c:1722
> #26 0x080cc7b8 in import_submodule (mod=0x40261374, subname=0xbfffece3 "DateTime", fullname=0xbfffece0 "mx.DateTime") at Python/import.c:2290
> #27 0x080cc2e3 in load_next (mod=0x40261374, altmod=0x40261374, p_name=0xbfffece3, buf=0xbfffece0 "mx.DateTime", p_buflen=0xbfffecdc) at Python/import.c:2111
> #28 0x080ce40f in import_module_ex (name=0x0, globals=0x1, locals=0x4027879c, fromlist=0x8116160) at Python/import.c:1964
> #29 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
> #30 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
> #31 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x4028075c, kw=0x1) at Objects/methodobject.c:108
> #32 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
> #33 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x4028075c, kw=0x40269bec) at Python/ceval.c:3346
> #34 0x080a8794 in eval_frame (f=0x8183a54) at Python/ceval.c:1996
> #35 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7320, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #36 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #37 0x080d7d1b in run_node (n=0x4027879c, filename=0x1 , globals=0x1, locals=0x1, flags=0x1) at Python/pythonrun.c:1265
> #38 0x080d724e in PyRun_InteractiveOneFlags (fp=0x1, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:757
> #39 0x080d7043 in PyRun_InteractiveLoopFlags (fp=0x40254e20, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:690
> #40 0x080d8642 in PyRun_AnyFileExFlags (fp=0x40254e20, filename=0x80ff46a "", closeit=0, flags=0xbffff428) at Python/pythonrun.c:653
> #41 0x08054e35 in Py_Main (argc=0, argv=0xbffff4d4) at Modules/main.c:415
> #42 0x0805498b in main (argc=1, argv=0x1) at Modules/python.c:23
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 06 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Fri Feb 6 16:16:58 2004
From: ross at principia.edu (Ross Brattain)
Date: Sat Jan 14 12:00:46 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402358ED.2060401@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com>
Message-ID: <87d68rg2v9.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
> Are you using a Python version that's compiled with debug
> mode enabled (or have you used such a Python version to
> compile mxDateTime) ?
>
No, just vanilla ./configure.
I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
Because of this line from the backtrace:
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
mxDateTime.c:333 :
#ifdef MXDATETIME_FREELIST
if (mxDateTime_FreeList) {
datetime = mxDateTime_FreeList;
mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
datetime->ob_type = &mxDateTime_Type;
-> _Py_NewReference(datetime);
}
else
#endif
{
datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
if (datetime == NULL)
return NULL;
}
I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
--- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
+++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
@@ -76,7 +76,7 @@
#define STRFTIME_OUTPUT_SIZE 1024
/* Define these to have the module use free lists (saves malloc calls) */
-#define MXDATETIME_FREELIST
+#undef MXDATETIME_FREELIST
#define MXDATETIMEDELTA_FREELIST
/* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
This is not the root cause because, as mentioned, a rebuild of
Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
problem.
My working production environment (different machine) is:
Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
[GCC 3.2.3 20030415 (Debian prerelease)] on linux2
and egenix-base-2.0.4
I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
works.
So is it a gcc problem?
-Ross B.
From ross at principia.edu Fri Feb 6 16:17:41 2004
From: ross at principia.edu (Ross Brattain)
Date: Sat Jan 14 12:00:46 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402358ED.2060401@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com>
Message-ID: <87r7x7eo9m.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
>
> Are you using a Python version that's compiled with debug
> mode enabled (or have you used such a Python version to
> compile mxDateTime) ?
>
Another data point:
Python 2.3.3 (#1, Feb 6 2004, 01:59:49)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
built from:
egenix-mx-base-2.1.0-2003-07-29.zip
(gdb) bt
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:341
#1 0x402eeaba in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:4091
#2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b7914, kw=0x1) at Objects/methodobject.c:108
#3 0x080aa664 in call_function (pp_stack=0xbfffcefc, oparg=1) at Python/ceval.c:3439
#4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
#5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b47a0, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd910 "mx.DateTime.DateTime", co=0x402b47a0, pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#8 0x080cdb53 in load_source_module (name=0xbfffd910 "mx.DateTime.DateTime", pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
#9 0x080cb8be in load_module (name=0xbfffd910 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd480 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
-Ross B.
From mal at egenix.com Mon Feb 9 11:31:50 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Sat Jan 14 12:00:46 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87ptcsldts.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87ptcsldts.fsf@maas-neotek.comcast.net>
Message-ID: <40276FA6.6030206@egenix.com>
Ross Brattain wrote:
> "M.-A. Lemburg" writes:
>
>
>>Are you using a Python version that's compiled with debug
>>mode enabled (or have you used such a Python version to
>>compile mxDateTime) ?
>>
>
>
> Another data point:
Could you try compiling the package with optimizations disabled
(-O0) ?!
> Python 2.3.3 (#1, Feb 6 2004, 01:59:49)
> [GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
>
> built from:
> egenix-mx-base-2.1.0-2003-07-29.zip
>
> (gdb) bt
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:341
> #1 0x402eeaba in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:4091
> #2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b7914, kw=0x1) at Objects/methodobject.c:108
> #3 0x080aa664 in call_function (pp_stack=0xbfffcefc, oparg=1) at Python/ceval.c:3439
> #4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
> #5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b47a0, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd910 "mx.DateTime.DateTime", co=0x402b47a0, pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
> #8 0x080cdb53 in load_source_module (name=0xbfffd910 "mx.DateTime.DateTime", pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
> #9 0x080cb8be in load_module (name=0xbfffd910 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd480 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
>
> -Ross B.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 09 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Mon Feb 9 11:59:21 2004
From: ross at principia.edu (Ross Brattain)
Date: Sat Jan 14 12:00:46 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <40276FA6.6030206@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87ptcsldts.fsf@maas-neotek.comcast.net>
<40276FA6.6030206@egenix.com>
Message-ID: <87ekt4f2hy.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
> Could you try compiling the package with optimizations disabled
> (-O0) ?!
Python 2.3.3 (#3, Feb 9 2004, 11:51:59)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mx.DateTime
>>> print mx.DateTime.__version__
2.1.0
Vanilla python 2.3.3 build
egenix-mx-base-2.1.0-2003-07-29.zip built with -O0
-Ross B.
From smulloni at smullyan.org Wed Feb 11 12:41:18 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Sat Jan 14 12:00:46 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87d68rg2v9.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
Message-ID: <20040211174118.GA31434@smullyan.org>
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.
I can provide core files, backtraces, etc., upon request.
Cheers,
Jacob Smullyan
On Fri, Feb 06, 2004 at 04:16:58PM -0800, Ross Brattain wrote:
> "M.-A. Lemburg" writes:
>
> > Are you using a Python version that's compiled with debug
> > mode enabled (or have you used such a Python version to
> > compile mxDateTime) ?
> >
>
> No, just vanilla ./configure.
>
> I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
>
> Because of this line from the backtrace:
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
>
> mxDateTime.c:333 :
>
> #ifdef MXDATETIME_FREELIST
> if (mxDateTime_FreeList) {
> datetime = mxDateTime_FreeList;
> mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
> datetime->ob_type = &mxDateTime_Type;
> -> _Py_NewReference(datetime);
> }
> else
> #endif
> {
> datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
> if (datetime == NULL)
> return NULL;
> }
>
> I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
>
> --- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
> +++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
> @@ -76,7 +76,7 @@
> #define STRFTIME_OUTPUT_SIZE 1024
>
> /* Define these to have the module use free lists (saves malloc calls) */
> -#define MXDATETIME_FREELIST
> +#undef MXDATETIME_FREELIST
> #define MXDATETIMEDELTA_FREELIST
>
> /* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
>
>
> This is not the root cause because, as mentioned, a rebuild of
> Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
> problem.
>
> My working production environment (different machine) is:
> Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
> [GCC 3.2.3 20030415 (Debian prerelease)] on linux2
>
> and egenix-base-2.0.4
>
> I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
> works.
>
> So is it a gcc problem?
>
> -Ross B.
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
>
From mal at egenix.com Wed Feb 11 18:45:19 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Sat Jan 14 12:00:46 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <20040211174118.GA31434@smullyan.org>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
<20040211174118.GA31434@smullyan.org>
Message-ID: <402A783F.6010909@egenix.com>
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 can provide core files, backtraces, etc., upon request.
>
> Cheers,
>
> Jacob Smullyan
>
> On Fri, Feb 06, 2004 at 04:16:58PM -0800, Ross Brattain wrote:
>
>>"M.-A. Lemburg" writes:
>>
>>
>>>Are you using a Python version that's compiled with debug
>>>mode enabled (or have you used such a Python version to
>>>compile mxDateTime) ?
>>>
>>
>>No, just vanilla ./configure.
>>
>>I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
>>
>>Because of this line from the backtrace:
>>#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
>>
>>mxDateTime.c:333 :
>>
>>#ifdef MXDATETIME_FREELIST
>> if (mxDateTime_FreeList) {
>> datetime = mxDateTime_FreeList;
>> mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
>> datetime->ob_type = &mxDateTime_Type;
>>-> _Py_NewReference(datetime);
>> }
>> else
>>#endif
>> {
>> datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
>> if (datetime == NULL)
>> return NULL;
>> }
>>
>>I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
>>
>>--- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
>>+++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
>>@@ -76,7 +76,7 @@
>> #define STRFTIME_OUTPUT_SIZE 1024
>>
>> /* Define these to have the module use free lists (saves malloc calls) */
>>-#define MXDATETIME_FREELIST
>>+#undef MXDATETIME_FREELIST
>> #define MXDATETIMEDELTA_FREELIST
>>
>> /* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
>>
>>
>>This is not the root cause because, as mentioned, a rebuild of
>>Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
>>problem.
>>
>>My working production environment (different machine) is:
>>Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
>>[GCC 3.2.3 20030415 (Debian prerelease)] on linux2
>>
>>and egenix-base-2.0.4
>>
>>I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
>>works.
>>
>>So is it a gcc problem?
>>
>>-Ross B.
>>
>>_______________________________________________________________________
>>eGenix.com User Mailing List http://www.egenix.com/
>>http://lists.egenix.com/mailman/listinfo/egenix-users
>>
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 11 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From smulloni at smullyan.org Wed Feb 11 13:53:20 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Sat Jan 14 12:00:46 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402A783F.6010909@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
<20040211174118.GA31434@smullyan.org> <402A783F.6010909@egenix.com>
Message-ID: <20040211185320.GA31997@smullyan.org>
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
From egrubbs at rackspace.com Thu Feb 19 12:10:39 2004
From: egrubbs at rackspace.com (Edwin Grubbs)
Date: Sat Jan 14 12:00:46 2006
Subject: [egenix-users] DateTimeFrom parser error
Message-ID: <20040219181039.GX5971@rackspace.com>
I get parse error when parsing a date in this format when the hour is
"12".
>>> from mx.DateTime import DateTimeFrom
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
Traceback (most recent call last):
File "", line 1, in ?
File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
return Parser.DateTimeFromString(arg)
File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
raise DateTime.RangeError,\
mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
>>>
But parsing 11 o'clock works fine:
>>> DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>>>
-Edwin
From Jim.Vickroy at noaa.gov Thu Feb 19 11:20:18 2004
From: Jim.Vickroy at noaa.gov (Jim Vickroy)
Date: Sat Jan 14 12:00:46 2006
Subject: [egenix-users] DateTimeFrom parser error
References: <20040219181039.GX5971@rackspace.com>
Message-ID: <4034FE62.2E888FBC@noaa.gov>
Me too.
But eliminating the "PM" designator does not fail:
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 CST')
>>>
My system:
Microsoft Windows 2000
Python 2.3.3
egenix-mx-base-2.0.5.win32-py2.3.exe
Edwin Grubbs wrote:
> I get parse error when parsing a date in this format when the hour is
> "12".
>
> >>> from mx.DateTime import DateTimeFrom
> >>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
> Traceback (most recent call last):
> File "", line 1, in ?
> File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
> return Parser.DateTimeFromString(arg)
> File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
> raise DateTime.RangeError,\
> mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
> >>>
>
> But parsing 11 o'clock works fine:
>
> >>> DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>
> >>>
>
> -Edwin
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
From mal at egenix.com Thu Feb 19 20:22:34 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Sat Jan 14 12:00:46 2006
Subject: [egenix-users] DateTimeFrom parser error
In-Reply-To: <4034FE62.2E888FBC@noaa.gov>
References: <20040219181039.GX5971@rackspace.com> <4034FE62.2E888FBC@noaa.gov>
Message-ID: <40351B0A.9070401@egenix.com>
Jim Vickroy wrote:
> Me too.
>
> But eliminating the "PM" designator does not fail:
>
>
>>>>DateTimeFrom('Thursday, February 19, 2004 12:05:34 CST')
>
>
>
>
> My system:
>
> Microsoft Windows 2000
> Python 2.3.3
> egenix-mx-base-2.0.5.win32-py2.3.exe
That's a known bug in 2.0.x. It is fixed in the 2.1.x series which still
hasn't made it to general release version because of too many other projects
keeping us busy:
>>> from mx.DateTime import *
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
FWIW, if you are an mxODBC Zope DA user, you're lucky... it ships
with the current 2.1.x versions of egenix-mx-base under the covers.
> Edwin Grubbs wrote:
>
>
>>I get parse error when parsing a date in this format when the hour is
>>"12".
>>
>>
>>>>>from mx.DateTime import DateTimeFrom
>>>>>DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
>>
>>Traceback (most recent call last):
>> File "", line 1, in ?
>> File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
>> return Parser.DateTimeFromString(arg)
>> File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
>> raise DateTime.RangeError,\
>>mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
>>
>>But parsing 11 o'clock works fine:
>>
>>
>>>>>DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>>
>>
>>
>>-Edwin
>>
>>_______________________________________________________________________
>>eGenix.com User Mailing List http://www.egenix.com/
>>http://lists.egenix.com/mailman/listinfo/egenix-users
>
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 19 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From smulloni at smullyan.org Wed Feb 25 13:53:11 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Sat Jan 14 12:00:46 2006
Subject: [egenix-users]
mx-base 2.0.5 segfaults against Python 2.3.3 --without-pymalloc
--with-pydebug
Message-ID: <20040225185311.GA5226@smullyan.org>
This may be already known, but 2.0.5 segfaults *immediately* with
Python 2.3.3 configured --without-pymalloc --with-pydebug on 2 linux
platforms I've tested (gcc 2.95 and 3.3.2). 2.1.0 does not.
From the core backtrace:
#0 0x08082a5f in _Py_ForgetReference (op=0x81a27d0) at Objects/object.c:2000
#1 0x4031a354 in mxDateTime_Free (datetime=0x81a27d0) at mx/DateTime/mxDateTime/mxDateTime.c:365
#2 0x08082ad6 in _Py_Dealloc (op=0x81a27d0) at Objects/object.c:2022
#3 0x080bdb7f in eval_frame (f=0x81aa20c) at Python/ceval.c:1935
#4 0x080c02ca in PyEval_EvalCodeEx (co=0x821fff8, globals=0x821decc, locals=0x821decc, args=0x0,
argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#5 0x080b8b90 in PyEval_EvalCode (co=0x821fff8, globals=0x821decc, locals=0x821decc) at Python/ceval.c:537
#6 0x080da8a2 in PyImport_ExecCodeModuleEx (name=0xbfffda00 "mx.DateTime.DateTime", co=0x821fff8,
pathname=0xbfffd0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#7 0x080dafc2 in load_source_module (name=0xbfffda00 "mx.DateTime.DateTime",
pathname=0xbfffd0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x82088f0) at Python/import.c:894
#8 0x080dc2f0 in load_module (name=0xbfffda00 "mx.DateTime.DateTime", fp=0x82088f0,
buf=0xbfffd560 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.py",
type=1, loader=0x0) at Python/import.c:1699
#9 0x080dd991 in import_submodule (mod=0x8208c1c, subname=0xbfffda0c "DateTime",
fullname=0xbfffda00 "mx.DateTime.DateTime") at Python/import.c:2290
#10 0x080dd14d in load_next (mod=0x8208c1c, altmod=0x812e308, p_name=0xbfffde20,
buf=0xbfffda00 "mx.DateTime.DateTime", p_buflen=0xbfffd9fc) at Python/import.c:2111
#11 0x080dca9a in import_module_ex (name=0x0, globals=0x820849c, locals=0x820849c, fromlist=0x819af9c)
at Python/import.c:1957
#12 0x080dcd87 in PyImport_ImportModuleEx (name=0x8208f1c "DateTime", globals=0x820849c, locals=0x820849c,
fromlist=0x819af9c) at Python/import.c:1998
#13 0x080af037 in builtin___import__ (self=0x0, args=0x820a36c) at Python/bltinmodule.c:45
#14 0x0810ca6e in PyCFunction_Call (func=0x8173ffc, arg=0x820a36c, kw=0x0) at Objects/methodobject.c:73
#15 0x0805c483 in PyObject_Call (func=0x8173ffc, arg=0x820a36c, kw=0x0) at Objects/abstract.c:1755
#16 0x080c1a44 in PyEval_CallObjectWithKeywords (func=0x8173ffc, arg=0x820a36c, kw=0x0)
at Python/ceval.c:3346
#17 0x080bdf28 in eval_frame (f=0x81e5724) at Python/ceval.c:1996
#18 0x080c02ca in PyEval_EvalCodeEx (co=0x820a290, globals=0x820849c, locals=0x820849c, args=0x0,
argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#19 0x080b8b90 in PyEval_EvalCode (co=0x820a290, globals=0x820849c, locals=0x820849c) at Python/ceval.c:537
#20 0x080da8a2 in PyImport_ExecCodeModuleEx (name=0xbfffeea0 "mx.DateTime", co=0x820a290,
pathname=0xbfffe0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
etc. This core was produced simply by importing mx.DateTime.
Cheers,
Jacob Smullyan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /mailman-archives/egenix-users/attachments/20040225/a71bc3d7/attachment-0006.bin
From mal at egenix.com Fri Feb 27 10:14:04 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Sat Jan 14 12:00:46 2006
Subject: [egenix-users] mx-base 2.0.5 segfaults against Python 2.3.3
--without-pymalloc --with-pydebug
In-Reply-To: <20040225185311.GA5226@smullyan.org>
References: <20040225185311.GA5226@smullyan.org>
Message-ID: <403F0A5C.5010901@egenix.com>
Jacob Smullyan wrote:
> This may be already known, but 2.0.5 segfaults *immediately* with
> Python 2.3.3 configured --without-pymalloc --with-pydebug on 2 linux
> platforms I've tested (gcc 2.95 and 3.3.2). 2.1.0 does not.
While 2.1.0 is more suited for Python versions compiled with
--with-debug, I have to say that we don't support that option.
There are simply too many different configure options available
in Python that it's not possible to accomodate for each and every
combination.
Standard Python compiles should and do work, though. If you find that
there is a problem with the free lists in e.g. mxDateTime causing
a seg fault, then it's the compiler's optimizer not doing a proper
job. Apperently the compilers have a problem with optimizing this
piece of code:
datetime = mxDateTime_FreeList;
mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
datetime->ob_type = &mxDateTime_Type;
In such a case, please edit the C files and comment out the
free list #defines, e.g. for mxDateTime:
/* Define these to have the module use free lists (saves malloc calls) */
#define MXDATETIME_FREELIST
#define MXDATETIMEDELTA_FREELIST
Patches are welcome, of course. It's hard for us to fix bugs that
we cannot reproduce using our standard tools, so if you want these
things fixed, please make suggestions on how to work around the
problem.
Thanks,
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 27 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Thu Feb 5 22:17:38 2004
From: ross at principia.edu (Ross Brattain)
Date: Sat Jan 14 16:00:45 2006
Subject: [egenix-users]
seg fault on import mx.DateTime Python2.3.3 egenix-base-2.0.5
Message-ID: <87fzdon33x.fsf@maas-neotek.comcast.net>
My usual runtime environment is Python 2.2.3 and egenix-base-2.0.4.
I'm update everything and was surprised with this seg fault.
-Ross B.
Debian unstable
# gcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
Thread model: posix
gcc version 3.3.3 20040125 (prerelease) (Debian)
Python 2.3.3 (#1, Feb 5 2004, 21:57:53)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mx.DateTime
zsh: segmentation fault (core dumped) /charting/bin/python2.3
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
#1 0x402ee68a in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:3998
#2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b78c4, kw=0x1) at Objects/methodobject.c:108
#3 0x080aa664 in call_function (pp_stack=0xbfffcecc, oparg=1) at Python/ceval.c:3439
#4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
#5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b5760, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd8e0 "mx.DateTime.DateTime", co=0x402b5760, pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#8 0x080cdb53 in load_source_module (name=0xbfffd8e0 "mx.DateTime.DateTime", pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
#9 0x080cb8be in load_module (name=0xbfffd8e0 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd450 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
#10 0x080cc7b8 in import_submodule (mod=0x4026138c, subname=0xbfffd8ec "DateTime", fullname=0xbfffd8e0 "mx.DateTime.DateTime") at Python/import.c:2290
#11 0x080cc2e3 in load_next (mod=0x4026138c, altmod=0x8116160, p_name=0xbfffd8ec, buf=0xbfffd8e0 "mx.DateTime.DateTime", p_buflen=0xbfffd8dc) at Python/import.c:2111
#12 0x080ce319 in import_module_ex (name=0x0, globals=0x1, locals=0x402a5dfc, fromlist=0x4028750c) at Python/import.c:1957
#13 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
#14 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
#15 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x402aeeb4, kw=0x1) at Objects/methodobject.c:108
#16 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
#17 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x402aeeb4, kw=0x40269bec) at Python/ceval.c:3346
#18 0x080a8794 in eval_frame (f=0x818b02c) at Python/ceval.c:1996
#19 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7b20, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#20 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#21 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffece0 "mx.DateTime", co=0x402a7b20, pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
#22 0x080cdb53 in load_source_module (name=0xbfffece0 "mx.DateTime", pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc", fp=0x81632a0) at Python/import.c:894
#23 0x080cb8be in load_module (name=0xbfffece0 "mx.DateTime", fp=0x81632a0, buf=0xbfffe3c0 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.py", type=1, loader=0x1) at Python/import.c:1699
#24 0x080ce051 in load_package (name=0xbfffece0 "mx.DateTime", pathname=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime") at Python/import.c:951
#25 0x080cb9ed in load_module (name=0xbfffece0 "mx.DateTime", fp=0xbfffe850, buf=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime", type=5, loader=0x1) at Python/import.c:1722
#26 0x080cc7b8 in import_submodule (mod=0x40261374, subname=0xbfffece3 "DateTime", fullname=0xbfffece0 "mx.DateTime") at Python/import.c:2290
#27 0x080cc2e3 in load_next (mod=0x40261374, altmod=0x40261374, p_name=0xbfffece3, buf=0xbfffece0 "mx.DateTime", p_buflen=0xbfffecdc) at Python/import.c:2111
#28 0x080ce40f in import_module_ex (name=0x0, globals=0x1, locals=0x4027879c, fromlist=0x8116160) at Python/import.c:1964
#29 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
#30 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
#31 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x4028075c, kw=0x1) at Objects/methodobject.c:108
#32 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
#33 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x4028075c, kw=0x40269bec) at Python/ceval.c:3346
#34 0x080a8794 in eval_frame (f=0x8183a54) at Python/ceval.c:1996
#35 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7320, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#36 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#37 0x080d7d1b in run_node (n=0x4027879c, filename=0x1 , globals=0x1, locals=0x1, flags=0x1) at Python/pythonrun.c:1265
#38 0x080d724e in PyRun_InteractiveOneFlags (fp=0x1, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:757
#39 0x080d7043 in PyRun_InteractiveLoopFlags (fp=0x40254e20, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:690
#40 0x080d8642 in PyRun_AnyFileExFlags (fp=0x40254e20, filename=0x80ff46a "", closeit=0, flags=0xbffff428) at Python/pythonrun.c:653
#41 0x08054e35 in Py_Main (argc=0, argv=0xbffff4d4) at Modules/main.c:415
#42 0x0805498b in main (argc=1, argv=0x1) at Modules/python.c:23
From mal at egenix.com Fri Feb 6 10:05:49 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Sat Jan 14 16:00:45 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87fzdon33x.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
Message-ID: <402358ED.2060401@egenix.com>
Ross Brattain wrote:
>
> My usual runtime environment is Python 2.2.3 and egenix-base-2.0.4.
> I'm update everything and was surprised with this seg fault.
Are you using a Python version that's compiled with debug
mode enabled (or have you used such a Python version to
compile mxDateTime) ?
> -Ross B.
>
>
> Debian unstable
>
> # gcc -v
> Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs
> Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
> Thread model: posix
> gcc version 3.3.3 20040125 (prerelease) (Debian)
>
>
> Python 2.3.3 (#1, Feb 5 2004, 21:57:53)
> [GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>
>>>>import mx.DateTime
>
> zsh: segmentation fault (core dumped) /charting/bin/python2.3
>
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
> #1 0x402ee68a in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:3998
> #2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b78c4, kw=0x1) at Objects/methodobject.c:108
> #3 0x080aa664 in call_function (pp_stack=0xbfffcecc, oparg=1) at Python/ceval.c:3439
> #4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
> #5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b5760, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd8e0 "mx.DateTime.DateTime", co=0x402b5760, pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
> #8 0x080cdb53 in load_source_module (name=0xbfffd8e0 "mx.DateTime.DateTime", pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
> #9 0x080cb8be in load_module (name=0xbfffd8e0 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd450 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
> #10 0x080cc7b8 in import_submodule (mod=0x4026138c, subname=0xbfffd8ec "DateTime", fullname=0xbfffd8e0 "mx.DateTime.DateTime") at Python/import.c:2290
> #11 0x080cc2e3 in load_next (mod=0x4026138c, altmod=0x8116160, p_name=0xbfffd8ec, buf=0xbfffd8e0 "mx.DateTime.DateTime", p_buflen=0xbfffd8dc) at Python/import.c:2111
> #12 0x080ce319 in import_module_ex (name=0x0, globals=0x1, locals=0x402a5dfc, fromlist=0x4028750c) at Python/import.c:1957
> #13 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
> #14 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
> #15 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x402aeeb4, kw=0x1) at Objects/methodobject.c:108
> #16 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
> #17 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x402aeeb4, kw=0x40269bec) at Python/ceval.c:3346
> #18 0x080a8794 in eval_frame (f=0x818b02c) at Python/ceval.c:1996
> #19 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7b20, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #20 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #21 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffece0 "mx.DateTime", co=0x402a7b20, pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
> #22 0x080cdb53 in load_source_module (name=0xbfffece0 "mx.DateTime", pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc", fp=0x81632a0) at Python/import.c:894
> #23 0x080cb8be in load_module (name=0xbfffece0 "mx.DateTime", fp=0x81632a0, buf=0xbfffe3c0 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.py", type=1, loader=0x1) at Python/import.c:1699
> #24 0x080ce051 in load_package (name=0xbfffece0 "mx.DateTime", pathname=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime") at Python/import.c:951
> #25 0x080cb9ed in load_module (name=0xbfffece0 "mx.DateTime", fp=0xbfffe850, buf=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime", type=5, loader=0x1) at Python/import.c:1722
> #26 0x080cc7b8 in import_submodule (mod=0x40261374, subname=0xbfffece3 "DateTime", fullname=0xbfffece0 "mx.DateTime") at Python/import.c:2290
> #27 0x080cc2e3 in load_next (mod=0x40261374, altmod=0x40261374, p_name=0xbfffece3, buf=0xbfffece0 "mx.DateTime", p_buflen=0xbfffecdc) at Python/import.c:2111
> #28 0x080ce40f in import_module_ex (name=0x0, globals=0x1, locals=0x4027879c, fromlist=0x8116160) at Python/import.c:1964
> #29 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
> #30 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
> #31 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x4028075c, kw=0x1) at Objects/methodobject.c:108
> #32 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
> #33 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x4028075c, kw=0x40269bec) at Python/ceval.c:3346
> #34 0x080a8794 in eval_frame (f=0x8183a54) at Python/ceval.c:1996
> #35 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7320, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #36 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #37 0x080d7d1b in run_node (n=0x4027879c, filename=0x1 , globals=0x1, locals=0x1, flags=0x1) at Python/pythonrun.c:1265
> #38 0x080d724e in PyRun_InteractiveOneFlags (fp=0x1, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:757
> #39 0x080d7043 in PyRun_InteractiveLoopFlags (fp=0x40254e20, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:690
> #40 0x080d8642 in PyRun_AnyFileExFlags (fp=0x40254e20, filename=0x80ff46a "", closeit=0, flags=0xbffff428) at Python/pythonrun.c:653
> #41 0x08054e35 in Py_Main (argc=0, argv=0xbffff4d4) at Modules/main.c:415
> #42 0x0805498b in main (argc=1, argv=0x1) at Modules/python.c:23
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 06 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Fri Feb 6 16:16:58 2004
From: ross at principia.edu (Ross Brattain)
Date: Sat Jan 14 16:00:45 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402358ED.2060401@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com>
Message-ID: <87d68rg2v9.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
> Are you using a Python version that's compiled with debug
> mode enabled (or have you used such a Python version to
> compile mxDateTime) ?
>
No, just vanilla ./configure.
I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
Because of this line from the backtrace:
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
mxDateTime.c:333 :
#ifdef MXDATETIME_FREELIST
if (mxDateTime_FreeList) {
datetime = mxDateTime_FreeList;
mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
datetime->ob_type = &mxDateTime_Type;
-> _Py_NewReference(datetime);
}
else
#endif
{
datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
if (datetime == NULL)
return NULL;
}
I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
--- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
+++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
@@ -76,7 +76,7 @@
#define STRFTIME_OUTPUT_SIZE 1024
/* Define these to have the module use free lists (saves malloc calls) */
-#define MXDATETIME_FREELIST
+#undef MXDATETIME_FREELIST
#define MXDATETIMEDELTA_FREELIST
/* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
This is not the root cause because, as mentioned, a rebuild of
Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
problem.
My working production environment (different machine) is:
Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
[GCC 3.2.3 20030415 (Debian prerelease)] on linux2
and egenix-base-2.0.4
I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
works.
So is it a gcc problem?
-Ross B.
From ross at principia.edu Fri Feb 6 16:17:41 2004
From: ross at principia.edu (Ross Brattain)
Date: Sat Jan 14 16:00:45 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402358ED.2060401@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com>
Message-ID: <87r7x7eo9m.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
>
> Are you using a Python version that's compiled with debug
> mode enabled (or have you used such a Python version to
> compile mxDateTime) ?
>
Another data point:
Python 2.3.3 (#1, Feb 6 2004, 01:59:49)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
built from:
egenix-mx-base-2.1.0-2003-07-29.zip
(gdb) bt
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:341
#1 0x402eeaba in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:4091
#2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b7914, kw=0x1) at Objects/methodobject.c:108
#3 0x080aa664 in call_function (pp_stack=0xbfffcefc, oparg=1) at Python/ceval.c:3439
#4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
#5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b47a0, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd910 "mx.DateTime.DateTime", co=0x402b47a0, pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#8 0x080cdb53 in load_source_module (name=0xbfffd910 "mx.DateTime.DateTime", pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
#9 0x080cb8be in load_module (name=0xbfffd910 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd480 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
-Ross B.
From mal at egenix.com Mon Feb 9 11:31:50 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Sat Jan 14 16:00:45 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87ptcsldts.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87ptcsldts.fsf@maas-neotek.comcast.net>
Message-ID: <40276FA6.6030206@egenix.com>
Ross Brattain wrote:
> "M.-A. Lemburg" writes:
>
>
>>Are you using a Python version that's compiled with debug
>>mode enabled (or have you used such a Python version to
>>compile mxDateTime) ?
>>
>
>
> Another data point:
Could you try compiling the package with optimizations disabled
(-O0) ?!
> Python 2.3.3 (#1, Feb 6 2004, 01:59:49)
> [GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
>
> built from:
> egenix-mx-base-2.1.0-2003-07-29.zip
>
> (gdb) bt
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:341
> #1 0x402eeaba in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:4091
> #2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b7914, kw=0x1) at Objects/methodobject.c:108
> #3 0x080aa664 in call_function (pp_stack=0xbfffcefc, oparg=1) at Python/ceval.c:3439
> #4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
> #5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b47a0, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd910 "mx.DateTime.DateTime", co=0x402b47a0, pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
> #8 0x080cdb53 in load_source_module (name=0xbfffd910 "mx.DateTime.DateTime", pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
> #9 0x080cb8be in load_module (name=0xbfffd910 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd480 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
>
> -Ross B.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 09 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Mon Feb 9 11:59:21 2004
From: ross at principia.edu (Ross Brattain)
Date: Sat Jan 14 16:00:45 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <40276FA6.6030206@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87ptcsldts.fsf@maas-neotek.comcast.net>
<40276FA6.6030206@egenix.com>
Message-ID: <87ekt4f2hy.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
> Could you try compiling the package with optimizations disabled
> (-O0) ?!
Python 2.3.3 (#3, Feb 9 2004, 11:51:59)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mx.DateTime
>>> print mx.DateTime.__version__
2.1.0
Vanilla python 2.3.3 build
egenix-mx-base-2.1.0-2003-07-29.zip built with -O0
-Ross B.
From smulloni at smullyan.org Wed Feb 11 12:41:18 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Sat Jan 14 16:00:45 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87d68rg2v9.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
Message-ID: <20040211174118.GA31434@smullyan.org>
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.
I can provide core files, backtraces, etc., upon request.
Cheers,
Jacob Smullyan
On Fri, Feb 06, 2004 at 04:16:58PM -0800, Ross Brattain wrote:
> "M.-A. Lemburg" writes:
>
> > Are you using a Python version that's compiled with debug
> > mode enabled (or have you used such a Python version to
> > compile mxDateTime) ?
> >
>
> No, just vanilla ./configure.
>
> I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
>
> Because of this line from the backtrace:
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
>
> mxDateTime.c:333 :
>
> #ifdef MXDATETIME_FREELIST
> if (mxDateTime_FreeList) {
> datetime = mxDateTime_FreeList;
> mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
> datetime->ob_type = &mxDateTime_Type;
> -> _Py_NewReference(datetime);
> }
> else
> #endif
> {
> datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
> if (datetime == NULL)
> return NULL;
> }
>
> I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
>
> --- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
> +++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
> @@ -76,7 +76,7 @@
> #define STRFTIME_OUTPUT_SIZE 1024
>
> /* Define these to have the module use free lists (saves malloc calls) */
> -#define MXDATETIME_FREELIST
> +#undef MXDATETIME_FREELIST
> #define MXDATETIMEDELTA_FREELIST
>
> /* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
>
>
> This is not the root cause because, as mentioned, a rebuild of
> Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
> problem.
>
> My working production environment (different machine) is:
> Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
> [GCC 3.2.3 20030415 (Debian prerelease)] on linux2
>
> and egenix-base-2.0.4
>
> I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
> works.
>
> So is it a gcc problem?
>
> -Ross B.
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
>
From mal at egenix.com Wed Feb 11 18:45:19 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Sat Jan 14 16:00:45 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <20040211174118.GA31434@smullyan.org>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
<20040211174118.GA31434@smullyan.org>
Message-ID: <402A783F.6010909@egenix.com>
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 can provide core files, backtraces, etc., upon request.
>
> Cheers,
>
> Jacob Smullyan
>
> On Fri, Feb 06, 2004 at 04:16:58PM -0800, Ross Brattain wrote:
>
>>"M.-A. Lemburg" writes:
>>
>>
>>>Are you using a Python version that's compiled with debug
>>>mode enabled (or have you used such a Python version to
>>>compile mxDateTime) ?
>>>
>>
>>No, just vanilla ./configure.
>>
>>I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
>>
>>Because of this line from the backtrace:
>>#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
>>
>>mxDateTime.c:333 :
>>
>>#ifdef MXDATETIME_FREELIST
>> if (mxDateTime_FreeList) {
>> datetime = mxDateTime_FreeList;
>> mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
>> datetime->ob_type = &mxDateTime_Type;
>>-> _Py_NewReference(datetime);
>> }
>> else
>>#endif
>> {
>> datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
>> if (datetime == NULL)
>> return NULL;
>> }
>>
>>I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
>>
>>--- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
>>+++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
>>@@ -76,7 +76,7 @@
>> #define STRFTIME_OUTPUT_SIZE 1024
>>
>> /* Define these to have the module use free lists (saves malloc calls) */
>>-#define MXDATETIME_FREELIST
>>+#undef MXDATETIME_FREELIST
>> #define MXDATETIMEDELTA_FREELIST
>>
>> /* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
>>
>>
>>This is not the root cause because, as mentioned, a rebuild of
>>Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
>>problem.
>>
>>My working production environment (different machine) is:
>>Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
>>[GCC 3.2.3 20030415 (Debian prerelease)] on linux2
>>
>>and egenix-base-2.0.4
>>
>>I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
>>works.
>>
>>So is it a gcc problem?
>>
>>-Ross B.
>>
>>_______________________________________________________________________
>>eGenix.com User Mailing List http://www.egenix.com/
>>http://lists.egenix.com/mailman/listinfo/egenix-users
>>
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 11 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From smulloni at smullyan.org Wed Feb 11 13:53:20 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Sat Jan 14 16:00:45 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402A783F.6010909@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
<20040211174118.GA31434@smullyan.org> <402A783F.6010909@egenix.com>
Message-ID: <20040211185320.GA31997@smullyan.org>
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
From egrubbs at rackspace.com Thu Feb 19 12:10:39 2004
From: egrubbs at rackspace.com (Edwin Grubbs)
Date: Sat Jan 14 16:00:45 2006
Subject: [egenix-users] DateTimeFrom parser error
Message-ID: <20040219181039.GX5971@rackspace.com>
I get parse error when parsing a date in this format when the hour is
"12".
>>> from mx.DateTime import DateTimeFrom
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
Traceback (most recent call last):
File "", line 1, in ?
File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
return Parser.DateTimeFromString(arg)
File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
raise DateTime.RangeError,\
mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
>>>
But parsing 11 o'clock works fine:
>>> DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>>>
-Edwin
From Jim.Vickroy at noaa.gov Thu Feb 19 11:20:18 2004
From: Jim.Vickroy at noaa.gov (Jim Vickroy)
Date: Sat Jan 14 16:00:45 2006
Subject: [egenix-users] DateTimeFrom parser error
References: <20040219181039.GX5971@rackspace.com>
Message-ID: <4034FE62.2E888FBC@noaa.gov>
Me too.
But eliminating the "PM" designator does not fail:
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 CST')
>>>
My system:
Microsoft Windows 2000
Python 2.3.3
egenix-mx-base-2.0.5.win32-py2.3.exe
Edwin Grubbs wrote:
> I get parse error when parsing a date in this format when the hour is
> "12".
>
> >>> from mx.DateTime import DateTimeFrom
> >>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
> Traceback (most recent call last):
> File "", line 1, in ?
> File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
> return Parser.DateTimeFromString(arg)
> File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
> raise DateTime.RangeError,\
> mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
> >>>
>
> But parsing 11 o'clock works fine:
>
> >>> DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>
> >>>
>
> -Edwin
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
From mal at egenix.com Thu Feb 19 20:22:34 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Sat Jan 14 16:00:45 2006
Subject: [egenix-users] DateTimeFrom parser error
In-Reply-To: <4034FE62.2E888FBC@noaa.gov>
References: <20040219181039.GX5971@rackspace.com> <4034FE62.2E888FBC@noaa.gov>
Message-ID: <40351B0A.9070401@egenix.com>
Jim Vickroy wrote:
> Me too.
>
> But eliminating the "PM" designator does not fail:
>
>
>>>>DateTimeFrom('Thursday, February 19, 2004 12:05:34 CST')
>
>
>
>
> My system:
>
> Microsoft Windows 2000
> Python 2.3.3
> egenix-mx-base-2.0.5.win32-py2.3.exe
That's a known bug in 2.0.x. It is fixed in the 2.1.x series which still
hasn't made it to general release version because of too many other projects
keeping us busy:
>>> from mx.DateTime import *
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
FWIW, if you are an mxODBC Zope DA user, you're lucky... it ships
with the current 2.1.x versions of egenix-mx-base under the covers.
> Edwin Grubbs wrote:
>
>
>>I get parse error when parsing a date in this format when the hour is
>>"12".
>>
>>
>>>>>from mx.DateTime import DateTimeFrom
>>>>>DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
>>
>>Traceback (most recent call last):
>> File "", line 1, in ?
>> File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
>> return Parser.DateTimeFromString(arg)
>> File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
>> raise DateTime.RangeError,\
>>mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
>>
>>But parsing 11 o'clock works fine:
>>
>>
>>>>>DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>>
>>
>>
>>-Edwin
>>
>>_______________________________________________________________________
>>eGenix.com User Mailing List http://www.egenix.com/
>>http://lists.egenix.com/mailman/listinfo/egenix-users
>
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 19 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From smulloni at smullyan.org Wed Feb 25 13:53:11 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Sat Jan 14 16:00:45 2006
Subject: [egenix-users]
mx-base 2.0.5 segfaults against Python 2.3.3 --without-pymalloc
--with-pydebug
Message-ID: <20040225185311.GA5226@smullyan.org>
This may be already known, but 2.0.5 segfaults *immediately* with
Python 2.3.3 configured --without-pymalloc --with-pydebug on 2 linux
platforms I've tested (gcc 2.95 and 3.3.2). 2.1.0 does not.
From the core backtrace:
#0 0x08082a5f in _Py_ForgetReference (op=0x81a27d0) at Objects/object.c:2000
#1 0x4031a354 in mxDateTime_Free (datetime=0x81a27d0) at mx/DateTime/mxDateTime/mxDateTime.c:365
#2 0x08082ad6 in _Py_Dealloc (op=0x81a27d0) at Objects/object.c:2022
#3 0x080bdb7f in eval_frame (f=0x81aa20c) at Python/ceval.c:1935
#4 0x080c02ca in PyEval_EvalCodeEx (co=0x821fff8, globals=0x821decc, locals=0x821decc, args=0x0,
argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#5 0x080b8b90 in PyEval_EvalCode (co=0x821fff8, globals=0x821decc, locals=0x821decc) at Python/ceval.c:537
#6 0x080da8a2 in PyImport_ExecCodeModuleEx (name=0xbfffda00 "mx.DateTime.DateTime", co=0x821fff8,
pathname=0xbfffd0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#7 0x080dafc2 in load_source_module (name=0xbfffda00 "mx.DateTime.DateTime",
pathname=0xbfffd0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x82088f0) at Python/import.c:894
#8 0x080dc2f0 in load_module (name=0xbfffda00 "mx.DateTime.DateTime", fp=0x82088f0,
buf=0xbfffd560 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.py",
type=1, loader=0x0) at Python/import.c:1699
#9 0x080dd991 in import_submodule (mod=0x8208c1c, subname=0xbfffda0c "DateTime",
fullname=0xbfffda00 "mx.DateTime.DateTime") at Python/import.c:2290
#10 0x080dd14d in load_next (mod=0x8208c1c, altmod=0x812e308, p_name=0xbfffde20,
buf=0xbfffda00 "mx.DateTime.DateTime", p_buflen=0xbfffd9fc) at Python/import.c:2111
#11 0x080dca9a in import_module_ex (name=0x0, globals=0x820849c, locals=0x820849c, fromlist=0x819af9c)
at Python/import.c:1957
#12 0x080dcd87 in PyImport_ImportModuleEx (name=0x8208f1c "DateTime", globals=0x820849c, locals=0x820849c,
fromlist=0x819af9c) at Python/import.c:1998
#13 0x080af037 in builtin___import__ (self=0x0, args=0x820a36c) at Python/bltinmodule.c:45
#14 0x0810ca6e in PyCFunction_Call (func=0x8173ffc, arg=0x820a36c, kw=0x0) at Objects/methodobject.c:73
#15 0x0805c483 in PyObject_Call (func=0x8173ffc, arg=0x820a36c, kw=0x0) at Objects/abstract.c:1755
#16 0x080c1a44 in PyEval_CallObjectWithKeywords (func=0x8173ffc, arg=0x820a36c, kw=0x0)
at Python/ceval.c:3346
#17 0x080bdf28 in eval_frame (f=0x81e5724) at Python/ceval.c:1996
#18 0x080c02ca in PyEval_EvalCodeEx (co=0x820a290, globals=0x820849c, locals=0x820849c, args=0x0,
argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#19 0x080b8b90 in PyEval_EvalCode (co=0x820a290, globals=0x820849c, locals=0x820849c) at Python/ceval.c:537
#20 0x080da8a2 in PyImport_ExecCodeModuleEx (name=0xbfffeea0 "mx.DateTime", co=0x820a290,
pathname=0xbfffe0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
etc. This core was produced simply by importing mx.DateTime.
Cheers,
Jacob Smullyan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /mailman-archives/egenix-users/attachments/20040225/a71bc3d7/attachment-0007.bin
From mal at egenix.com Fri Feb 27 10:14:04 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Sat Jan 14 16:00:45 2006
Subject: [egenix-users] mx-base 2.0.5 segfaults against Python 2.3.3
--without-pymalloc --with-pydebug
In-Reply-To: <20040225185311.GA5226@smullyan.org>
References: <20040225185311.GA5226@smullyan.org>
Message-ID: <403F0A5C.5010901@egenix.com>
Jacob Smullyan wrote:
> This may be already known, but 2.0.5 segfaults *immediately* with
> Python 2.3.3 configured --without-pymalloc --with-pydebug on 2 linux
> platforms I've tested (gcc 2.95 and 3.3.2). 2.1.0 does not.
While 2.1.0 is more suited for Python versions compiled with
--with-debug, I have to say that we don't support that option.
There are simply too many different configure options available
in Python that it's not possible to accomodate for each and every
combination.
Standard Python compiles should and do work, though. If you find that
there is a problem with the free lists in e.g. mxDateTime causing
a seg fault, then it's the compiler's optimizer not doing a proper
job. Apperently the compilers have a problem with optimizing this
piece of code:
datetime = mxDateTime_FreeList;
mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
datetime->ob_type = &mxDateTime_Type;
In such a case, please edit the C files and comment out the
free list #defines, e.g. for mxDateTime:
/* Define these to have the module use free lists (saves malloc calls) */
#define MXDATETIME_FREELIST
#define MXDATETIMEDELTA_FREELIST
Patches are welcome, of course. It's hard for us to fix bugs that
we cannot reproduce using our standard tools, so if you want these
things fixed, please make suggestions on how to work around the
problem.
Thanks,
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 27 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Thu Feb 5 22:17:38 2004
From: ross at principia.edu (Ross Brattain)
Date: Sat Jan 14 20:00:43 2006
Subject: [egenix-users]
seg fault on import mx.DateTime Python2.3.3 egenix-base-2.0.5
Message-ID: <87fzdon33x.fsf@maas-neotek.comcast.net>
My usual runtime environment is Python 2.2.3 and egenix-base-2.0.4.
I'm update everything and was surprised with this seg fault.
-Ross B.
Debian unstable
# gcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
Thread model: posix
gcc version 3.3.3 20040125 (prerelease) (Debian)
Python 2.3.3 (#1, Feb 5 2004, 21:57:53)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mx.DateTime
zsh: segmentation fault (core dumped) /charting/bin/python2.3
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
#1 0x402ee68a in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:3998
#2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b78c4, kw=0x1) at Objects/methodobject.c:108
#3 0x080aa664 in call_function (pp_stack=0xbfffcecc, oparg=1) at Python/ceval.c:3439
#4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
#5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b5760, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd8e0 "mx.DateTime.DateTime", co=0x402b5760, pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#8 0x080cdb53 in load_source_module (name=0xbfffd8e0 "mx.DateTime.DateTime", pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
#9 0x080cb8be in load_module (name=0xbfffd8e0 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd450 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
#10 0x080cc7b8 in import_submodule (mod=0x4026138c, subname=0xbfffd8ec "DateTime", fullname=0xbfffd8e0 "mx.DateTime.DateTime") at Python/import.c:2290
#11 0x080cc2e3 in load_next (mod=0x4026138c, altmod=0x8116160, p_name=0xbfffd8ec, buf=0xbfffd8e0 "mx.DateTime.DateTime", p_buflen=0xbfffd8dc) at Python/import.c:2111
#12 0x080ce319 in import_module_ex (name=0x0, globals=0x1, locals=0x402a5dfc, fromlist=0x4028750c) at Python/import.c:1957
#13 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
#14 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
#15 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x402aeeb4, kw=0x1) at Objects/methodobject.c:108
#16 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
#17 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x402aeeb4, kw=0x40269bec) at Python/ceval.c:3346
#18 0x080a8794 in eval_frame (f=0x818b02c) at Python/ceval.c:1996
#19 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7b20, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#20 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#21 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffece0 "mx.DateTime", co=0x402a7b20, pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
#22 0x080cdb53 in load_source_module (name=0xbfffece0 "mx.DateTime", pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc", fp=0x81632a0) at Python/import.c:894
#23 0x080cb8be in load_module (name=0xbfffece0 "mx.DateTime", fp=0x81632a0, buf=0xbfffe3c0 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.py", type=1, loader=0x1) at Python/import.c:1699
#24 0x080ce051 in load_package (name=0xbfffece0 "mx.DateTime", pathname=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime") at Python/import.c:951
#25 0x080cb9ed in load_module (name=0xbfffece0 "mx.DateTime", fp=0xbfffe850, buf=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime", type=5, loader=0x1) at Python/import.c:1722
#26 0x080cc7b8 in import_submodule (mod=0x40261374, subname=0xbfffece3 "DateTime", fullname=0xbfffece0 "mx.DateTime") at Python/import.c:2290
#27 0x080cc2e3 in load_next (mod=0x40261374, altmod=0x40261374, p_name=0xbfffece3, buf=0xbfffece0 "mx.DateTime", p_buflen=0xbfffecdc) at Python/import.c:2111
#28 0x080ce40f in import_module_ex (name=0x0, globals=0x1, locals=0x4027879c, fromlist=0x8116160) at Python/import.c:1964
#29 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
#30 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
#31 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x4028075c, kw=0x1) at Objects/methodobject.c:108
#32 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
#33 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x4028075c, kw=0x40269bec) at Python/ceval.c:3346
#34 0x080a8794 in eval_frame (f=0x8183a54) at Python/ceval.c:1996
#35 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7320, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#36 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#37 0x080d7d1b in run_node (n=0x4027879c, filename=0x1 , globals=0x1, locals=0x1, flags=0x1) at Python/pythonrun.c:1265
#38 0x080d724e in PyRun_InteractiveOneFlags (fp=0x1, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:757
#39 0x080d7043 in PyRun_InteractiveLoopFlags (fp=0x40254e20, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:690
#40 0x080d8642 in PyRun_AnyFileExFlags (fp=0x40254e20, filename=0x80ff46a "", closeit=0, flags=0xbffff428) at Python/pythonrun.c:653
#41 0x08054e35 in Py_Main (argc=0, argv=0xbffff4d4) at Modules/main.c:415
#42 0x0805498b in main (argc=1, argv=0x1) at Modules/python.c:23
From mal at egenix.com Fri Feb 6 10:05:49 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Sat Jan 14 20:00:43 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87fzdon33x.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
Message-ID: <402358ED.2060401@egenix.com>
Ross Brattain wrote:
>
> My usual runtime environment is Python 2.2.3 and egenix-base-2.0.4.
> I'm update everything and was surprised with this seg fault.
Are you using a Python version that's compiled with debug
mode enabled (or have you used such a Python version to
compile mxDateTime) ?
> -Ross B.
>
>
> Debian unstable
>
> # gcc -v
> Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs
> Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
> Thread model: posix
> gcc version 3.3.3 20040125 (prerelease) (Debian)
>
>
> Python 2.3.3 (#1, Feb 5 2004, 21:57:53)
> [GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>
>>>>import mx.DateTime
>
> zsh: segmentation fault (core dumped) /charting/bin/python2.3
>
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
> #1 0x402ee68a in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:3998
> #2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b78c4, kw=0x1) at Objects/methodobject.c:108
> #3 0x080aa664 in call_function (pp_stack=0xbfffcecc, oparg=1) at Python/ceval.c:3439
> #4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
> #5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b5760, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd8e0 "mx.DateTime.DateTime", co=0x402b5760, pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
> #8 0x080cdb53 in load_source_module (name=0xbfffd8e0 "mx.DateTime.DateTime", pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
> #9 0x080cb8be in load_module (name=0xbfffd8e0 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd450 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
> #10 0x080cc7b8 in import_submodule (mod=0x4026138c, subname=0xbfffd8ec "DateTime", fullname=0xbfffd8e0 "mx.DateTime.DateTime") at Python/import.c:2290
> #11 0x080cc2e3 in load_next (mod=0x4026138c, altmod=0x8116160, p_name=0xbfffd8ec, buf=0xbfffd8e0 "mx.DateTime.DateTime", p_buflen=0xbfffd8dc) at Python/import.c:2111
> #12 0x080ce319 in import_module_ex (name=0x0, globals=0x1, locals=0x402a5dfc, fromlist=0x4028750c) at Python/import.c:1957
> #13 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
> #14 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
> #15 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x402aeeb4, kw=0x1) at Objects/methodobject.c:108
> #16 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
> #17 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x402aeeb4, kw=0x40269bec) at Python/ceval.c:3346
> #18 0x080a8794 in eval_frame (f=0x818b02c) at Python/ceval.c:1996
> #19 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7b20, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #20 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #21 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffece0 "mx.DateTime", co=0x402a7b20, pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
> #22 0x080cdb53 in load_source_module (name=0xbfffece0 "mx.DateTime", pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc", fp=0x81632a0) at Python/import.c:894
> #23 0x080cb8be in load_module (name=0xbfffece0 "mx.DateTime", fp=0x81632a0, buf=0xbfffe3c0 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.py", type=1, loader=0x1) at Python/import.c:1699
> #24 0x080ce051 in load_package (name=0xbfffece0 "mx.DateTime", pathname=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime") at Python/import.c:951
> #25 0x080cb9ed in load_module (name=0xbfffece0 "mx.DateTime", fp=0xbfffe850, buf=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime", type=5, loader=0x1) at Python/import.c:1722
> #26 0x080cc7b8 in import_submodule (mod=0x40261374, subname=0xbfffece3 "DateTime", fullname=0xbfffece0 "mx.DateTime") at Python/import.c:2290
> #27 0x080cc2e3 in load_next (mod=0x40261374, altmod=0x40261374, p_name=0xbfffece3, buf=0xbfffece0 "mx.DateTime", p_buflen=0xbfffecdc) at Python/import.c:2111
> #28 0x080ce40f in import_module_ex (name=0x0, globals=0x1, locals=0x4027879c, fromlist=0x8116160) at Python/import.c:1964
> #29 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
> #30 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
> #31 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x4028075c, kw=0x1) at Objects/methodobject.c:108
> #32 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
> #33 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x4028075c, kw=0x40269bec) at Python/ceval.c:3346
> #34 0x080a8794 in eval_frame (f=0x8183a54) at Python/ceval.c:1996
> #35 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7320, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #36 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #37 0x080d7d1b in run_node (n=0x4027879c, filename=0x1 , globals=0x1, locals=0x1, flags=0x1) at Python/pythonrun.c:1265
> #38 0x080d724e in PyRun_InteractiveOneFlags (fp=0x1, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:757
> #39 0x080d7043 in PyRun_InteractiveLoopFlags (fp=0x40254e20, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:690
> #40 0x080d8642 in PyRun_AnyFileExFlags (fp=0x40254e20, filename=0x80ff46a "", closeit=0, flags=0xbffff428) at Python/pythonrun.c:653
> #41 0x08054e35 in Py_Main (argc=0, argv=0xbffff4d4) at Modules/main.c:415
> #42 0x0805498b in main (argc=1, argv=0x1) at Modules/python.c:23
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 06 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Fri Feb 6 16:16:58 2004
From: ross at principia.edu (Ross Brattain)
Date: Sat Jan 14 20:00:43 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402358ED.2060401@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com>
Message-ID: <87d68rg2v9.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
> Are you using a Python version that's compiled with debug
> mode enabled (or have you used such a Python version to
> compile mxDateTime) ?
>
No, just vanilla ./configure.
I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
Because of this line from the backtrace:
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
mxDateTime.c:333 :
#ifdef MXDATETIME_FREELIST
if (mxDateTime_FreeList) {
datetime = mxDateTime_FreeList;
mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
datetime->ob_type = &mxDateTime_Type;
-> _Py_NewReference(datetime);
}
else
#endif
{
datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
if (datetime == NULL)
return NULL;
}
I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
--- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
+++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
@@ -76,7 +76,7 @@
#define STRFTIME_OUTPUT_SIZE 1024
/* Define these to have the module use free lists (saves malloc calls) */
-#define MXDATETIME_FREELIST
+#undef MXDATETIME_FREELIST
#define MXDATETIMEDELTA_FREELIST
/* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
This is not the root cause because, as mentioned, a rebuild of
Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
problem.
My working production environment (different machine) is:
Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
[GCC 3.2.3 20030415 (Debian prerelease)] on linux2
and egenix-base-2.0.4
I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
works.
So is it a gcc problem?
-Ross B.
From ross at principia.edu Fri Feb 6 16:17:41 2004
From: ross at principia.edu (Ross Brattain)
Date: Sat Jan 14 20:00:43 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402358ED.2060401@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com>
Message-ID: <87r7x7eo9m.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
>
> Are you using a Python version that's compiled with debug
> mode enabled (or have you used such a Python version to
> compile mxDateTime) ?
>
Another data point:
Python 2.3.3 (#1, Feb 6 2004, 01:59:49)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
built from:
egenix-mx-base-2.1.0-2003-07-29.zip
(gdb) bt
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:341
#1 0x402eeaba in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:4091
#2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b7914, kw=0x1) at Objects/methodobject.c:108
#3 0x080aa664 in call_function (pp_stack=0xbfffcefc, oparg=1) at Python/ceval.c:3439
#4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
#5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b47a0, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd910 "mx.DateTime.DateTime", co=0x402b47a0, pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#8 0x080cdb53 in load_source_module (name=0xbfffd910 "mx.DateTime.DateTime", pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
#9 0x080cb8be in load_module (name=0xbfffd910 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd480 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
-Ross B.
From mal at egenix.com Mon Feb 9 11:31:50 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Sat Jan 14 20:00:43 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87ptcsldts.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87ptcsldts.fsf@maas-neotek.comcast.net>
Message-ID: <40276FA6.6030206@egenix.com>
Ross Brattain wrote:
> "M.-A. Lemburg" writes:
>
>
>>Are you using a Python version that's compiled with debug
>>mode enabled (or have you used such a Python version to
>>compile mxDateTime) ?
>>
>
>
> Another data point:
Could you try compiling the package with optimizations disabled
(-O0) ?!
> Python 2.3.3 (#1, Feb 6 2004, 01:59:49)
> [GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
>
> built from:
> egenix-mx-base-2.1.0-2003-07-29.zip
>
> (gdb) bt
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:341
> #1 0x402eeaba in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:4091
> #2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b7914, kw=0x1) at Objects/methodobject.c:108
> #3 0x080aa664 in call_function (pp_stack=0xbfffcefc, oparg=1) at Python/ceval.c:3439
> #4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
> #5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b47a0, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd910 "mx.DateTime.DateTime", co=0x402b47a0, pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
> #8 0x080cdb53 in load_source_module (name=0xbfffd910 "mx.DateTime.DateTime", pathname=0xbfffcff0 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
> #9 0x080cb8be in load_module (name=0xbfffd910 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd480 "/tmp/test/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
>
> -Ross B.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 09 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Mon Feb 9 11:59:21 2004
From: ross at principia.edu (Ross Brattain)
Date: Sat Jan 14 20:00:43 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <40276FA6.6030206@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87ptcsldts.fsf@maas-neotek.comcast.net>
<40276FA6.6030206@egenix.com>
Message-ID: <87ekt4f2hy.fsf@maas-neotek.comcast.net>
"M.-A. Lemburg" writes:
> Could you try compiling the package with optimizations disabled
> (-O0) ?!
Python 2.3.3 (#3, Feb 9 2004, 11:51:59)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mx.DateTime
>>> print mx.DateTime.__version__
2.1.0
Vanilla python 2.3.3 build
egenix-mx-base-2.1.0-2003-07-29.zip built with -O0
-Ross B.
From smulloni at smullyan.org Wed Feb 11 12:41:18 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Sat Jan 14 20:00:43 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87d68rg2v9.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
Message-ID: <20040211174118.GA31434@smullyan.org>
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.
I can provide core files, backtraces, etc., upon request.
Cheers,
Jacob Smullyan
On Fri, Feb 06, 2004 at 04:16:58PM -0800, Ross Brattain wrote:
> "M.-A. Lemburg" writes:
>
> > Are you using a Python version that's compiled with debug
> > mode enabled (or have you used such a Python version to
> > compile mxDateTime) ?
> >
>
> No, just vanilla ./configure.
>
> I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
>
> Because of this line from the backtrace:
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
>
> mxDateTime.c:333 :
>
> #ifdef MXDATETIME_FREELIST
> if (mxDateTime_FreeList) {
> datetime = mxDateTime_FreeList;
> mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
> datetime->ob_type = &mxDateTime_Type;
> -> _Py_NewReference(datetime);
> }
> else
> #endif
> {
> datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
> if (datetime == NULL)
> return NULL;
> }
>
> I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
>
> --- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
> +++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
> @@ -76,7 +76,7 @@
> #define STRFTIME_OUTPUT_SIZE 1024
>
> /* Define these to have the module use free lists (saves malloc calls) */
> -#define MXDATETIME_FREELIST
> +#undef MXDATETIME_FREELIST
> #define MXDATETIMEDELTA_FREELIST
>
> /* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
>
>
> This is not the root cause because, as mentioned, a rebuild of
> Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
> problem.
>
> My working production environment (different machine) is:
> Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
> [GCC 3.2.3 20030415 (Debian prerelease)] on linux2
>
> and egenix-base-2.0.4
>
> I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
> works.
>
> So is it a gcc problem?
>
> -Ross B.
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
>
From mal at egenix.com Wed Feb 11 18:45:19 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Sat Jan 14 20:00:43 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <20040211174118.GA31434@smullyan.org>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
<20040211174118.GA31434@smullyan.org>
Message-ID: <402A783F.6010909@egenix.com>
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 can provide core files, backtraces, etc., upon request.
>
> Cheers,
>
> Jacob Smullyan
>
> On Fri, Feb 06, 2004 at 04:16:58PM -0800, Ross Brattain wrote:
>
>>"M.-A. Lemburg" writes:
>>
>>
>>>Are you using a Python version that's compiled with debug
>>>mode enabled (or have you used such a Python version to
>>>compile mxDateTime) ?
>>>
>>
>>No, just vanilla ./configure.
>>
>>I rebuilt Python 2.2.3 / egenix-base-2.0.4 and had the same problem.
>>
>>Because of this line from the backtrace:
>>#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
>>
>>mxDateTime.c:333 :
>>
>>#ifdef MXDATETIME_FREELIST
>> if (mxDateTime_FreeList) {
>> datetime = mxDateTime_FreeList;
>> mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
>> datetime->ob_type = &mxDateTime_Type;
>>-> _Py_NewReference(datetime);
>> }
>> else
>>#endif
>> {
>> datetime = PyObject_NEW(mxDateTimeObject,&mxDateTime_Type);
>> if (datetime == NULL)
>> return NULL;
>> }
>>
>>I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine.
>>
>>--- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800
>>+++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800
>>@@ -76,7 +76,7 @@
>> #define STRFTIME_OUTPUT_SIZE 1024
>>
>> /* Define these to have the module use free lists (saves malloc calls) */
>>-#define MXDATETIME_FREELIST
>>+#undef MXDATETIME_FREELIST
>> #define MXDATETIMEDELTA_FREELIST
>>
>> /* Define this to enable the copy-protocol (__copy__, __deepcopy__) */
>>
>>
>>This is not the root cause because, as mentioned, a rebuild of
>>Python 2.2.3 / egenix-base-2.0.4 on this machine exhibited the same
>>problem.
>>
>>My working production environment (different machine) is:
>>Python 2.2.3 (#1, Jun 5 2003, 13:06:29)
>>[GCC 3.2.3 20030415 (Debian prerelease)] on linux2
>>
>>and egenix-base-2.0.4
>>
>>I rebuilt Python-2.2.3 / egenix-base-2.0.4 on production and it still
>>works.
>>
>>So is it a gcc problem?
>>
>>-Ross B.
>>
>>_______________________________________________________________________
>>eGenix.com User Mailing List http://www.egenix.com/
>>http://lists.egenix.com/mailman/listinfo/egenix-users
>>
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 11 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From smulloni at smullyan.org Wed Feb 11 13:53:20 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Sat Jan 14 20:00:43 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <402A783F.6010909@egenix.com>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
<402358ED.2060401@egenix.com> <87d68rg2v9.fsf@maas-neotek.comcast.net>
<20040211174118.GA31434@smullyan.org> <402A783F.6010909@egenix.com>
Message-ID: <20040211185320.GA31997@smullyan.org>
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
From egrubbs at rackspace.com Thu Feb 19 12:10:39 2004
From: egrubbs at rackspace.com (Edwin Grubbs)
Date: Sat Jan 14 20:00:43 2006
Subject: [egenix-users] DateTimeFrom parser error
Message-ID: <20040219181039.GX5971@rackspace.com>
I get parse error when parsing a date in this format when the hour is
"12".
>>> from mx.DateTime import DateTimeFrom
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
Traceback (most recent call last):
File "", line 1, in ?
File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
return Parser.DateTimeFromString(arg)
File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
raise DateTime.RangeError,\
mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
>>>
But parsing 11 o'clock works fine:
>>> DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>>>
-Edwin
From Jim.Vickroy at noaa.gov Thu Feb 19 11:20:18 2004
From: Jim.Vickroy at noaa.gov (Jim Vickroy)
Date: Sat Jan 14 20:00:43 2006
Subject: [egenix-users] DateTimeFrom parser error
References: <20040219181039.GX5971@rackspace.com>
Message-ID: <4034FE62.2E888FBC@noaa.gov>
Me too.
But eliminating the "PM" designator does not fail:
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 CST')
>>>
My system:
Microsoft Windows 2000
Python 2.3.3
egenix-mx-base-2.0.5.win32-py2.3.exe
Edwin Grubbs wrote:
> I get parse error when parsing a date in this format when the hour is
> "12".
>
> >>> from mx.DateTime import DateTimeFrom
> >>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
> Traceback (most recent call last):
> File "", line 1, in ?
> File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
> return Parser.DateTimeFromString(arg)
> File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
> raise DateTime.RangeError,\
> mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
> >>>
>
> But parsing 11 o'clock works fine:
>
> >>> DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>
> >>>
>
> -Edwin
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
From mal at egenix.com Thu Feb 19 20:22:34 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Sat Jan 14 20:00:43 2006
Subject: [egenix-users] DateTimeFrom parser error
In-Reply-To: <4034FE62.2E888FBC@noaa.gov>
References: <20040219181039.GX5971@rackspace.com> <4034FE62.2E888FBC@noaa.gov>
Message-ID: <40351B0A.9070401@egenix.com>
Jim Vickroy wrote:
> Me too.
>
> But eliminating the "PM" designator does not fail:
>
>
>>>>DateTimeFrom('Thursday, February 19, 2004 12:05:34 CST')
>
>
>
>
> My system:
>
> Microsoft Windows 2000
> Python 2.3.3
> egenix-mx-base-2.0.5.win32-py2.3.exe
That's a known bug in 2.0.x. It is fixed in the 2.1.x series which still
hasn't made it to general release version because of too many other projects
keeping us busy:
>>> from mx.DateTime import *
>>> DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
FWIW, if you are an mxODBC Zope DA user, you're lucky... it ships
with the current 2.1.x versions of egenix-mx-base under the covers.
> Edwin Grubbs wrote:
>
>
>>I get parse error when parsing a date in this format when the hour is
>>"12".
>>
>>
>>>>>from mx.DateTime import DateTimeFrom
>>>>>DateTimeFrom('Thursday, February 19, 2004 12:05:34 PM CST')
>>
>>Traceback (most recent call last):
>> File "", line 1, in ?
>> File "/usr/lib/python2.2/site-packages/mx/DateTime/DateTime.py", line 219, in DateTimeFrom
>> return Parser.DateTimeFromString(arg)
>> File "/usr/lib/python2.2/site-packages/mx/DateTime/Parser.py", line 567, in DateTimeFromString
>> raise DateTime.RangeError,\
>>mx.DateTime.RangeError: Failed to parse "Thursday, February 19, 2004 12:05:34 PM CST": hour out of range (0-23): 24
>>
>>But parsing 11 o'clock works fine:
>>
>>
>>>>>DateTimeFrom('Thursday, February 19, 2004 11:05:34 PM CST')
>>
>>
>>
>>-Edwin
>>
>>_______________________________________________________________________
>>eGenix.com User Mailing List http://www.egenix.com/
>>http://lists.egenix.com/mailman/listinfo/egenix-users
>
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 19 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8 http://zope.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From smulloni at smullyan.org Wed Feb 25 13:53:11 2004
From: smulloni at smullyan.org (Jacob Smullyan)
Date: Sat Jan 14 20:00:43 2006
Subject: [egenix-users]
mx-base 2.0.5 segfaults against Python 2.3.3 --without-pymalloc
--with-pydebug
Message-ID: <20040225185311.GA5226@smullyan.org>
This may be already known, but 2.0.5 segfaults *immediately* with
Python 2.3.3 configured --without-pymalloc --with-pydebug on 2 linux
platforms I've tested (gcc 2.95 and 3.3.2). 2.1.0 does not.
From the core backtrace:
#0 0x08082a5f in _Py_ForgetReference (op=0x81a27d0) at Objects/object.c:2000
#1 0x4031a354 in mxDateTime_Free (datetime=0x81a27d0) at mx/DateTime/mxDateTime/mxDateTime.c:365
#2 0x08082ad6 in _Py_Dealloc (op=0x81a27d0) at Objects/object.c:2022
#3 0x080bdb7f in eval_frame (f=0x81aa20c) at Python/ceval.c:1935
#4 0x080c02ca in PyEval_EvalCodeEx (co=0x821fff8, globals=0x821decc, locals=0x821decc, args=0x0,
argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#5 0x080b8b90 in PyEval_EvalCode (co=0x821fff8, globals=0x821decc, locals=0x821decc) at Python/ceval.c:537
#6 0x080da8a2 in PyImport_ExecCodeModuleEx (name=0xbfffda00 "mx.DateTime.DateTime", co=0x821fff8,
pathname=0xbfffd0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#7 0x080dafc2 in load_source_module (name=0xbfffda00 "mx.DateTime.DateTime",
pathname=0xbfffd0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x82088f0) at Python/import.c:894
#8 0x080dc2f0 in load_module (name=0xbfffda00 "mx.DateTime.DateTime", fp=0x82088f0,
buf=0xbfffd560 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/DateTime.py",
type=1, loader=0x0) at Python/import.c:1699
#9 0x080dd991 in import_submodule (mod=0x8208c1c, subname=0xbfffda0c "DateTime",
fullname=0xbfffda00 "mx.DateTime.DateTime") at Python/import.c:2290
#10 0x080dd14d in load_next (mod=0x8208c1c, altmod=0x812e308, p_name=0xbfffde20,
buf=0xbfffda00 "mx.DateTime.DateTime", p_buflen=0xbfffd9fc) at Python/import.c:2111
#11 0x080dca9a in import_module_ex (name=0x0, globals=0x820849c, locals=0x820849c, fromlist=0x819af9c)
at Python/import.c:1957
#12 0x080dcd87 in PyImport_ImportModuleEx (name=0x8208f1c "DateTime", globals=0x820849c, locals=0x820849c,
fromlist=0x819af9c) at Python/import.c:1998
#13 0x080af037 in builtin___import__ (self=0x0, args=0x820a36c) at Python/bltinmodule.c:45
#14 0x0810ca6e in PyCFunction_Call (func=0x8173ffc, arg=0x820a36c, kw=0x0) at Objects/methodobject.c:73
#15 0x0805c483 in PyObject_Call (func=0x8173ffc, arg=0x820a36c, kw=0x0) at Objects/abstract.c:1755
#16 0x080c1a44 in PyEval_CallObjectWithKeywords (func=0x8173ffc, arg=0x820a36c, kw=0x0)
at Python/ceval.c:3346
#17 0x080bdf28 in eval_frame (f=0x81e5724) at Python/ceval.c:1996
#18 0x080c02ca in PyEval_EvalCodeEx (co=0x820a290, globals=0x820849c, locals=0x820849c, args=0x0,
argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#19 0x080b8b90 in PyEval_EvalCode (co=0x820a290, globals=0x820849c, locals=0x820849c) at Python/ceval.c:537
#20 0x080da8a2 in PyImport_ExecCodeModuleEx (name=0xbfffeea0 "mx.DateTime", co=0x820a290,
pathname=0xbfffe0d0 "/home/smulloni/apps/python-debug/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
etc. This core was produced simply by importing mx.DateTime.
Cheers,
Jacob Smullyan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /mailman-archives/egenix-users/attachments/20040225/a71bc3d7/attachment-0008.bin
From mal at egenix.com Fri Feb 27 10:14:04 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Sat Jan 14 20:00:43 2006
Subject: [egenix-users] mx-base 2.0.5 segfaults against Python 2.3.3
--without-pymalloc --with-pydebug
In-Reply-To: <20040225185311.GA5226@smullyan.org>
References: <20040225185311.GA5226@smullyan.org>
Message-ID: <403F0A5C.5010901@egenix.com>
Jacob Smullyan wrote:
> This may be already known, but 2.0.5 segfaults *immediately* with
> Python 2.3.3 configured --without-pymalloc --with-pydebug on 2 linux
> platforms I've tested (gcc 2.95 and 3.3.2). 2.1.0 does not.
While 2.1.0 is more suited for Python versions compiled with
--with-debug, I have to say that we don't support that option.
There are simply too many different configure options available
in Python that it's not possible to accomodate for each and every
combination.
Standard Python compiles should and do work, though. If you find that
there is a problem with the free lists in e.g. mxDateTime causing
a seg fault, then it's the compiler's optimizer not doing a proper
job. Apperently the compilers have a problem with optimizing this
piece of code:
datetime = mxDateTime_FreeList;
mxDateTime_FreeList = *(mxDateTimeObject **)mxDateTime_FreeList;
datetime->ob_type = &mxDateTime_Type;
In such a case, please edit the C files and comment out the
free list #defines, e.g. for mxDateTime:
/* Define these to have the module use free lists (saves malloc calls) */
#define MXDATETIME_FREELIST
#define MXDATETIMEDELTA_FREELIST
Patches are welcome, of course. It's hard for us to fix bugs that
we cannot reproduce using our standard tools, so if you want these
things fixed, please make suggestions on how to work around the
problem.
Thanks,
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 27 2004)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
From ross at principia.edu Thu Feb 5 22:17:38 2004
From: ross at principia.edu (Ross Brattain)
Date: Sun Jan 15 08:02:08 2006
Subject: [egenix-users]
seg fault on import mx.DateTime Python2.3.3 egenix-base-2.0.5
Message-ID: <87fzdon33x.fsf@maas-neotek.comcast.net>
My usual runtime environment is Python 2.2.3 and egenix-base-2.0.4.
I'm update everything and was surprised with this seg fault.
-Ross B.
Debian unstable
# gcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
Thread model: posix
gcc version 3.3.3 20040125 (prerelease) (Debian)
Python 2.3.3 (#1, Feb 5 2004, 21:57:53)
[GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mx.DateTime
zsh: segmentation fault (core dumped) /charting/bin/python2.3
#0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
#1 0x402ee68a in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:3998
#2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b78c4, kw=0x1) at Objects/methodobject.c:108
#3 0x080aa664 in call_function (pp_stack=0xbfffcecc, oparg=1) at Python/ceval.c:3439
#4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
#5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b5760, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd8e0 "mx.DateTime.DateTime", co=0x402b5760, pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
#8 0x080cdb53 in load_source_module (name=0xbfffd8e0 "mx.DateTime.DateTime", pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
#9 0x080cb8be in load_module (name=0xbfffd8e0 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd450 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
#10 0x080cc7b8 in import_submodule (mod=0x4026138c, subname=0xbfffd8ec "DateTime", fullname=0xbfffd8e0 "mx.DateTime.DateTime") at Python/import.c:2290
#11 0x080cc2e3 in load_next (mod=0x4026138c, altmod=0x8116160, p_name=0xbfffd8ec, buf=0xbfffd8e0 "mx.DateTime.DateTime", p_buflen=0xbfffd8dc) at Python/import.c:2111
#12 0x080ce319 in import_module_ex (name=0x0, globals=0x1, locals=0x402a5dfc, fromlist=0x4028750c) at Python/import.c:1957
#13 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
#14 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
#15 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x402aeeb4, kw=0x1) at Objects/methodobject.c:108
#16 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
#17 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x402aeeb4, kw=0x40269bec) at Python/ceval.c:3346
#18 0x080a8794 in eval_frame (f=0x818b02c) at Python/ceval.c:1996
#19 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7b20, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#20 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#21 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffece0 "mx.DateTime", co=0x402a7b20, pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
#22 0x080cdb53 in load_source_module (name=0xbfffece0 "mx.DateTime", pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc", fp=0x81632a0) at Python/import.c:894
#23 0x080cb8be in load_module (name=0xbfffece0 "mx.DateTime", fp=0x81632a0, buf=0xbfffe3c0 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.py", type=1, loader=0x1) at Python/import.c:1699
#24 0x080ce051 in load_package (name=0xbfffece0 "mx.DateTime", pathname=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime") at Python/import.c:951
#25 0x080cb9ed in load_module (name=0xbfffece0 "mx.DateTime", fp=0xbfffe850, buf=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime", type=5, loader=0x1) at Python/import.c:1722
#26 0x080cc7b8 in import_submodule (mod=0x40261374, subname=0xbfffece3 "DateTime", fullname=0xbfffece0 "mx.DateTime") at Python/import.c:2290
#27 0x080cc2e3 in load_next (mod=0x40261374, altmod=0x40261374, p_name=0xbfffece3, buf=0xbfffece0 "mx.DateTime", p_buflen=0xbfffecdc) at Python/import.c:2111
#28 0x080ce40f in import_module_ex (name=0x0, globals=0x1, locals=0x4027879c, fromlist=0x8116160) at Python/import.c:1964
#29 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
#30 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
#31 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x4028075c, kw=0x1) at Objects/methodobject.c:108
#32 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
#33 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x4028075c, kw=0x40269bec) at Python/ceval.c:3346
#34 0x080a8794 in eval_frame (f=0x8183a54) at Python/ceval.c:1996
#35 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7320, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
#36 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
#37 0x080d7d1b in run_node (n=0x4027879c, filename=0x1 , globals=0x1, locals=0x1, flags=0x1) at Python/pythonrun.c:1265
#38 0x080d724e in PyRun_InteractiveOneFlags (fp=0x1, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:757
#39 0x080d7043 in PyRun_InteractiveLoopFlags (fp=0x40254e20, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:690
#40 0x080d8642 in PyRun_AnyFileExFlags (fp=0x40254e20, filename=0x80ff46a "", closeit=0, flags=0xbffff428) at Python/pythonrun.c:653
#41 0x08054e35 in Py_Main (argc=0, argv=0xbffff4d4) at Modules/main.c:415
#42 0x0805498b in main (argc=1, argv=0x1) at Modules/python.c:23
From mal at egenix.com Fri Feb 6 10:05:49 2004
From: mal at egenix.com (M.-A. Lemburg)
Date: Sun Jan 15 08:02:08 2006
Subject: [egenix-users] seg fault on import mx.DateTime Python2.3.3
egenix-base-2.0.5
In-Reply-To: <87fzdon33x.fsf@maas-neotek.comcast.net>
References: <87fzdon33x.fsf@maas-neotek.comcast.net>
Message-ID: <402358ED.2060401@egenix.com>
Ross Brattain wrote:
>
> My usual runtime environment is Python 2.2.3 and egenix-base-2.0.4.
> I'm update everything and was surprised with this seg fault.
Are you using a Python version that's compiled with debug
mode enabled (or have you used such a Python version to
compile mxDateTime) ?
> -Ross B.
>
>
> Debian unstable
>
> # gcc -v
> Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs
> Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
> Thread model: posix
> gcc version 3.3.3 20040125 (prerelease) (Debian)
>
>
> Python 2.3.3 (#1, Feb 5 2004, 21:57:53)
> [GCC 3.3.3 20040125 (prerelease) (Debian)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>
>>>>import mx.DateTime
>
> zsh: segmentation fault (core dumped) /charting/bin/python2.3
>
> #0 mxDateTime_FromDateAndTime (year=1, month=1, day=1, hour=1, minute=1, second=0) at mx/DateTime/mxDateTime/mxDateTime.c:333
> #1 0x402ee68a in mxDateTime_DateTime (self=0x0, args=0x1) at mx/DateTime/mxDateTime/mxDateTime.c:3998
> #2 0x080fc7aa in PyCFunction_Call (func=0x402b174c, arg=0x402b78c4, kw=0x1) at Objects/methodobject.c:108
> #3 0x080aa664 in call_function (pp_stack=0xbfffcecc, oparg=1) at Python/ceval.c:3439
> #4 0x080a8a1e in eval_frame (f=0x816e4fc) at Python/ceval.c:2116
> #5 0x080a95ac in PyEval_EvalCodeEx (co=0x402b5760, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #6 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #7 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffd8e0 "mx.DateTime.DateTime", co=0x402b5760, pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc") at Python/import.c:621
> #8 0x080cdb53 in load_source_module (name=0xbfffd8e0 "mx.DateTime.DateTime", pathname=0xbfffcfc0 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.pyc", fp=0x813b058) at Python/import.c:894
> #9 0x080cb8be in load_module (name=0xbfffd8e0 "mx.DateTime.DateTime", fp=0x813b058, buf=0xbfffd450 "/charting/lib/python2.3/site-packages/mx/DateTime/DateTime.py", type=1, loader=0x1) at Python/import.c:1699
> #10 0x080cc7b8 in import_submodule (mod=0x4026138c, subname=0xbfffd8ec "DateTime", fullname=0xbfffd8e0 "mx.DateTime.DateTime") at Python/import.c:2290
> #11 0x080cc2e3 in load_next (mod=0x4026138c, altmod=0x8116160, p_name=0xbfffd8ec, buf=0xbfffd8e0 "mx.DateTime.DateTime", p_buflen=0xbfffd8dc) at Python/import.c:2111
> #12 0x080ce319 in import_module_ex (name=0x0, globals=0x1, locals=0x402a5dfc, fromlist=0x4028750c) at Python/import.c:1957
> #13 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
> #14 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
> #15 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x402aeeb4, kw=0x1) at Objects/methodobject.c:108
> #16 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
> #17 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x402aeeb4, kw=0x40269bec) at Python/ceval.c:3346
> #18 0x080a8794 in eval_frame (f=0x818b02c) at Python/ceval.c:1996
> #19 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7b20, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #20 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #21 0x080cad76 in PyImport_ExecCodeModuleEx (name=0xbfffece0 "mx.DateTime", co=0x402a7b20, pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc") at Python/import.c:621
> #22 0x080cdb53 in load_source_module (name=0xbfffece0 "mx.DateTime", pathname=0xbfffdf30 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.pyc", fp=0x81632a0) at Python/import.c:894
> #23 0x080cb8be in load_module (name=0xbfffece0 "mx.DateTime", fp=0x81632a0, buf=0xbfffe3c0 "/charting/lib/python2.3/site-packages/mx/DateTime/__init__.py", type=1, loader=0x1) at Python/import.c:1699
> #24 0x080ce051 in load_package (name=0xbfffece0 "mx.DateTime", pathname=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime") at Python/import.c:951
> #25 0x080cb9ed in load_module (name=0xbfffece0 "mx.DateTime", fp=0xbfffe850, buf=0xbfffe850 "/charting/lib/python2.3/site-packages/mx/DateTime", type=5, loader=0x1) at Python/import.c:1722
> #26 0x080cc7b8 in import_submodule (mod=0x40261374, subname=0xbfffece3 "DateTime", fullname=0xbfffece0 "mx.DateTime") at Python/import.c:2290
> #27 0x080cc2e3 in load_next (mod=0x40261374, altmod=0x40261374, p_name=0xbfffece3, buf=0xbfffece0 "mx.DateTime", p_buflen=0xbfffecdc) at Python/import.c:2111
> #28 0x080ce40f in import_module_ex (name=0x0, globals=0x1, locals=0x4027879c, fromlist=0x8116160) at Python/import.c:1964
> #29 0x080cd38c in PyImport_ImportModuleEx (name=0x1 , globals=0x1, locals=0x1, fromlist=0x1) at Python/import.c:1998
> #30 0x0809fb21 in builtin___import__ (self=0x0, args=0x1) at Python/bltinmodule.c:45
> #31 0x080fc7aa in PyCFunction_Call (func=0x40269bec, arg=0x4028075c, kw=0x1) at Objects/methodobject.c:108
> #32 0x0805b8f9 in PyObject_Call (func=0xffa6b6c1, arg=0x1, kw=0x1) at Objects/abstract.c:1755
> #33 0x080aa3f7 in PyEval_CallObjectWithKeywords (func=0x1, arg=0x4028075c, kw=0x40269bec) at Python/ceval.c:3346
> #34 0x080a8794 in eval_frame (f=0x8183a54) at Python/ceval.c:1996
> #35 0x080a95ac in PyEval_EvalCodeEx (co=0x402a7320, globals=0x1, locals=0x1, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663
> #36 0x080abda9 in PyEval_EvalCode (co=0x1, globals=0x1, locals=0x1) at Python/ceval.c:537
> #37 0x080d7d1b in run_node (n=0x4027879c, filename=0x1 , globals=0x1, locals=0x1, flags=0x1) at Python/pythonrun.c:1265
> #38 0x080d724e in PyRun_InteractiveOneFlags (fp=0x1, filename=0x80ff46a "", flags=0xbffff428) at Python/pythonrun.c:757
> #39 0x080d7043 in PyRun_InteractiveLoopFlags (fp=0x40254e20, filename=0x80ff46a "