By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,766 Members | 1,295 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,766 IT Pros & Developers. It's quick & easy.

_mssql on Python 2.5 Beta 2

P: n/a
I'm trying to use the _mssql module from
http://pymssql.sourceforge.net/. It works fine on Python 2.4. I've
just installed Python 2.5 Beta 2 on my Linux box and, whenever I try
and run the mssql.close() function, or close the program, I get the
following message:

*** glibc detected *** python2.5: free(): invalid pointer: 0xb7f08320
***
======= Backtrace: =========
/lib/libc.so.6[0xa68424]
/lib/libc.so.6(__libc_free+0x77)[0xa6895f]
/usr/local/lib/python2.5/site-packages/_mssql.so[0x7f5d8c]
python2.5[0x8080a72]
python2.5(PyDict_SetItem+0x6c)[0x8080e4c]
python2.5(_PyModule_Clear+0x15d)[0x8083929]
python2.5(PyImport_Cleanup+0x1e5)[0x80d1159]
python2.5(Py_Finalize+0xaf)[0x80dc4c3]
python2.5(Py_Main+0x39d)[0x805646d]
/lib/libc.so.6(__libc_start_main+0xc6)[0xa19de6]
python2.5[0x8055f89]
======= Memory map: ========
00131000-00175000 r-xp 00000000 03:03 6723934
/usr/lib/libncursesw.so.5.4
00175000-0017d000 rwxp 00044000 03:03 6723934
/usr/lib/libncursesw.so.5.4
0017d000-0017e000 rwxp 0017d000 00:00 0
001fa000-0023f000 r-xp 00000000 03:03 166172
/usr/local/lib/libsybdb.so.5.0.0
0023f000-00242000 rwxp 00045000 03:03 166172
/usr/local/lib/libsybdb.so.5.0.0
004b7000-004c0000 r-xp 00000000 03:03 4124789
/lib/libnss_files-2.3.5.so
004c0000-004c1000 r-xp 00008000 03:03 4124789
/lib/libnss_files-2.3.5.so
004c1000-004c2000 rwxp 00009000 03:03 4124789
/lib/libnss_files-2.3.5.so
0074c000-0075a000 r-xp 00000000 03:03 4124807
/lib/libpthread-2.3.5.so
0075a000-0075b000 r-xp 0000d000 03:03 4124807
/lib/libpthread-2.3.5.so
0075b000-0075c000 rwxp 0000e000 03:03 4124807
/lib/libpthread-2.3.5.so
0075c000-0075e000 rwxp 0075c000 00:00 0
0076f000-00778000 r-xp 00000000 03:03 4127052
/lib/libgcc_s-4.0.2-20051126.so.1
00778000-00779000 rwxp 00009000 03:03 4127052
/lib/libgcc_s-4.0.2-20051126.so.1
007dc000-007dd000 r-xp 007dc000 00:00 0
007f4000-007f8000 r-xp 00000000 03:03 2324725
/usr/local/lib/python2.5/site-packages/_mssql.so
007f8000-007f9000 rwxp 00004000 03:03 2324725
/usr/local/lib/python2.5/site-packages/_mssql.so
007f9000-007fb000 rwxp 007f9000 00:00 0
008b8000-008ba000 r-xp 00000000 03:03 4127074 /lib/libutil-2.3.5.so
008ba000-008bb000 r-xp 00001000 03:03 4127074 /lib/libutil-2.3.5.so
008bb000-008bc000 rwxp 00002000 03:03 4127074 /lib/libutil-2.3.5.so
009e7000-00a01000 r-xp 00000000 03:03 4127066 /lib/ld-2.3.5.so
00a01000-00a02000 r-xp 00019000 03:03 4127066 /lib/ld-2.3.5.so
00a02000-00a03000 rwxp 0001a000 03:03 4127066 /lib/ld-2.3.5.so
00a05000-00b29000 r-xp 00000000 03:03 4127067 /lib/libc-2.3.5.so
00b29000-00b2b000 r-xp 00124000 03:03 4127067 /lib/libc-2.3.5.so
00b2b000-00b2d000 rwxp 00126000 03:03 4127067 /lib/libc-2.3.5.so
00b2d000-00b2f000 rwxp 00b2d000 00:00 0
00b31000-00b33000 r-xp 00000000 03:03 4127069 /lib/libdl-2.3.5.so
00b33000-00b34000 r-xp 00001000 03:03 4127069 /lib/libdl-2.3.5.so
00b34000-00b35000 rwxp 00002000 03:03 4127069 /lib/libdl-2.3.5.so
00b37000-00b59000 r-xp 00000000 03:03 4127073 /lib/libm-2.3.5.so
00b59000-00b5a000 r-xp 00021000 03:03 4127073 /lib/libm-2.3.5.so
00b5a000-00b5b000 rwxp 00022000 03:03 4127073 /lib/libm-2.3.5.so
00b86000-00b95000 r-xp 00000000 03:03 4124849
/lib/libresolv-2.3.5.so
00b95000-00b96000 r-xp 0000e000 03:03 4124849
/lib/libresolv-2.3.5.so
00b96000-00b97000 rwxp 0000f000 03:03 4124849
/lib/libresolv-2.3.5.so
00b97000-00b99000 rwxp 00b97000 00:00 0
00b9b000-00bc2000 r-xp 00000000 03:03 4190263
/usr/lib/libreadline.so.5.0
00bc2000-00bc6000 rwxp 00027000 03:03 4190263
/usr/lib/libreadline.so.5.0
00bc6000-00bc7000 rwxp 00bc6000 00:00 0
00c00000-00c01000 r-xp 00000000 03:03 6715661
/usr/lib/gconv/ISO8859-1.so
00c01000-00c03000 rwxp 00000000 03:03 6715661
/usr/lib/gconv/ISO8859-1.so
00c43000-00c46000 r-xp 00000000 03:03 1178681
/usr/local/lib/python2.5/lib-dynload/time.so
00c46000-00c48000 rwxp 00002000 03:03 1178681
/usr/local/lib/python2.5/lib-dynload/time.so
00c8d000-00c91000 r-xp 00000000 03:03 1178665
/usr/local/lib/python2.5/lib-dynload/collections.so
00c91000-00c92000 rwxp 00004000 03:03 1178665
/usr/local/lib/python2.5/lib-dynload/collections.so
00d89000-00d97000 r-xp 00000000 03:03 1178660
/usr/local/lib/python2.5/lib-dynload/datetime.so
00d97000-00d9a000Aborted

Any suggestions?
Thanks,
Matt

Jul 24 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
ma*************@googlemail.com wrote:
I'm trying to use the _mssql module from
http://pymssql.sourceforge.net/. It works fine on Python 2.4. I've
just installed Python 2.5 Beta 2 on my Linux box and, whenever I try
and run the mssql.close() function, or close the program, I get the
following message:
[...]

You aren't using the same library you used with 2.4, by any chance?
Compiled extensions are specific to a particular major version of
Python, so (for example) 2.3 extension modules won't run under 2.4.
Though normally, IIRC, that would give you problems on import, so this
may be no help at all (in which case, sorry!)

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

Jul 24 '06 #2

P: n/a
Steve Holden wrote:
You aren't using the same library you used with 2.4, by any chance?
Compiled extensions are specific to a particular major version of
Python, so (for example) 2.3 extension modules won't run under 2.4.
Though normally, IIRC, that would give you problems on import, so this
may be no help at all (in which case, sorry!)
Steve,
I recompiled the library for the 2.5 version. If it makes a
difference, I used the altinstall option for python, so it's installed
as python2.5.

Thanks,
Matt

Jul 24 '06 #3

P: n/a
ma*************@googlemail.com wrote:
Steve Holden wrote:
>>You aren't using the same library you used with 2.4, by any chance?
Compiled extensions are specific to a particular major version of
Python, so (for example) 2.3 extension modules won't run under 2.4.
Though normally, IIRC, that would give you problems on import, so this
may be no help at all (in which case, sorry!)


Steve,
I recompiled the library for the 2.5 version. If it makes a
difference, I used the altinstall option for python, so it's installed
as python2.5.
Nope, sounds like you've done everything right. Sorry ...

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

Jul 24 '06 #4

P: n/a
ma*************@googlemail.com wrote:
I'm trying to use the _mssql module from
http://pymssql.sourceforge.net/. It works fine on Python 2.4. I've
just installed Python 2.5 Beta 2 on my Linux box and, whenever I try
and run the mssql.close() function, or close the program, I get the
following message:

*** glibc detected *** python2.5: free(): invalid pointer: 0xb7f08320
I'm assuming that you recompiled the extension, rather than installed
a binary built with a Python 2.4 installation.

Python 2.5 tightens the requirements that memory allocated via one
memory management API family must be released via calls through the
same API family - eg malloc() -free(); PyMem_Malloc() -PyMem_Free();
PyObject_Malloc() -PyObject_Free(). I think I recall something about
this in one of the "whats new" type docs.

A fair bit of code erroneously assumes that free() can be used to
release any block of memory, regardless of which API family was used to
allocate the memory. This code needs to be fixed.

--
-------------------------------------------------------------------------
Andrew I MacIntyre "These thoughts are mine alone..."
E-mail: an*****@bullseye.apana.org.au (pref) | Snail: PO Box 370
an*****@pcug.org.au (alt) | Belconnen ACT 2616
Web: http://www.andymac.org/ | Australia
Jul 24 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.