[egenix-users] Python 2.7.4 generates SIGSEGV when cleaning up mx.URL

Peter Loje peter.loje at gmail.com
Tue Apr 9 14:51:53 CEST 2013


On two separate systems (i686 running Debian GNU/Linux 6.0.7 and x86_64
running Ubuntu 12.04.2 LTS) I'm getting segmentation fault when Python
2.7.4 exits after having loaded mx.URL.

I have compiled Python and mx.URL from sources. The latter using:
$ md5sum egenix-mx-base-3.2.5.tar.gz
2f982afa5ac70691965e9990df138186  egenix-mx-base-3.2.5.tar.gz

In the file egenix-mx-base-3.2.5/mx/URL/mxURL/mxURL.c the segmentation
fault is generated in line 2789:

2776 void mxURLModule_Cleanup(void)
....
2789     Py_XDECREF(mxURL_MIMEDict);

GDB backtrace provided below.

BTW I wonder why the module reports version 3.2.4?
$ find egenix-mx-base-3.2.5 -type f | xargs egrep 'MX.*_VERSION "'
egenix-mx-base-3.2.5/mx/BeeBase/mxBeeBase/mxBeeBase.c:#define
MXBEEBASE_VERSION "3.2.4"
egenix-mx-base-3.2.5/mx/DateTime/mxDateTime/mxDateTime.c:#define
MXDATETIME_VERSION "3.2.4"
egenix-mx-base-3.2.5/mx/Proxy/mxProxy/mxProxy.c:#define MXPROXY_VERSION
"3.2.4"
egenix-mx-base-3.2.5/mx/Queue/mxQueue/mxQueue.c:#define MXQUEUE_VERSION
"3.2.4"
egenix-mx-base-3.2.5/mx/Stack/mxStack/mxStack.c:#define MXSTACK_VERSION
"3.2.4"
egenix-mx-base-3.2.5/mx/TextTools/mxTextTools/mxTextTools.c:#define
MXTEXTTOOLS_VERSION "3.2.4"
egenix-mx-base-3.2.5/mx/Tools/mxTools/mxTools.c:#define MXTOOLS_VERSION
"3.2.4"
egenix-mx-base-3.2.5/mx/UID/mxUID/mxUID.c:#define MXUID_VERSION "3.2.4"
egenix-mx-base-3.2.5/mx/URL/mxURL/mxURL.c:#define MXURL_VERSION "3.2.4"

Did you forget to bump up the patch version from 4 to 5 when releasing
mx-base-3.2.5?

Best regards
Peter Loje


$ gdb /usr/local/bin/python2.7
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/local/bin/python2.7...done.
(gdb) r
Starting program: /usr/local/bin/python2.7
[Thread debugging using libthread_db enabled]
Python 2.7.4 (default, Apr  8 2013, 15:51:19)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mx.URL
>>> mx.URL.__version__
'3.2.4'
>>> import sys
>>> sys.exit()

Program received signal SIGSEGV, Segmentation fault.
0x08091201 in dict_dealloc (mp=0xb7b2813c) at Objects/dictobject.c:1005
1005        Py_TRASHCAN_SAFE_BEGIN(mp)
(gdb) bt
#0  0x08091201 in dict_dealloc (mp=0xb7b2813c) at Objects/dictobject.c:1005
#1  0xb7875928 in mxURLModule_Cleanup () at mx/URL/mxURL/mxURL.c:2789
#2  0x0810553f in call_ll_exitfuncs () at Python/pythonrun.c:1763
#3  Py_Finalize () at Python/pythonrun.c:554
#4  0x08104bac in Py_Exit () at Python/pythonrun.c:1772
#5  handle_system_exit () at Python/pythonrun.c:1146
#6  0x0810517d in PyErr_PrintEx (set_sys_last_vars=<value optimized out>)
at Python/pythonrun.c:1156
#7  0x081058dd in PyRun_InteractiveOneFlags (fp=0xb7f8b420,
filename=0x815f9c0 "<stdin>", flags=0xbffffc4c) at Python/pythonrun.c:855
#8  0x08105a68 in PyRun_InteractiveLoopFlags (fp=0xb7f8b420,
filename=0x815f9c0 "<stdin>", flags=0xbffffc4c) at Python/pythonrun.c:772
#9  0x081062f2 in PyRun_AnyFileExFlags (fp=0xb7f8b420, filename=0x815f9c0
"<stdin>", closeit=0, flags=0xbffffc4c) at Python/pythonrun.c:741
#10 0x0805bb59 in Py_Main (argc=1, argv=0xbffffd34) at Modules/main.c:640
#11 0x0805abeb in main (argc=1, argv=0xbffffd34) at ./Modules/python.c:23
(gdb)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /mailman-archives/egenix-users/attachments/20130409/f9c9b3f9/attachment.htm


More information about the egenix-users mailing list