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 "", 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: 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: <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: 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: <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: 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: <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: 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: <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: 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: <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: 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: <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: 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: <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: Sun Jan 15 08:02:08 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: Sun Jan 15 08:02:08 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: Sun Jan 15 08:02:08 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: Sun Jan 15 08:02:08 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-0009.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 08:02:08 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 12:00: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: Sun Jan 15 12:00: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: Sun Jan 15 12:00:53 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: Sun Jan 15 12:00:53 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: Sun Jan 15 12:00:53 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: Sun Jan 15 12:00:53 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: Sun Jan 15 12:00:53 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: Sun Jan 15 12:00:53 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: Sun Jan 15 12:00:53 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: Sun Jan 15 12:00:53 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: Sun Jan 15 12:00:53 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: Sun Jan 15 12:00:53 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: Sun Jan 15 12:00:53 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-0010.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:53 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 16:00:44 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 16:00:44 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: Sun Jan 15 16:00:44 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: Sun Jan 15 16:00:44 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: Sun Jan 15 16:00:44 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: Sun Jan 15 16:00:44 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: Sun Jan 15 16:00:44 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: Sun Jan 15 16:00:44 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: Sun Jan 15 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: Sun Jan 15 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: Sun Jan 15 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: Sun Jan 15 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: Sun Jan 15 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-0011.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 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: Sun Jan 15 20:00:44 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 20:00:44 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: Sun Jan 15 20:00:44 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: Sun Jan 15 20:00:44 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: Sun Jan 15 20:00:44 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: Sun Jan 15 20:00:44 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: Sun Jan 15 20:00:44 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: Sun Jan 15 20: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: Sun Jan 15 20: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: Sun Jan 15 20: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: Sun Jan 15 20: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: Sun Jan 15 20: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: Sun Jan 15 20: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-0012.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 20: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: Mon Jan 16 08:02:32 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: Mon Jan 16 08:02:32 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: Mon Jan 16 08:02:32 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: Mon Jan 16 08:02:32 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: Mon Jan 16 08:02:32 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: Mon Jan 16 08:02:32 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: Mon Jan 16 08:02:32 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: Mon Jan 16 08:02:32 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: Mon Jan 16 08:02:32 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: Mon Jan 16 08:02:32 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: Mon Jan 16 08:02:32 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: Mon Jan 16 08:02:32 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: Mon Jan 16 08:02:32 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-0013.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:32 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: Mon Jan 16 12: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: Mon Jan 16 12: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: Mon Jan 16 12: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: Mon Jan 16 12: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: Mon Jan 16 12: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: Mon Jan 16 12: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: Mon Jan 16 12: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: Mon Jan 16 12: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: Mon Jan 16 12: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: Mon Jan 16 12: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: Mon Jan 16 12: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: Mon Jan 16 12: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: Mon Jan 16 12: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-0014.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 12: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: Mon Jan 16 16:00:48 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: Mon Jan 16 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: Mon Jan 16 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: Mon Jan 16 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: Mon Jan 16 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: Mon Jan 16 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: Mon Jan 16 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: Mon Jan 16 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: Mon Jan 16 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: Mon Jan 16 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: Mon Jan 16 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: Mon Jan 16 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: Mon Jan 16 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-0015.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 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: Mon Jan 16 20: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: Mon Jan 16 20: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: Mon Jan 16 20: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: Mon Jan 16 20: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: Mon Jan 16 20: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: Mon Jan 16 20: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: Mon Jan 16 20: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: Mon Jan 16 20: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: Mon Jan 16 20: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: Mon Jan 16 20: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: Mon Jan 16 20: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: Mon Jan 16 20: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: Mon Jan 16 20: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-0016.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 20: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: Tue Jan 17 08:02:34 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: Tue Jan 17 08:02:34 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: Tue Jan 17 08:02:34 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: Tue Jan 17 08:02:34 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: Tue Jan 17 08:02:34 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: Tue Jan 17 08:02:34 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: Tue Jan 17 08:02:34 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: Tue Jan 17 08:02:34 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: Tue Jan 17 08:02:34 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: Tue Jan 17 08:02:34 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: Tue Jan 17 08:02:34 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: Tue Jan 17 08:02:34 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: Tue Jan 17 08:02:35 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-0017.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:35 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: Tue Jan 17 12:01:02 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: Tue Jan 17 12:01:02 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: Tue Jan 17 12:01:02 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: Tue Jan 17 12:01:02 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: Tue Jan 17 12:01:02 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: Tue Jan 17 12:01:02 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: Tue Jan 17 12:01:02 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: Tue Jan 17 12:01:02 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: Tue Jan 17 12:01:02 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: Tue Jan 17 12:01:02 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: Tue Jan 17 12:01:02 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: Tue Jan 17 12:01:02 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: Tue Jan 17 12:01:02 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-0018.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 12:01:02 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: Tue Jan 17 16:00:51 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: Tue Jan 17 16:00:51 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: Tue Jan 17 16:00:51 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: Tue Jan 17 16:00:51 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: Tue Jan 17 16:00:51 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: Tue Jan 17 16:00:51 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: Tue Jan 17 16:00:51 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: Tue Jan 17 16:00:51 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: Tue Jan 17 16:00:51 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: Tue Jan 17 16:00:51 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: Tue Jan 17 16:00:51 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: Tue Jan 17 16:00:51 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: Tue Jan 17 16:00:51 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-0019.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:51 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: Tue Jan 17 20:00:52 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: Tue Jan 17 20:00:52 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: Tue Jan 17 20:00:52 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: Tue Jan 17 20:00:52 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: Tue Jan 17 20:00:52 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: Tue Jan 17 20:00:52 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: Tue Jan 17 20:00:52 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: Tue Jan 17 20:00:52 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: Tue Jan 17 20:00:52 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: Tue Jan 17 20:00:52 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: Tue Jan 17 20:00:52 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: Tue Jan 17 20:00:52 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: Tue Jan 17 20:00:52 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-0020.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:52 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: Wed Jan 18 08:04:17 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: Wed Jan 18 08:04:17 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: Wed Jan 18 08:04:17 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: Wed Jan 18 08:04:17 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: Wed Jan 18 08:04:17 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: Wed Jan 18 08:04:17 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: Wed Jan 18 08:04:17 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: Wed Jan 18 08:04:17 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: Wed Jan 18 08:04:17 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: Wed Jan 18 08:04:17 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: Wed Jan 18 08:04:18 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: Wed Jan 18 08:04:18 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: Wed Jan 18 08:04:18 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-0021.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:18 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: Wed Jan 18 12:01:05 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: Wed Jan 18 12:01:05 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: Wed Jan 18 12:01:05 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: Wed Jan 18 12:01:05 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: Wed Jan 18 12:01:05 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: Wed Jan 18 12:01:05 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: Wed Jan 18 12:01:05 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: Wed Jan 18 12:01:05 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: Wed Jan 18 12:01:05 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: Wed Jan 18 12:01:05 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: Wed Jan 18 12:01:05 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: Wed Jan 18 12:01:05 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: Wed Jan 18 12:01:05 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-0022.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 12:01:05 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: Wed Jan 18 16:01:30 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: Wed Jan 18 16:01:30 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: Wed Jan 18 16:01:30 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: Wed Jan 18 16:01:30 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: Wed Jan 18 16:01:30 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: Wed Jan 18 16:01:30 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: Wed Jan 18 16:01:30 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: Wed Jan 18 16:01:30 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: Wed Jan 18 16:01:30 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: Wed Jan 18 16:01:30 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: Wed Jan 18 16:01:30 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: Wed Jan 18 16:01:30 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: Wed Jan 18 16:01:30 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-0023.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:30 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: Wed Jan 18 20:00:56 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: Wed Jan 18 20:00:56 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: Wed Jan 18 20:00:56 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: Wed Jan 18 20:00:56 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: Wed Jan 18 20:00:56 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: Wed Jan 18 20:00:56 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: Wed Jan 18 20:00:56 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: Wed Jan 18 20:00:56 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: Wed Jan 18 20:00:56 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: Wed Jan 18 20:00:56 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: Wed Jan 18 20:00:56 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: Wed Jan 18 20:00:56 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: Wed Jan 18 20:00:56 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-0024.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:56 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: Thu Jan 19 08:04:39 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: Thu Jan 19 08:04:39 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: Thu Jan 19 08:04:39 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: Thu Jan 19 08:04:39 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: Thu Jan 19 08:04:39 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: Thu Jan 19 08:04: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: Thu Jan 19 08:04: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: Thu Jan 19 08:04: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: Thu Jan 19 08:04: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: Thu Jan 19 08:04: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: Thu Jan 19 08:04: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: Thu Jan 19 08:04: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: Thu Jan 19 08:04:40 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-0025.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:40 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: Thu Jan 19 12:01:01 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: Thu Jan 19 12:01:01 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: Thu Jan 19 12:01:01 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: Thu Jan 19 12:01:01 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: Thu Jan 19 12:01:01 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: Thu Jan 19 12:01:01 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: Thu Jan 19 12:01:01 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: Thu Jan 19 12:01:01 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: Thu Jan 19 12:01:01 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: Thu Jan 19 12:01:01 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: Thu Jan 19 12:01:01 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: Thu Jan 19 12:01:01 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: Thu Jan 19 12:01:01 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-0026.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 12:01:01 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: Thu Jan 19 16:02:58 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: Thu Jan 19 16:02:59 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: Thu Jan 19 16:02:59 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: Thu Jan 19 16:02:59 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: Thu Jan 19 16:02:59 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: Thu Jan 19 16:02:59 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: Thu Jan 19 16:02:59 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: Thu Jan 19 16:02:59 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: Thu Jan 19 16:03:00 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: Thu Jan 19 16:03:00 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: Thu Jan 19 16:03:00 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: Thu Jan 19 16:03:00 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: Thu Jan 19 16:03:00 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-0027.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 16:03:00 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: Thu Jan 19 20: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: Thu Jan 19 20: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: Thu Jan 19 20:00:50 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: Thu Jan 19 20:00:50 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: Thu Jan 19 20:00:50 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: Thu Jan 19 20:00:50 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: Thu Jan 19 20:00:50 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: Thu Jan 19 20:00:50 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: Thu Jan 19 20:00:50 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: Thu Jan 19 20:00:50 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: Thu Jan 19 20:00:50 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: Thu Jan 19 20:00:50 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: Thu Jan 19 20:00:50 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-0028.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:50 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 20 08:06:58 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 20 08:07:01 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 20 08:07:01 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 20 08:07:01 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 20 08:07:01 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 20 08:07:01 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 20 08:07:01 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 20 08:07:01 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 20 08:07:01 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 20 08:07:02 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 20 08:07:02 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 20 08:07:02 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 20 08:07:02 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-0029.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 08:07:02 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 20 12:02:04 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 20 12:02:04 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 20 12:02:04 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 20 12:02:04 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 20 12:02:04 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 20 12:02:05 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 20 12:02:05 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 20 12:02:05 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 20 12:02:05 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 20 12:02:05 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 20 12:02:05 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 20 12:02:05 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 20 12:02:05 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-0030.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 12:02:05 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 20 16:00:54 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 20 16:00:54 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 20 16:00: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 20 16:00: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 20 16:00: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 20 16:00: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 20 16:00: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 20 16:00: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 20 16:00: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 20 16:00: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 20 16:00: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 20 16:00: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 20 16:00: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-0031.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 16:00: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 20 20:00:48 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 20 20:00:48 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 20 20:00:48 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 20 20:00:48 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 20 20:00:48 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 20 20:00:48 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 20 20:00:48 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 20 20:00:48 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 20 20:00:48 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 20 20:00:48 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 20 20:00:48 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 20 20:00:48 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 20 20:00:48 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-0032.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:48 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 21 08:03:54 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 21 08:03:54 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 21 08:03: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: Sat Jan 21 08:03: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: Sat Jan 21 08:03: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: Sat Jan 21 08:03: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: Sat Jan 21 08:03: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: Sat Jan 21 08:03: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: Sat Jan 21 08:03: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: Sat Jan 21 08:03: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: Sat Jan 21 08:03: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: Sat Jan 21 08:03: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: Sat Jan 21 08:03: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-0033.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 08:03: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: Sat Jan 21 12:01:03 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 21 12:01:03 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 21 12:01:03 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 21 12:01:03 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 21 12:01:03 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 21 12:01:03 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 21 12:01:03 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 21 12:01:03 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 21 12:01:03 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 21 12:01:03 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 21 12:01:03 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 21 12:01:03 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 21 12:01:03 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-0034.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 12:01:03 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 21 16:00:52 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 21 16:00:52 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 21 16:00:52 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 21 16:00:52 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 21 16:00:52 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 21 16:00:52 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 21 16:00:52 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 21 16:00:52 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 21 16:00:52 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 21 16:00:52 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 21 16:00:52 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 21 16:00:52 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 21 16:00:52 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-0035.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:52 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 21 20:00:51 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 21 20:00:51 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 21 20:00:51 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 21 20:00:51 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 21 20:00:51 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 21 20:00:51 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 21 20:00:51 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 21 20:00:51 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 21 20:00:51 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 21 20:00:51 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 21 20:00:51 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 21 20:00:51 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 21 20:00:51 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-0036.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:51 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 22 08:02: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: Sun Jan 22 08:02: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: Sun Jan 22 08:02: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: Sun Jan 22 08:02: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: Sun Jan 22 08:02: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: Sun Jan 22 08:02: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: Sun Jan 22 08:02: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: Sun Jan 22 08:02: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: Sun Jan 22 08:02: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: Sun Jan 22 08:02: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: Sun Jan 22 08:02: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: Sun Jan 22 08:02: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: Sun Jan 22 08:02: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-0037.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 08:02: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: Sun Jan 22 12:00:52 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 22 12:00:52 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: Sun Jan 22 12:00:52 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: Sun Jan 22 12:00:52 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: Sun Jan 22 12:00:52 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: Sun Jan 22 12:00:52 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: Sun Jan 22 12:00:52 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: Sun Jan 22 12:00:52 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: Sun Jan 22 12:00:52 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: Sun Jan 22 12:00:52 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: Sun Jan 22 12:00:52 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: Sun Jan 22 12:00:52 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: Sun Jan 22 12:00:52 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-0038.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:52 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 22 16:01: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: Sun Jan 22 16:01:22 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: Sun Jan 22 16:01:22 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: Sun Jan 22 16:01:22 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: Sun Jan 22 16:01:22 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: Sun Jan 22 16:01:22 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: Sun Jan 22 16:01:22 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: Sun Jan 22 16:01:22 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: Sun Jan 22 16:01:22 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: Sun Jan 22 16:01:22 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: Sun Jan 22 16:01:22 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: Sun Jan 22 16:01:22 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: Sun Jan 22 16:01:22 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-0039.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:22 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 22 20:01: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: Sun Jan 22 20:01: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: Sun Jan 22 20:01: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: Sun Jan 22 20:01: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: Sun Jan 22 20:01: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: Sun Jan 22 20:01: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: Sun Jan 22 20:01: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: Sun Jan 22 20:01: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: Sun Jan 22 20:01:17 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: Sun Jan 22 20:01:17 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: Sun Jan 22 20:01:17 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: Sun Jan 22 20:01:17 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: Sun Jan 22 20:01:17 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-0040.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:17 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: Mon Jan 23 08:02:42 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: Mon Jan 23 08:02:42 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: Mon Jan 23 08:02:42 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: Mon Jan 23 08:02:42 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: Mon Jan 23 08:02:42 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: Mon Jan 23 08:02:42 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: Mon Jan 23 08:02:42 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: Mon Jan 23 08:02:42 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: Mon Jan 23 08:02:42 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: Mon Jan 23 08:02:42 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: Mon Jan 23 08:02:42 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: Mon Jan 23 08:02:42 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: Mon Jan 23 08:02:42 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-0041.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:42 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: Mon Jan 23 12:00:57 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: Mon Jan 23 12:00:57 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: Mon Jan 23 12:00:57 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: Mon Jan 23 12:00:57 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: Mon Jan 23 12:00:57 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: Mon Jan 23 12:00:57 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: Mon Jan 23 12:00:57 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: Mon Jan 23 12:00:57 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: Mon Jan 23 12:00:57 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: Mon Jan 23 12:00:57 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: Mon Jan 23 12:00:57 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: Mon Jan 23 12:00:57 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: Mon Jan 23 12:00:57 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-0042.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:57 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: Mon Jan 23 16:01:48 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: Mon Jan 23 16:01:48 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: Mon Jan 23 16:01:48 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: Mon Jan 23 16:01:48 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: Mon Jan 23 16:01:48 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: Mon Jan 23 16:01:48 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: Mon Jan 23 16:01:48 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: Mon Jan 23 16:01:48 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: Mon Jan 23 16:01:48 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: Mon Jan 23 16:01:48 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: Mon Jan 23 16:01:48 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: Mon Jan 23 16:01:48 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: Mon Jan 23 16:01:48 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-0043.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 16:01: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: Mon Jan 23 20:00:52 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: Mon Jan 23 20:00:52 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: Mon Jan 23 20:00:52 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: Mon Jan 23 20:00:52 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: Mon Jan 23 20:00:52 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: Mon Jan 23 20:00:53 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: Mon Jan 23 20:00:53 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: Mon Jan 23 20:00:53 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: Mon Jan 23 20:00:53 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: Mon Jan 23 20:00:53 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: Mon Jan 23 20:00:53 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: Mon Jan 23 20:00:53 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: Mon Jan 23 20:00:53 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-0044.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:53 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: Tue Jan 24 08:03:14 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: Tue Jan 24 08:03:15 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: Tue Jan 24 08:03:15 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: Tue Jan 24 08:03:15 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: Tue Jan 24 08:03:15 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: Tue Jan 24 08:03:15 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: Tue Jan 24 08:03:15 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: Tue Jan 24 08:03:15 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: Tue Jan 24 08:03:15 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: Tue Jan 24 08:03:15 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: Tue Jan 24 08:03:15 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: Tue Jan 24 08:03:15 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: Tue Jan 24 08:03:15 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-0045.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 08:03:15 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: Tue Jan 24 12:02:58 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: Tue Jan 24 12:02:58 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: Tue Jan 24 12:02:58 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: Tue Jan 24 12:02:58 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: Tue Jan 24 12:02:59 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: Tue Jan 24 12:02:59 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: Tue Jan 24 12:02:59 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: Tue Jan 24 12:02:59 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: Tue Jan 24 12:02:59 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: Tue Jan 24 12:02:59 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: Tue Jan 24 12:02:59 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: Tue Jan 24 12:02:59 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: Tue Jan 24 12:02:59 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-0046.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 12:03:00 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: Tue Jan 24 16:01:23 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: Tue Jan 24 16:01:23 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: Tue Jan 24 16:01:23 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: Tue Jan 24 16:01:23 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: Tue Jan 24 16:01:23 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: Tue Jan 24 16:01:23 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: Tue Jan 24 16:01:24 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: Tue Jan 24 16:01:24 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: Tue Jan 24 16:01:24 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: Tue Jan 24 16:01:24 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: Tue Jan 24 16:01:24 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: Tue Jan 24 16:01:24 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: Tue Jan 24 16:01:24 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-0047.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:24 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: Tue Jan 24 20:01:56 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: Tue Jan 24 20:01:56 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: Tue Jan 24 20:01:56 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: Tue Jan 24 20:01:56 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: Tue Jan 24 20:01:56 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: Tue Jan 24 20:01:56 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: Tue Jan 24 20:01:56 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: Tue Jan 24 20:01:56 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: Tue Jan 24 20:01:56 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: Tue Jan 24 20:01:56 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: Tue Jan 24 20:01:56 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: Tue Jan 24 20:01:56 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: Tue Jan 24 20:01:56 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-0048.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:56 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: Wed Jan 25 08:02:04 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: Wed Jan 25 08:02:04 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: Wed Jan 25 08:02:04 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: Wed Jan 25 08:02:04 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: Wed Jan 25 08:02:04 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: Wed Jan 25 08:02:04 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: Wed Jan 25 08:02:04 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: Wed Jan 25 08:02:04 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: Wed Jan 25 08:02:04 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: Wed Jan 25 08:02:05 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: Wed Jan 25 08:02:05 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: Wed Jan 25 08:02:05 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: Wed Jan 25 08:02:05 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-0049.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 08:02:05 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: Wed Jan 25 12:01:02 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: Wed Jan 25 12:01:02 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: Wed Jan 25 12:01:02 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: Wed Jan 25 12:01:02 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: Wed Jan 25 12:01:02 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: Wed Jan 25 12:01:02 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: Wed Jan 25 12:01:02 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: Wed Jan 25 12:01:03 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: Wed Jan 25 12:01:03 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: Wed Jan 25 12:01:03 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: Wed Jan 25 12:01:03 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: Wed Jan 25 12:01:03 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: Wed Jan 25 12:01:03 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-0050.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 12:01:03 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: Wed Jan 25 16:01:01 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: Wed Jan 25 16:01:01 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: Wed Jan 25 16:01:01 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: Wed Jan 25 16:01:01 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: Wed Jan 25 16:01:01 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: Wed Jan 25 16:01:01 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: Wed Jan 25 16:01:01 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: Wed Jan 25 16:01:01 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: Wed Jan 25 16:01:01 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: Wed Jan 25 16:01:01 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: Wed Jan 25 16:01:01 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: Wed Jan 25 16:01:01 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: Wed Jan 25 16:01:01 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-0051.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 16:01:01 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: Wed Jan 25 20:00:54 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: Wed Jan 25 20:00:54 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: Wed Jan 25 20:00: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: Wed Jan 25 20:00: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: Wed Jan 25 20:00: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: Wed Jan 25 20:00: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: Wed Jan 25 20:00: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: Wed Jan 25 20:00: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: Wed Jan 25 20:00: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: Wed Jan 25 20:00: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: Wed Jan 25 20:00: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: Wed Jan 25 20:00: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: Wed Jan 25 20:00: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-0052.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 20:00: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: Thu Jan 26 08:05: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: Thu Jan 26 08:05: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: Thu Jan 26 08:05: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: Thu Jan 26 08:05: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: Thu Jan 26 08:05: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: Thu Jan 26 08:05: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: Thu Jan 26 08:05: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: Thu Jan 26 08:05: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: Thu Jan 26 08:05: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: Thu Jan 26 08:05: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: Thu Jan 26 08:05: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: Thu Jan 26 08:05: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: Thu Jan 26 08:05: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-0053.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 08:05: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: Thu Jan 26 12:01:06 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: Thu Jan 26 12:01:06 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: Thu Jan 26 12:01:06 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: Thu Jan 26 12:01:06 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: Thu Jan 26 12:01:06 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: Thu Jan 26 12:01:06 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: Thu Jan 26 12:01:06 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: Thu Jan 26 12:01:06 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: Thu Jan 26 12:01:06 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: Thu Jan 26 12:01:06 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: Thu Jan 26 12:01:06 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: Thu Jan 26 12:01:06 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: Thu Jan 26 12:01:07 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-0054.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 12:01:07 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: Thu Jan 26 16:00:54 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: Thu Jan 26 16:00:54 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: Thu Jan 26 16:00: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: Thu Jan 26 16:00: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: Thu Jan 26 16:00: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: Thu Jan 26 16:00: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: Thu Jan 26 16:00: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: Thu Jan 26 16:00: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: Thu Jan 26 16:00: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: Thu Jan 26 16:00: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: Thu Jan 26 16:00: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: Thu Jan 26 16:00: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: Thu Jan 26 16:00: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-0055.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 16:00: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: Thu Jan 26 20:00:47 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: Thu Jan 26 20:00:47 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: Thu Jan 26 20:00:48 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: Thu Jan 26 20:00:48 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: Thu Jan 26 20:00:48 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: Thu Jan 26 20:00:48 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: Thu Jan 26 20:00:48 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: Thu Jan 26 20:00:48 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: Thu Jan 26 20:00:48 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: Thu Jan 26 20:00:48 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: Thu Jan 26 20:00:48 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: Thu Jan 26 20:00:48 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: Thu Jan 26 20:00:48 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-0056.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:48 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 27 08:06: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: Fri Jan 27 08:06:44 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 27 08:06:44 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 27 08:06:44 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 27 08:06:44 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 27 08:06:44 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 27 08:06:44 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 27 08:06:44 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 27 08:06:44 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 27 08:06: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: Fri Jan 27 08:06: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: Fri Jan 27 08:06: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: Fri Jan 27 08:06: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-0057.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 08:06: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: Fri Jan 27 12:02:11 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 27 12:02:11 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 27 12:02:11 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 27 12:02:11 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 27 12:02:11 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 27 12:02:11 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 27 12:02:11 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 27 12:02:11 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 27 12:02:11 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 27 12:02:11 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 27 12:02:11 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 27 12:02:11 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 27 12:02:11 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-0058.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 12:02:11 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 27 16:01:07 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 27 16:01: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 "", 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 27 16:01:08 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 27 16:01:08 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 27 16:01:08 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 27 16:01:08 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 27 16:01:08 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 27 16:01:08 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 27 16:01:08 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 27 16:01:08 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 27 16:01:08 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 27 16:01:08 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 27 16:01:08 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-0059.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 16:01:08 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 27 20:00:56 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 27 20:00:56 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 27 20:00:56 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 27 20:00:56 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 27 20:00:56 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 27 20:00:56 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 27 20:00:56 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 27 20:00:56 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 27 20:00:56 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 27 20:00:56 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 27 20:00:56 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 27 20:00:56 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 27 20:00:56 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-0060.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:56 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 28 08:05:41 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 28 08:05:42 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 28 08:05:42 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 28 08:05:42 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 28 08:05:42 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 28 08:05:42 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 28 08:05:42 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 28 08:05:42 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 28 08:05:42 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 28 08:05:42 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 28 08:05:42 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 28 08:05:42 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 28 08:05:42 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-0061.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:42 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 28 12:01:55 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 28 12:01:55 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 28 12:01:55 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 28 12:01:55 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 28 12:01:55 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 28 12:01:55 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 28 12:01:55 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 28 12:01:55 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 28 12:01:55 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 28 12:01:55 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 28 12:01:55 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 28 12:01:55 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 28 12:01:55 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-0062.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:55 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 28 16:00:57 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 28 16:00:57 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 28 16:00:57 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 28 16:00:57 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 28 16:00:57 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 28 16:00:57 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 28 16:00:57 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 28 16:00:57 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 28 16:00:57 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 28 16:00:57 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 28 16:00:57 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 28 16:00:57 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 28 16:00:57 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-0063.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:57 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 28 20:00:57 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 28 20:00:57 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 28 20:00:57 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 28 20:00:57 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 28 20:00:57 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 28 20:00:57 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 28 20:00:57 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 28 20:00:57 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 28 20:00:57 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 28 20:00:57 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 28 20:00:57 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 28 20:00:57 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 28 20:00:57 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-0064.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:57 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 29 08:07:34 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 29 08:07:34 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: Sun Jan 29 08:07:34 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: Sun Jan 29 08:07:34 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: Sun Jan 29 08:07:34 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: Sun Jan 29 08:07:34 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: Sun Jan 29 08:07:34 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: Sun Jan 29 08:07:34 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: Sun Jan 29 08:07:34 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: Sun Jan 29 08:07:34 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: Sun Jan 29 08:07:34 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: Sun Jan 29 08:07:34 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: Sun Jan 29 08:07:34 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-0065.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 08:07:34 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 29 12:01:01 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 29 12:01:01 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: Sun Jan 29 12:01:01 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: Sun Jan 29 12:01:01 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: Sun Jan 29 12:01:01 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: Sun Jan 29 12:01:01 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: Sun Jan 29 12:01:01 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: Sun Jan 29 12:01:01 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: Sun Jan 29 12:01:01 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: Sun Jan 29 12:01:01 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: Sun Jan 29 12:01:01 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: Sun Jan 29 12:01:01 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: Sun Jan 29 12:01:01 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-0066.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 12:01:01 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 29 16:00:54 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 29 16:00:54 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: Sun Jan 29 16:00: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: Sun Jan 29 16:00: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: Sun Jan 29 16:00: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: Sun Jan 29 16:00: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: Sun Jan 29 16:00: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: Sun Jan 29 16:00:55 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: Sun Jan 29 16:00:55 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: Sun Jan 29 16:00:55 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: Sun Jan 29 16:00:55 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: Sun Jan 29 16:00:55 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: Sun Jan 29 16:00:55 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-0067.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:55 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 29 20:00:56 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 29 20:00:56 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: Sun Jan 29 20:00:56 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: Sun Jan 29 20:00:56 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: Sun Jan 29 20:00:56 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: Sun Jan 29 20:00:56 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: Sun Jan 29 20:00:56 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: Sun Jan 29 20:00:56 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: Sun Jan 29 20:00:56 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: Sun Jan 29 20:00:56 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: Sun Jan 29 20:00:56 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: Sun Jan 29 20:00:56 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: Sun Jan 29 20:00:56 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-0068.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:56 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: Mon Jan 30 08:08:50 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: Mon Jan 30 08:08:51 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: Mon Jan 30 08:08:51 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: Mon Jan 30 08:08:51 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: Mon Jan 30 08:08:51 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: Mon Jan 30 08:08:51 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: Mon Jan 30 08:08:51 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: Mon Jan 30 08:08:51 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: Mon Jan 30 08:08:52 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: Mon Jan 30 08:08:52 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: Mon Jan 30 08:08:52 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: Mon Jan 30 08:08:52 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: Mon Jan 30 08:08:53 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-0069.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 08:08:53 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: Mon Jan 30 12:03:56 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: Mon Jan 30 12:03:56 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: Mon Jan 30 12:03:56 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: Mon Jan 30 12:03:56 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: Mon Jan 30 12:03:56 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: Mon Jan 30 12:03:56 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: Mon Jan 30 12:03:56 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: Mon Jan 30 12:03:56 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: Mon Jan 30 12:03:56 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: Mon Jan 30 12:03:56 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: Mon Jan 30 12:03:57 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: Mon Jan 30 12:03:57 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: Mon Jan 30 12:03:57 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-0070.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:57 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: Mon Jan 30 16:04:13 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: Mon Jan 30 16:04:14 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: Mon Jan 30 16:04:14 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: Mon Jan 30 16:04:14 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: Mon Jan 30 16:04:14 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: Mon Jan 30 16:04:14 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: Mon Jan 30 16:04:14 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: Mon Jan 30 16:04:14 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: Mon Jan 30 16:04:14 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: Mon Jan 30 16:04:14 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: Mon Jan 30 16:04:14 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: Mon Jan 30 16:04:14 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: Mon Jan 30 16:04:14 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-0071.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 16:04:14 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: Mon Jan 30 20:02:15 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: Mon Jan 30 20:02:15 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: Mon Jan 30 20:02:15 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: Mon Jan 30 20:02:15 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: Mon Jan 30 20:02:15 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: Mon Jan 30 20:02:15 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: Mon Jan 30 20:02:15 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: Mon Jan 30 20:02:15 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: Mon Jan 30 20:02:15 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: Mon Jan 30 20:02:15 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: Mon Jan 30 20:02:15 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: Mon Jan 30 20:02:15 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: Mon Jan 30 20:02:15 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-0072.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 20:02:15 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: Tue Jan 31 08:07:52 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: Tue Jan 31 08:07:52 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: Tue Jan 31 08:07:52 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: Tue Jan 31 08:07:53 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: Tue Jan 31 08:07:53 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: Tue Jan 31 08:07:53 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: Tue Jan 31 08:07:53 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: Tue Jan 31 08:07:53 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: Tue Jan 31 08:07:53 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: Tue Jan 31 08:07:53 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: Tue Jan 31 08:07:53 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: Tue Jan 31 08:07:53 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: Tue Jan 31 08:07:53 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-0073.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:53 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: Tue Jan 31 12:04:18 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: Tue Jan 31 12:04:18 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: Tue Jan 31 12:04:18 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: Tue Jan 31 12:04:18 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: Tue Jan 31 12:04:18 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: Tue Jan 31 12:04:18 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: Tue Jan 31 12:04:18 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: Tue Jan 31 12:04:18 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: Tue Jan 31 12:04:18 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: Tue Jan 31 12:04:18 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: Tue Jan 31 12:04:18 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: Tue Jan 31 12:04:18 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: Tue Jan 31 12:04:18 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-0074.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 12:04:18 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: Tue Jan 31 16: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: Tue Jan 31 16:02:20 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: Tue Jan 31 16:02:20 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: Tue Jan 31 16:02:20 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: Tue Jan 31 16:02:20 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: Tue Jan 31 16:02:20 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: Tue Jan 31 16:02:20 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: Tue Jan 31 16:02:20 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: Tue Jan 31 16:02:20 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: Tue Jan 31 16:02:20 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: Tue Jan 31 16:02:20 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: Tue Jan 31 16:02:20 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: Tue Jan 31 16:02:20 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-0075.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:20 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: Tue Jan 31 20:01:09 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: Tue Jan 31 20:01:09 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: Tue Jan 31 20:01:09 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: Tue Jan 31 20:01:09 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: Tue Jan 31 20:01:09 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: Tue Jan 31 20:01:09 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: Tue Jan 31 20:01:09 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: Tue Jan 31 20:01:09 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: Tue Jan 31 20:01:09 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: Tue Jan 31 20:01:09 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: Tue Jan 31 20:01:09 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: Tue Jan 31 20:01:09 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: Tue Jan 31 20:01:09 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-0076.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 20:01:09 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: Wed Feb 1 08:09:42 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: Wed Feb 1 08:09: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: Wed Feb 1 08:09: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: Wed Feb 1 08:09: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: Wed Feb 1 08:09: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: Wed Feb 1 08:09: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: Wed Feb 1 08:09: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: Wed Feb 1 08:09:44 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: Wed Feb 1 08:09: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: Wed Feb 1 08:09: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: Wed Feb 1 08:09: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: Wed Feb 1 08:09: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: Wed Feb 1 08:09: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-0077.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 08:09: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: Wed Feb 1 12:02:44 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: Wed Feb 1 12:02:44 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: Wed Feb 1 12:02:44 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: Wed Feb 1 12:02:44 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: Wed Feb 1 12:02: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: Wed Feb 1 12:02: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: Wed Feb 1 12:02: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: Wed Feb 1 12:02: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: Wed Feb 1 12:02: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: Wed Feb 1 12:02: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: Wed Feb 1 12:02: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: Wed Feb 1 12:02: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: Wed Feb 1 12:02: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-0078.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 12:02: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: Wed Feb 1 16:01: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: Wed Feb 1 16:01: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 "", 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: Wed Feb 1 16:01:08 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: Wed Feb 1 16:01:08 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: Wed Feb 1 16:01:08 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: Wed Feb 1 16:01:08 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: Wed Feb 1 16:01:09 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: Wed Feb 1 16:01:09 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: Wed Feb 1 16:01:09 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: Wed Feb 1 16:01:09 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: Wed Feb 1 16:01:09 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: Wed Feb 1 16:01:09 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: Wed Feb 1 16:01:09 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-0079.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 16:01:09 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: Wed Feb 1 20:01:01 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: Wed Feb 1 20:01:01 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: Wed Feb 1 20:01:01 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: Wed Feb 1 20:01:01 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: Wed Feb 1 20:01:01 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: Wed Feb 1 20:01:01 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: Wed Feb 1 20:01:01 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: Wed Feb 1 20:01:01 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: Wed Feb 1 20:01:01 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: Wed Feb 1 20:01:01 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: Wed Feb 1 20:01:01 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: Wed Feb 1 20:01:01 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: Wed Feb 1 20:01:01 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-0080.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 20:01:01 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: Thu Feb 2 08:12:36 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: Thu Feb 2 08:12: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: Thu Feb 2 08:12: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: Thu Feb 2 08:12:41 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: Thu Feb 2 08:12:41 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: Thu Feb 2 08:12:41 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: Thu Feb 2 08:12:41 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: Thu Feb 2 08:12:41 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: Thu Feb 2 08:12:41 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: Thu Feb 2 08:12:42 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: Thu Feb 2 08:12:42 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: Thu Feb 2 08:12:42 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: Thu Feb 2 08:12:42 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-0081.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 08:12:42 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: Thu Feb 2 12:02:51 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: Thu Feb 2 12:02:51 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: Thu Feb 2 12:02:51 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: Thu Feb 2 12:02:51 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: Thu Feb 2 12:02:51 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: Thu Feb 2 12:02:51 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: Thu Feb 2 12:02:51 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: Thu Feb 2 12:02:51 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: Thu Feb 2 12:02:51 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: Thu Feb 2 12:02:51 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: Thu Feb 2 12:02:51 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: Thu Feb 2 12:02:51 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: Thu Feb 2 12:02:51 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-0082.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:51 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: Thu Feb 2 16:01:13 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: Thu Feb 2 16:01:13 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: Thu Feb 2 16:01:13 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: Thu Feb 2 16:01:13 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: Thu Feb 2 16:01:13 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: Thu Feb 2 16:01:13 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: Thu Feb 2 16:01:13 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: Thu Feb 2 16:01:13 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: Thu Feb 2 16:01:13 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: Thu Feb 2 16:01:13 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: Thu Feb 2 16:01:13 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: Thu Feb 2 16:01:13 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: Thu Feb 2 16:01:13 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-0083.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:13 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: Thu Feb 2 20:01:02 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: Thu Feb 2 20:01:02 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: Thu Feb 2 20:01:02 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: Thu Feb 2 20:01:02 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: Thu Feb 2 20:01:02 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: Thu Feb 2 20:01:02 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: Thu Feb 2 20:01:02 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: Thu Feb 2 20:01:02 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: Thu Feb 2 20:01:03 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: Thu Feb 2 20:01:03 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: Thu Feb 2 20:01:03 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: Thu Feb 2 20:01:03 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: Thu Feb 2 20:01:03 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-0084.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 20:01:03 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 Feb 3 08:12:15 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 Feb 3 08:12: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 Feb 3 08:12: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 Feb 3 08:12:17 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 Feb 3 08:12:17 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 Feb 3 08:12:17 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 Feb 3 08:12:17 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 Feb 3 08:12:17 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 Feb 3 08:12:17 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 Feb 3 08:12:17 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 Feb 3 08:12:17 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 Feb 3 08:12:17 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 Feb 3 08:12:17 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-0085.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 08:12:17 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 Feb 3 12:02:41 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 Feb 3 12:02:41 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 Feb 3 12:02:41 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 Feb 3 12:02:41 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 Feb 3 12:02:41 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 Feb 3 12:02:41 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 Feb 3 12:02:41 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 Feb 3 12:02:41 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 Feb 3 12:02:41 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 Feb 3 12:02:41 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 Feb 3 12:02:41 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 Feb 3 12:02:42 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 Feb 3 12:02:42 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-0086.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:42 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 Feb 3 16:01:04 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 Feb 3 16:01:04 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 Feb 3 16:01:04 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 Feb 3 16:01:04 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 Feb 3 16:01:04 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 Feb 3 16:01:04 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 Feb 3 16:01:04 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 Feb 3 16:01:04 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 Feb 3 16:01:04 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 Feb 3 16:01:04 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 Feb 3 16:01:04 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 Feb 3 16:01:04 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 Feb 3 16:01:04 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-0087.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 16:01:04 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 Feb 3 20:01: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: Fri Feb 3 20:01:09 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 Feb 3 20:01:09 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 Feb 3 20:01:09 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 Feb 3 20:01:09 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 Feb 3 20:01:09 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 Feb 3 20:01:09 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 Feb 3 20:01:09 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 Feb 3 20:01:09 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 Feb 3 20:01:09 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 Feb 3 20:01:09 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 Feb 3 20:01:09 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 Feb 3 20:01:09 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-0088.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 20:01:09 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 Feb 4 08:07:57 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 Feb 4 08:07:58 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 Feb 4 08:07:59 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 Feb 4 08:07:59 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 Feb 4 08:07:59 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 Feb 4 08:07:59 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 Feb 4 08:07:59 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 Feb 4 08:07:59 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 Feb 4 08:08:00 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 Feb 4 08:08:00 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 Feb 4 08:08:00 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 Feb 4 08:08:00 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 Feb 4 08:08:01 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-0089.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 08:08:02 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 Feb 4 12:02:44 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 Feb 4 12:02:44 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 Feb 4 12:02:44 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 Feb 4 12:02:44 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 Feb 4 12:02:44 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 Feb 4 12:02:44 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 Feb 4 12:02:44 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 Feb 4 12:02:44 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 Feb 4 12:02:44 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 Feb 4 12:02:44 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 Feb 4 12:02:44 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 Feb 4 12:02:44 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 Feb 4 12:02:44 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-0090.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:44 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 Feb 4 16:01:13 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 Feb 4 16:01:13 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 Feb 4 16:01:13 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 Feb 4 16:01:13 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 Feb 4 16:01:14 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 Feb 4 16:01:14 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 Feb 4 16:01:14 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 Feb 4 16:01:14 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 Feb 4 16:01:14 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 Feb 4 16:01:14 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 Feb 4 16:01:14 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 Feb 4 16:01:14 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 Feb 4 16:01:14 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-0091.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:14 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 Feb 4 20:01:03 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 Feb 4 20:01:06 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 Feb 4 20:01:06 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 Feb 4 20:01:06 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 Feb 4 20:01:06 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 Feb 4 20:01:06 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 Feb 4 20:01:06 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 Feb 4 20:01:06 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 Feb 4 20:01:06 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 Feb 4 20:01:06 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 Feb 4 20:01:06 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 Feb 4 20:01:06 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 Feb 4 20:01:06 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-0092.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 20:01:06 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 Feb 5 08:07:57 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 Feb 5 08:07:58 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: Sun Feb 5 08:07:58 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: Sun Feb 5 08:07:58 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: Sun Feb 5 08:07:58 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: Sun Feb 5 08:07:58 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: Sun Feb 5 08:07:58 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: Sun Feb 5 08:07:58 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: Sun Feb 5 08:07:58 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: Sun Feb 5 08:07:58 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: Sun Feb 5 08:07:58 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: Sun Feb 5 08:07:58 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: Sun Feb 5 08:07:58 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-0093.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:58 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 Feb 5 12:02:44 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 Feb 5 12:02:44 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: Sun Feb 5 12:02:44 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: Sun Feb 5 12:02:44 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: Sun Feb 5 12:02:44 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: Sun Feb 5 12:02:44 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: Sun Feb 5 12:02:44 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: Sun Feb 5 12:02:44 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: Sun Feb 5 12:02:44 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: Sun Feb 5 12:02:44 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: Sun Feb 5 12:02:44 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: Sun Feb 5 12:02: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: Sun Feb 5 12:02: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-0094.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 12:02: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: Sun Feb 5 16:01:07 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 Feb 5 16:01:07 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: Sun Feb 5 16:01:07 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: Sun Feb 5 16:01:07 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: Sun Feb 5 16:01:07 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: Sun Feb 5 16:01:07 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: Sun Feb 5 16:01:07 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: Sun Feb 5 16:01:07 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: Sun Feb 5 16:01:08 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: Sun Feb 5 16:01:08 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: Sun Feb 5 16:01:08 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: Sun Feb 5 16:01:08 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: Sun Feb 5 16:01:08 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-0095.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 16:01:08 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 Feb 5 20:01:00 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 Feb 5 20:01:00 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: Sun Feb 5 20:01:00 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: Sun Feb 5 20:01:00 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: Sun Feb 5 20:01:00 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: Sun Feb 5 20:01:00 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: Sun Feb 5 20:01:00 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: Sun Feb 5 20:01:00 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: Sun Feb 5 20:01:00 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: Sun Feb 5 20:01:00 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: Sun Feb 5 20:01:00 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: Sun Feb 5 20:01:00 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: Sun Feb 5 20:01:00 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-0096.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 20:01:00 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: Mon Feb 6 08:15:11 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: Mon Feb 6 08:15:14 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: Mon Feb 6 08:15:14 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: Mon Feb 6 08:15: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: Mon Feb 6 08:15: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: Mon Feb 6 08:15: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: Mon Feb 6 08:15: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: Mon Feb 6 08:15: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: Mon Feb 6 08:15: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: Mon Feb 6 08:15:17 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: Mon Feb 6 08:15:17 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: Mon Feb 6 08:15:17 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: Mon Feb 6 08:15:17 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-0097.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 08:15:17 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: Mon Feb 6 12:02:44 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: Mon Feb 6 12:02:44 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: Mon Feb 6 12:02:44 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: Mon Feb 6 12:02:44 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: Mon Feb 6 12:02: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: Mon Feb 6 12:02: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: Mon Feb 6 12:02: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: Mon Feb 6 12:02: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: Mon Feb 6 12:02: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: Mon Feb 6 12:02: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: Mon Feb 6 12:02: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: Mon Feb 6 12:02: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: Mon Feb 6 12:02: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-0098.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 12:02: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: Mon Feb 6 16:01: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: Mon Feb 6 16:01: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 "", 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: Mon Feb 6 16:01:08 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: Mon Feb 6 16:01:08 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: Mon Feb 6 16:01:08 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: Mon Feb 6 16:01:08 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: Mon Feb 6 16:01:08 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: Mon Feb 6 16:01:08 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: Mon Feb 6 16:01:08 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: Mon Feb 6 16:01:08 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: Mon Feb 6 16:01:08 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: Mon Feb 6 16:01:08 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: Mon Feb 6 16:01:08 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-0099.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 16:01:08 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: Mon Feb 6 20:01:01 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: Mon Feb 6 20:01:01 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: Mon Feb 6 20:01:01 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: Mon Feb 6 20:01:01 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: Mon Feb 6 20:01:01 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: Mon Feb 6 20:01:01 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: Mon Feb 6 20:01:01 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: Mon Feb 6 20:01:01 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: Mon Feb 6 20:01:01 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: Mon Feb 6 20:01:01 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: Mon Feb 6 20:01:01 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: Mon Feb 6 20:01:01 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: Mon Feb 6 20:01:01 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-0100.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 20:01:01 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: Tue Feb 7 08:23:30 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: Tue Feb 7 08:23:34 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: Tue Feb 7 08:23:34 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: Tue Feb 7 08:23:34 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: Tue Feb 7 08:23:34 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: Tue Feb 7 08:23:34 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: Tue Feb 7 08:23:34 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: Tue Feb 7 08:23:34 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: Tue Feb 7 08:23:35 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: Tue Feb 7 08:23:35 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: Tue Feb 7 08:23:35 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: Tue Feb 7 08:23:35 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: Tue Feb 7 08:23:36 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-0101.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 08:23:36 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: Tue Feb 7 12:03:19 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: Tue Feb 7 12:03:19 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: Tue Feb 7 12:03:19 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: Tue Feb 7 12:03:19 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: Tue Feb 7 12:03:19 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: Tue Feb 7 12:03:19 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: Tue Feb 7 12:03:19 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: Tue Feb 7 12:03:19 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: Tue Feb 7 12:03:19 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: Tue Feb 7 12:03:19 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: Tue Feb 7 12:03:19 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: Tue Feb 7 12:03:19 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: Tue Feb 7 12:03:19 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-0102.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 12:03:19 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: Tue Feb 7 16:01:11 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: Tue Feb 7 16:01:11 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: Tue Feb 7 16:01:11 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: Tue Feb 7 16:01:11 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: Tue Feb 7 16:01:11 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: Tue Feb 7 16:01:11 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: Tue Feb 7 16:01:11 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: Tue Feb 7 16:01:11 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: Tue Feb 7 16:01:11 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: Tue Feb 7 16:01:11 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: Tue Feb 7 16:01:11 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: Tue Feb 7 16:01:11 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: Tue Feb 7 16:01:11 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-0103.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 16:01:11 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: Tue Feb 7 20:01:06 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: Tue Feb 7 20:01:06 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: Tue Feb 7 20:01:06 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: Tue Feb 7 20:01:06 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: Tue Feb 7 20:01:06 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: Tue Feb 7 20:01:06 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: Tue Feb 7 20:01:06 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: Tue Feb 7 20:01:06 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: Tue Feb 7 20:01:06 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: Tue Feb 7 20:01:06 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: Tue Feb 7 20:01:06 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: Tue Feb 7 20:01:06 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: Tue Feb 7 20:01:06 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-0104.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 20:01:06 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: Wed Feb 8 08:22:36 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: Wed Feb 8 08:22:39 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: Wed Feb 8 08:22:39 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: Wed Feb 8 08:22:39 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: Wed Feb 8 08:22:39 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: Wed Feb 8 08:22:39 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: Wed Feb 8 08:22:39 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: Wed Feb 8 08:22: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: Wed Feb 8 08:22: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: Wed Feb 8 08:22: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: Wed Feb 8 08:22: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: Wed Feb 8 08:22: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: Wed Feb 8 08:22: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-0105.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 08:22: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: Wed Feb 8 12:03:23 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: Wed Feb 8 12:03:23 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: Wed Feb 8 12:03:23 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: Wed Feb 8 12:03:23 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: Wed Feb 8 12:03:23 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: Wed Feb 8 12:03:23 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: Wed Feb 8 12:03:23 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: Wed Feb 8 12:03:24 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: Wed Feb 8 12:03:24 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: Wed Feb 8 12:03:24 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: Wed Feb 8 12:03:24 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: Wed Feb 8 12:03:24 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: Wed Feb 8 12:03:24 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-0106.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 12:03:24 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: Wed Feb 8 16:01:15 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: Wed Feb 8 16:01:15 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: Wed Feb 8 16:01:15 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: Wed Feb 8 16:01:15 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: Wed Feb 8 16:01:15 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: Wed Feb 8 16:01:15 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: Wed Feb 8 16:01:15 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: Wed Feb 8 16:01:15 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: Wed Feb 8 16:01:15 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: Wed Feb 8 16:01:15 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: Wed Feb 8 16:01:15 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: Wed Feb 8 16:01:15 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: Wed Feb 8 16:01:15 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-0107.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:15 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: Wed Feb 8 20:01:05 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: Wed Feb 8 20:01:05 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: Wed Feb 8 20:01:05 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: Wed Feb 8 20:01:05 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: Wed Feb 8 20:01:05 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: Wed Feb 8 20:01:05 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: Wed Feb 8 20:01:05 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: Wed Feb 8 20:01:05 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: Wed Feb 8 20:01:05 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: Wed Feb 8 20:01:05 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: Wed Feb 8 20:01:05 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: Wed Feb 8 20:01:05 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: Wed Feb 8 20:01:06 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-0108.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 20:01:06 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: Thu Feb 9 08:09:19 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: Thu Feb 9 08:09:20 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: Thu Feb 9 08:09:20 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: Thu Feb 9 08:09:20 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: Thu Feb 9 08:09:20 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: Thu Feb 9 08:09:20 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: Thu Feb 9 08:09:20 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: Thu Feb 9 08:09:20 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: Thu Feb 9 08:09:20 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: Thu Feb 9 08:09:20 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: Thu Feb 9 08:09:20 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: Thu Feb 9 08:09:20 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: Thu Feb 9 08:09: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-0109.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 08:09: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: Thu Feb 9 12:03: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: Thu Feb 9 12:03: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: Thu Feb 9 12:03: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: Thu Feb 9 12:03: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: Thu Feb 9 12:03: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: Thu Feb 9 12:03: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: Thu Feb 9 12:03: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: Thu Feb 9 12:03: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: Thu Feb 9 12:03: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: Thu Feb 9 12:03: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: Thu Feb 9 12:03: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: Thu Feb 9 12:03: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: Thu Feb 9 12:03: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-0110.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 12:03: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: Thu Feb 9 16:01: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: Thu Feb 9 16:01: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: Thu Feb 9 16:01: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: Thu Feb 9 16:01: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: Thu Feb 9 16:01: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: Thu Feb 9 16:01: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: Thu Feb 9 16:01: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: Thu Feb 9 16:01: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: Thu Feb 9 16:01: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: Thu Feb 9 16:01: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: Thu Feb 9 16:01:17 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: Thu Feb 9 16:01:17 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: Thu Feb 9 16:01:17 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-0111.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:17 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: Thu Feb 9 20:01:10 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: Thu Feb 9 20:01:10 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: Thu Feb 9 20:01:10 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: Thu Feb 9 20:01:10 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: Thu Feb 9 20:01:10 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: Thu Feb 9 20:01:11 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: Thu Feb 9 20:01:11 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: Thu Feb 9 20:01:11 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: Thu Feb 9 20:01:11 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: Thu Feb 9 20:01:11 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: Thu Feb 9 20:01:11 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: Thu Feb 9 20:01:11 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: Thu Feb 9 20:01:11 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-0112.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 20:01:11 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 Feb 10 08:19:59 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 Feb 10 08:20:00 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 Feb 10 08:20:00 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 Feb 10 08:20:00 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 Feb 10 08:20:00 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 Feb 10 08:20:00 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 Feb 10 08:20:00 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 Feb 10 08:20:00 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 Feb 10 08:20:00 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 Feb 10 08:20:00 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 Feb 10 08:20:01 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 Feb 10 08:20:01 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 Feb 10 08:20:02 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-0113.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 08:20:02 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 Feb 10 12:03: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 Feb 10 12:03: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 Feb 10 12:03: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 Feb 10 12:03: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 Feb 10 12:03: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 Feb 10 12:03: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 Feb 10 12:03: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 Feb 10 12:03: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 Feb 10 12:03: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 Feb 10 12:03: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 Feb 10 12:03: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 Feb 10 12:03: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 Feb 10 12:03:40 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-0114.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:40 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 Feb 10 16:01:11 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 Feb 10 16:01:11 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 Feb 10 16:01:11 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 Feb 10 16:01:11 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 Feb 10 16:01:11 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 Feb 10 16:01:11 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 Feb 10 16:01:11 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 Feb 10 16:01:12 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 Feb 10 16:01:12 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 Feb 10 16:01:12 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 Feb 10 16:01:12 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 Feb 10 16:01:12 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 Feb 10 16:01:12 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-0115.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:12 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 Feb 10 20:01:13 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 Feb 10 20:01:15 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 Feb 10 20:01:15 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 Feb 10 20:01:15 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 Feb 10 20:01:15 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 Feb 10 20:01:15 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 Feb 10 20:01:15 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 Feb 10 20:01:15 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 Feb 10 20:01:15 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 Feb 10 20:01:15 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 Feb 10 20:01:15 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 Feb 10 20:01:15 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 Feb 10 20:01:15 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-0116.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:15 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 Feb 11 08:12:52 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 Feb 11 08:12: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: Sat Feb 11 08:12: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: Sat Feb 11 08:12: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: Sat Feb 11 08:12: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: Sat Feb 11 08:12: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: Sat Feb 11 08:12: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: Sat Feb 11 08:12: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: Sat Feb 11 08:12: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: Sat Feb 11 08:12: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: Sat Feb 11 08:12: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: Sat Feb 11 08:12: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: Sat Feb 11 08:12:55 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-0117.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 08:12:55 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 Feb 11 12:02: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: Sat Feb 11 12:02: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: Sat Feb 11 12:02: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: Sat Feb 11 12:02: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: Sat Feb 11 12:02: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: Sat Feb 11 12:02: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: Sat Feb 11 12:02: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: Sat Feb 11 12:02: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: Sat Feb 11 12:02: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: Sat Feb 11 12:02: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: Sat Feb 11 12:02: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: Sat Feb 11 12:02: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: Sat Feb 11 12:02:40 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-0118.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:40 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 Feb 11 16:01:07 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 Feb 11 16:01:07 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 Feb 11 16:01:07 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 Feb 11 16:01:07 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 Feb 11 16:01:07 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 Feb 11 16:01:07 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 Feb 11 16:01:07 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 Feb 11 16:01:07 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 Feb 11 16:01:07 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 Feb 11 16:01:07 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 Feb 11 16:01:07 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 Feb 11 16:01:07 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 Feb 11 16:01:08 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-0119.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 16:01:08 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 Feb 11 20:00:58 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 Feb 11 20:00:58 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 Feb 11 20:00:58 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 Feb 11 20:00:58 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 Feb 11 20:00:58 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 Feb 11 20:00:58 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 Feb 11 20:00:58 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 Feb 11 20:00:58 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 Feb 11 20:00:59 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 Feb 11 20:00:59 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 Feb 11 20:00:59 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 Feb 11 20:00:59 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 Feb 11 20:00:59 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-0120.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:59 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 Feb 12 08:09:22 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 Feb 12 08:09:23 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: Sun Feb 12 08:09:23 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: Sun Feb 12 08:09:23 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: Sun Feb 12 08:09:23 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: Sun Feb 12 08:09:23 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: Sun Feb 12 08:09:23 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: Sun Feb 12 08:09:23 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: Sun Feb 12 08:09:23 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: Sun Feb 12 08:09:23 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: Sun Feb 12 08:09:23 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: Sun Feb 12 08:09:23 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: Sun Feb 12 08:09:23 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-0121.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 08:09:24 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 Feb 12 12:02:48 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 Feb 12 12:02:48 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: Sun Feb 12 12:02:48 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: Sun Feb 12 12:02:48 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: Sun Feb 12 12:02: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: Sun Feb 12 12:02: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: Sun Feb 12 12:02: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: Sun Feb 12 12:02: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: Sun Feb 12 12:02: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: Sun Feb 12 12:02: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: Sun Feb 12 12:02: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: Sun Feb 12 12:02: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: Sun Feb 12 12:02: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-0122.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 12:02: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: Sun Feb 12 16:01:11 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 Feb 12 16:01:11 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: Sun Feb 12 16:01:11 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: Sun Feb 12 16:01:11 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: Sun Feb 12 16:01:11 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: Sun Feb 12 16:01:11 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: Sun Feb 12 16:01:11 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: Sun Feb 12 16:01:11 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: Sun Feb 12 16:01:11 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: Sun Feb 12 16:01:11 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: Sun Feb 12 16:01:11 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: Sun Feb 12 16:01:11 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: Sun Feb 12 16:01:11 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-0123.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 16:01:11 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 Feb 12 20:01:05 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 Feb 12 20:01:05 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: Sun Feb 12 20:01:05 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: Sun Feb 12 20:01:05 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: Sun Feb 12 20:01:05 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: Sun Feb 12 20:01:05 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: Sun Feb 12 20:01:05 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: Sun Feb 12 20:01:05 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: Sun Feb 12 20:01:05 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: Sun Feb 12 20:01:05 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: Sun Feb 12 20:01:05 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: Sun Feb 12 20:01:06 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: Sun Feb 12 20:01:06 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-0124.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 20:01:06 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: Mon Feb 13 08:16:57 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: Mon Feb 13 08:16:59 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: Mon Feb 13 08:17:00 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: Mon Feb 13 08:17:00 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: Mon Feb 13 08:17:00 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: Mon Feb 13 08:17:00 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: Mon Feb 13 08:17:00 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: Mon Feb 13 08:17:00 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: Mon Feb 13 08:17:00 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: Mon Feb 13 08:17:00 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: Mon Feb 13 08:17:00 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: Mon Feb 13 08:17:00 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: Mon Feb 13 08:17:04 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-0125.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 08:17:04 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: Mon Feb 13 12:03: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: Mon Feb 13 12:03: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 "", 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: Mon Feb 13 12:03:08 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: Mon Feb 13 12:03:08 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: Mon Feb 13 12:03:08 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: Mon Feb 13 12:03:08 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: Mon Feb 13 12:03:08 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: Mon Feb 13 12:03:08 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: Mon Feb 13 12:03:08 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: Mon Feb 13 12:03:08 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: Mon Feb 13 12:03:08 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: Mon Feb 13 12:03:08 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: Mon Feb 13 12:03:08 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-0126.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 12:03:08 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: Mon Feb 13 16:01:24 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: Mon Feb 13 16:01:25 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: Mon Feb 13 16:01:25 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: Mon Feb 13 16:01:25 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: Mon Feb 13 16:01:25 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: Mon Feb 13 16:01:25 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: Mon Feb 13 16:01:25 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: Mon Feb 13 16:01:25 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: Mon Feb 13 16:01:25 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: Mon Feb 13 16:01:25 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: Mon Feb 13 16:01:25 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: Mon Feb 13 16:01:25 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: Mon Feb 13 16:01:26 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-0127.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:26 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: Mon Feb 13 20:01:07 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: Mon Feb 13 20:01:07 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: Mon Feb 13 20:01:07 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: Mon Feb 13 20:01:07 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: Mon Feb 13 20:01:07 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: Mon Feb 13 20:01:07 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: Mon Feb 13 20:01:07 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: Mon Feb 13 20:01:07 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: Mon Feb 13 20:01:07 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: Mon Feb 13 20:01:08 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: Mon Feb 13 20:01:08 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: Mon Feb 13 20:01:08 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: Mon Feb 13 20:01:08 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-0128.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 20:01:08 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: Tue Feb 14 08:19:18 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: Tue Feb 14 08:19:20 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: Tue Feb 14 08:19:20 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: Tue Feb 14 08:19:20 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: Tue Feb 14 08:19: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: Tue Feb 14 08:19: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: Tue Feb 14 08:19: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: Tue Feb 14 08:19: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: Tue Feb 14 08:19: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: Tue Feb 14 08:19: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: Tue Feb 14 08:19: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: Tue Feb 14 08:19: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: Tue Feb 14 08:19:22 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-0129.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 08:19:22 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: Tue Feb 14 12:03:23 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: Tue Feb 14 12:03:24 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: Tue Feb 14 12:03:24 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: Tue Feb 14 12:03:24 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: Tue Feb 14 12:03:24 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: Tue Feb 14 12:03:24 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: Tue Feb 14 12:03:24 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: Tue Feb 14 12:03:24 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: Tue Feb 14 12:03:24 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: Tue Feb 14 12:03:24 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: Tue Feb 14 12:03:24 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: Tue Feb 14 12:03:24 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: Tue Feb 14 12:03:25 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-0130.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 12:03:25 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: Tue Feb 14 16:01:32 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: Tue Feb 14 16:01:33 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: Tue Feb 14 16:01:33 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: Tue Feb 14 16:01:33 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: Tue Feb 14 16:01:33 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: Tue Feb 14 16:01:33 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: Tue Feb 14 16:01:33 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: Tue Feb 14 16:01:33 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: Tue Feb 14 16:01:33 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: Tue Feb 14 16:01:33 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: Tue Feb 14 16:01:33 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: Tue Feb 14 16:01:33 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: Tue Feb 14 16:01:33 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-0131.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:33 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: Tue Feb 14 20:01:13 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: Tue Feb 14 20:01:13 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: Tue Feb 14 20:01:13 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: Tue Feb 14 20:01:13 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: Tue Feb 14 20:01:13 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: Tue Feb 14 20:01:13 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: Tue Feb 14 20:01:13 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: Tue Feb 14 20:01:13 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: Tue Feb 14 20:01:13 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: Tue Feb 14 20:01:13 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: Tue Feb 14 20:01:13 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: Tue Feb 14 20:01:13 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: Tue Feb 14 20:01:14 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-0132.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:14 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: Wed Feb 15 08:27:44 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: Wed Feb 15 08:27:47 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: Wed Feb 15 08:27:47 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: Wed Feb 15 08:27:47 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: Wed Feb 15 08:27:48 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: Wed Feb 15 08:27:48 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: Wed Feb 15 08:27:48 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: Wed Feb 15 08:27: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: Wed Feb 15 08:27: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: Wed Feb 15 08:27: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: Wed Feb 15 08:27: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: Wed Feb 15 08:27: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: Wed Feb 15 08:27:51 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-0133.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 08:27:51 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: Wed Feb 15 12:05:26 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: Wed Feb 15 12:05:26 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: Wed Feb 15 12:05:26 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: Wed Feb 15 12:05:26 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: Wed Feb 15 12:05:26 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: Wed Feb 15 12:05:27 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: Wed Feb 15 12:05:27 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: Wed Feb 15 12:05:27 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: Wed Feb 15 12:05:27 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: Wed Feb 15 12:05:29 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: Wed Feb 15 12:05:29 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: Wed Feb 15 12:05:29 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: Wed Feb 15 12:05:29 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-0134.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 12:05:29 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: Wed Feb 15 16:01:35 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: Wed Feb 15 16:01:35 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: Wed Feb 15 16:01:35 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: Wed Feb 15 16:01:35 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: Wed Feb 15 16:01:35 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: Wed Feb 15 16:01:35 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: Wed Feb 15 16:01:35 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: Wed Feb 15 16:01:35 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: Wed Feb 15 16:01:35 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: Wed Feb 15 16:01:35 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: Wed Feb 15 16:01:35 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: Wed Feb 15 16:01:35 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: Wed Feb 15 16:01:36 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-0135.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:36 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: Wed Feb 15 19:28:10 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: Wed Feb 15 19:28:10 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: Wed Feb 15 19:28:10 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: Wed Feb 15 19:28:10 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: Wed Feb 15 19:28:10 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: Wed Feb 15 19:28:10 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: Wed Feb 15 19:28:10 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: Wed Feb 15 19:28:10 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: Wed Feb 15 19:28:10 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: Wed Feb 15 19:28:10 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: Wed Feb 15 19:28:10 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: Wed Feb 15 19:28:10 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: Wed Feb 15 19:28:10 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-0136.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 19:28:10 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: Wed Feb 15 20:13:39 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: Wed Feb 15 20:13: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: Wed Feb 15 20:13: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: Wed Feb 15 20:13: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: Wed Feb 15 20:13: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: Wed Feb 15 20:13: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: Wed Feb 15 20:13: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: Wed Feb 15 20:13: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: Wed Feb 15 20:13: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: Wed Feb 15 20:13: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: Wed Feb 15 20:13: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: Wed Feb 15 20:13: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: Wed Feb 15 20:13:40 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-0137.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 20:13:40 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: Thu Feb 16 08:46:18 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: Thu Feb 16 08:46:19 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: Thu Feb 16 08:46:19 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: Thu Feb 16 08:46:19 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: Thu Feb 16 08:46:20 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: Thu Feb 16 08:46:20 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: Thu Feb 16 08:46:20 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: Thu Feb 16 08:46:20 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: Thu Feb 16 08:46:20 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: Thu Feb 16 08:46:20 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: Thu Feb 16 08:46:20 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: Thu Feb 16 08:46:20 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: Thu Feb 16 08:46:23 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-0138.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 16 08:46:23 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 Mar 31 16:33: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 Mar 31 16:33: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 Mar 31 16:33: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 Mar 31 16:33: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 Mar 31 16:33:41 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 Mar 31 16:33:41 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 Mar 31 16:33:42 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 Mar 31 16:33:42 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 Mar 31 16:33:42 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 Mar 31 16:33:42 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 Mar 31 16:33:42 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 Mar 31 16:33:42 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 Mar 31 16:33:42 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-0139.bin From mal at egenix.com Fri Feb 27 10:14:04 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:42 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 ! ::::