#58 Failure in MySQLdb.connect(), SEGV

MySQLdb-0.9.2
closed
Andy Dustman
MySQLdb (285)
5
2012-09-19
2003-06-26
M. J. Fromberger
No

Using MySQLdb 0.9.2 built from CVS (2003.06.26). Got a
clean build using the setup.py modifications described in
698202. However, the following failure occurs (some
details elided by <xx>):

>>> import MySQLdb
>>> c = MySQLdb.connect(db = '<xx>', unix_socket = '/
tmp/mysql.sock', passwd = '<xx>', user = '<xx>')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "MySQLdb/init.py", line 63, in Connect
return apply(Connection, args, kwargs)
File "MySQLdb/connections.py", line 116, in init
self.converter[types.StringType] = self.string_literal
TypeError: object does not support item assignment
>>> ^D
*** malloc[16605]: error for object 0x486290: Incorrect
checksum for freed object - object was probably modified
after being freed; break at szone_error
Segmentation fault

For reference, here is the version info for my freshly-
rebuilt installation of Python:

Python 2.3b1 (#1, Jun 26 2003, 09:38:28)
[GCC 3.1 20020420 (prerelease)] on darwin
Type "help", "copyright", "credits" or "license" for more
information.
>>> import sys
>>> sys.version
'2.3b1 (#1, Jun 26 2003, 09:38:28) \n[GCC 3.1 20020420
(prerelease)]
'
>>> sys.platform
'darwin'
>>> ^D

Is this due to interaction with Python 2.3?

Discussion

1 2 > >> (Page 1 of 2)
  • Andy Dustman
    Andy Dustman
    2003-07-07

    Logged In: YES
    user_id=71372

    Try current CVS or upcoming 0.9.3 test releases. I have not
    done any Python 2.3 testing yet.

     
  • Logged In: YES
    user_id=200992

    I just updated in CVS and re-built, but I get more or less the
    same problem -- just FYI.

     
  • Andy Dustman
    Andy Dustman
    2003-07-08

    Logged In: YES
    user_id=71372

    Can you try with MySQL-python-0.9.3a1 and Python-2.3b2? It
    may not matter but let me know what version of MySQL you are
    using as well.

     
  • Andy Dustman
    Andy Dustman
    2003-07-08

    Logged In: YES
    user_id=71372

    I could not replicate with Python 2.3b2, MySQL-4.0.13 on
    i386 with GCC 3.2.3. I did make some small changes to remove
    some warnings with Python 2.3, so you may try pulling the
    latest CVS version (newer than 0.9.3a1). I don't know if the
    warnings actually affected anything.

     
  • Rune Hansen
    Rune Hansen
    2003-07-09

    Logged In: YES
    user_id=814334

    MySQLdb from cvs , python2.3b2 - Darwin MacOSX 10.2.6

    >>> import MySQLdb
    >>> from MySQLdb import cursors
    >>> conn =
    MySQLdb.connect(db="xxx",host="xxx",user="xxx",passwd="xxx"
    ,cursorclass=cursors.DictCursor)
    >>> cur = conn.cursor()
    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py",
    line 92, in cursor
    return (cursorclass or self.cursorclass)(self)
    File "/usr/lib/python2.3/site-packages/MySQLdb/cursors.py", line
    36, in init
    self.errorhandler = connection.errorhandler
    AttributeError: Connection instance has no attribute 'errorhandler'

     
  • Logged In: YES
    user_id=200992

    Just did a test with Python 2.3b2 and MySQLdb 0.9.3a2, talking
    to MySQL 4.0.13 under MacOS X 10.2.6 (Darwin 6.6); results:

    >>> import MySQLdb
    >>> db = MySQLdb.connect(
    ... unix_socket = '/tmp/mysql.sock',
    ... user = '<xx>',
    ... passwd = '<yy>',
    ... db = '<zz>')
    Traceback (most recent call last):
    File "<stdin>", line 5, in ?
    File "/sw/lib/python2.3/site-packages/MySQLdb/init.py",
    line 63, in Connect
    return apply(Connection, args, kwargs)
    File "/sw/lib/python2.3/site-packages/MySQLdb/
    connections.py", line 116, in init
    self.converter[types.StringType] = self.string_literal
    TypeError: object does not support item assignment
    >>> ^D
    Segmentation fault

    Same basic issue. Any further info you want? I didn't build
    Python with debugging symbols, but I could probably run to
    failure in gdb and capture a stack trace, if that would help
    (though it looks at least partially memory-related, so the crash
    site could be remote from the problem site).

     
  • Rune Hansen
    Rune Hansen
    2003-07-14

    Logged In: YES
    user_id=814334

    MacOs X (darwin), Python2.3b2, latest CVS (mon 14.july 2003)
    Success! Cleaned out site-packages before build and install. Since
    my install from official MySQL.dmg installs to /usr/local/mysql I
    have to edit setup.py adding '/usr/local/mysql/lib & include' and
    removing '/sw..' else it complains about missing dirs.
    Thank you for your great work!

     
  • Andy Dustman
    Andy Dustman
    2003-07-15

    Logged In: YES
    user_id=71372

    Michael, can you confirm this?

     
  • Logged In: YES
    user_id=200992

    I'm sad to say that I cannot confirm it; I just now did a clean
    build (fresh download from CVS, cleaned out the old stuff from
    the site directory, built and installed anew). The same error
    occurs as transcripted in my last posting before this.

    I'm using Python2.3b2 and MySQL installed via Fink, so
    everything is under /sw.

     
  • Andy Dustman
    Andy Dustman
    2003-09-07

    Logged In: YES
    user_id=71372

    Can you guys try 0.9.3b2 with Python-2.3 (final)?

     
1 2 > >> (Page 1 of 2)