Menu

Import MySQLdb make python core dumped

Help
powerccna
2007-11-08
2012-09-19
  • powerccna

    powerccna - 2007-11-08

    I try to install MySQLdb on solaris several days, fortunately i install it successfully, but when i import MySQLdb module, it make python core dumped. below is my installation log.
    Could you do me a favour? My all latter work are based on this module,it is important for me.Thanks in advanced!

    #################################Build log

    Install log:

    root@Epeius # python setup.py build
    running build
    running build_py
    creating build
    creating build/lib.solaris-2.10-i86pc-2.3
    copying _mysql_exceptions.py -> build/lib.solaris-2.10-i86pc-2.3
    creating build/lib.solaris-2.10-i86pc-2.3/MySQLdb
    copying MySQLdb/init.py -> build/lib.solaris-2.10-i86pc-2.3/MySQLdb
    copying MySQLdb/converters.py -> build/lib.solaris-2.10-i86pc-2.3/MySQLdb
    copying MySQLdb/connections.py -> build/lib.solaris-2.10-i86pc-2.3/MySQLdb
    copying MySQLdb/cursors.py -> build/lib.solaris-2.10-i86pc-2.3/MySQLdb
    copying MySQLdb/release.py -> build/lib.solaris-2.10-i86pc-2.3/MySQLdb
    copying MySQLdb/times.py -> build/lib.solaris-2.10-i86pc-2.3/MySQLdb
    creating build/lib.solaris-2.10-i86pc-2.3/MySQLdb/constants
    copying MySQLdb/constants/init.py -> build/lib.solaris-2.10-i86pc-2.3/MySQLdb/constants
    copying MySQLdb/constants/CR.py -> build/lib.solaris-2.10-i86pc-2.3/MySQLdb/constants
    copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.solaris-2.10-i86pc-2.3/MySQLdb/constants
    copying MySQLdb/constants/ER.py -> build/lib.solaris-2.10-i86pc-2.3/MySQLdb/constants
    copying MySQLdb/constants/FLAG.py -> build/lib.solaris-2.10-i86pc-2.3/MySQLdb/constants
    copying MySQLdb/constants/REFRESH.py -> build/lib.solaris-2.10-i86pc-2.3/MySQLdb/constants
    copying MySQLdb/constants/CLIENT.py -> build/lib.solaris-2.10-i86pc-2.3/MySQLdb/constants
    running build_ext
    building '_mysql' extension
    creating build/temp.solaris-2.10-i86pc-2.3
    /sgnome/tools/x86-solaris/forte/SOS8/SUNWspro/bin/cc -i -xO4 -xspace -xstrconst -xpentium -mr -DANSICPP -DSTDC_VERSION=199409L -DNDEBUG -O -Dversion_info=(1,2,2,'final',0) -Dversion=1.2.2 -I/data/mysql-5.0.45-solaris10-i386/include -I/usr/sfw/include/python2.3 -c _mysql.c -o build/temp.solaris-2.10-i86pc-2.3/_mysql.o -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic
    cc: warning: -x target=generic' after last input file has no effect cc: unrecognized option-nofstore'
    cc: language pentium not recognized
    cc: _mysql.c: linker input file unused because linking not done
    /sgnome/tools/x86-solaris/forte/SOS8/SUNWspro/bin/cc -G build/temp.solaris-2.10-i86pc-2.3/_mysql.o -L/data/mysql-5.0.45-solaris10-i386/lib -lmysqlclient -lz -lposix4 -lresolv -lgen -lsocket -lnsl -lm -o build/lib.solaris-2.10-i86pc-2.3/_mysql.so
    cc: build/temp.solaris-2.10-i86pc-2.3/_mysql.o: No such file or directory
    error: command '/sgnome/tools/x86-solaris/forte/SOS8/SUNWspro/bin/cc' failed with exit status 1

    Because this compiler is difference. MySQL was compiled by Sun CC, i am using gcc, so i type this compliling command manually

    ########################################################################

    root@Epeius # /sgnome/tools/x86-solaris/forte/SOS8/SUNWspro/bin/cc -I/data/mysql-5.0.45-solaris10-i386/include -I/usr/sfw/include/python2.3 -c _mysql.c -o build/temp.solaris-2.10-i86pc-2.3/_mysql.o
    root@Epeius #
    root@Epeius # /sgnome/tools/x86-solaris/forte/SOS8/SUNWspro/bin/cc -G build/temp.solaris-2.10-i86pc-2.3/_mysql.o -L/data/mysql-5.0.45-solaris10-i386/lib -lmysqlclient -lz -lposix4 -lresolv -lgen -lsocket -lnsl -lm -o build/lib.solaris-2.10-i86pc-2.3/_mysql.so

    ###########################Below is core file log

    root@Epeius # python
    Python 2.3.3 (#1, Dec 16 2004, 14:38:56) [C] on sunos5
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import MySQLdb
    Segmentation Fault (core dumped)

    root@Epeius # cd /var/core

    root@Epeius # prstat core.python2.3.1194501034.26543
    prstat: illegal argument -- core.python2.3.1194501034.26543
    root@Epeius # prstack core.python2.3.1194501034.26543
    bash: prstack: command not found
    root@Epeius # pstack core.python2.3.1194501034.26543
    core 'core.python2.3.1194501034.26543' of 26543: python
    080732d9 PyDict_SetItem (81a7a44, 811e2a0, 0) + 7e
    08074d9d PyDict_SetItemString (81a7a44, fec68327, 0, 81199f4) + 33
    fec6770f init_mysql (80ad088, 8221c74, 0, fec67642, 0, 8045e58) + cd
    080ad576 _PyImport_LoadDynamicModule (81ab8b4, 81199f4, 0) + 82
    080ad0ec imp_load_dynamic (0, 81abe4c) + 64
    080c9dba PyCFunction_Call (8221c6c, 81abe4c, 0) + 15f
    0809b814 call_function (8045f08, 2) + 162
    08097de0 eval_frame (8188e04) + 9c6
    0809b91c fast_function (81a23e4, 8045fcc, 0, 0, 0) + ba
    0809b767 call_function (8045fcc, 0) + b5
    08097de0 eval_frame (818b454) + 9c6
    0809a997 PyEval_EvalCodeEx (81a1920, 81a7a44, 81a7a44, 0, 0, 0) + 60f
    08097416 PyEval_EvalCode (81a1920, 81a7a44, 81a7a44) + 1f
    080aabab PyImport_ExecCodeModuleEx (81ab834, 81a1920, 812e28c) + b5
    080c1fa1 zipimporter_load_module (8149acc, 81ab68c) + 144
    080c9dba PyCFunction_Call (815068c, 81ab68c, 0) + 15f
    08061031 PyObject_Call (815068c, 81ab68c, 0) + 1a
    0806120f PyObject_CallMethod (8149acc, 80d6a64, 80d6b54, 80465c0) + cb
    080abb6e load_module (80465c0, 0, 8046144, 9, 8149acc) + 49
    080ac86c import_submodule (80f1250, 80465c0, 80465c0) + c9
    080ac421 load_next (811238c, 80f1250, 80469c8, 80465b8, 80469bc) + d2
    080ac05b import_module_ex (0, 81a7b54, 81a7b54, 80f1250) + 3e
    080ac171 PyImport_ImportModuleEx (81ab974, 81a7b54, 81a7b54, 80f1250) + 1a
    08091daa builtinimport__ (0, 81aaaa4) + 4e
    080c9dba PyCFunction_Call (811abec, 81aaaa4, 0) + 15f
    08061031 PyObject_Call (811abec, 81aaaa4, 0) + 1a
    0809b593 PyEval_CallObjectWithKeywords (811abec, 81aaaa4, 0) + ae
    08097f6d eval_frame (81e0e2c) + b53
    0809a997 PyEval_EvalCodeEx (81a1660, 81a7b54, 81a7b54, 0, 0, 0) + 60f
    08097416 PyEval_EvalCode (81a1660, 81a7b54, 81a7b54) + 1f
    080aabab PyImport_ExecCodeModuleEx (81ab394, 81a1660, 819f364) + b5
    080c1fa1 zipimporter_load_module (8149acc, 813852c) + 144
    080c9dba PyCFunction_Call (81a39cc, 813852c, 0) + 15f
    08061031 PyObject_Call (81a39cc, 813852c, 0) + 1a
    0806120f PyObject_CallMethod (8149acc, 80d6a64, 80d6b54, 80470ac) + cb
    080abb6e load_module (80470ac, 0, 8046c38, 9, 8149acc) + 49
    080ac86c import_submodule (80f1250, 80470ac, 80470ac) + c9
    080ac3ee load_next (80f1250, 80f1250, 80474bc, 80470ac, 80474b0) + 9f
    080ac05b import_module_ex (0, 812979c, 812979c, 80f1250) + 3e
    080ac171 PyImport_ImportModuleEx (81ab3d4, 812979c, 812979c, 80f1250) + 1a
    08091daa builtin
    import__ (0, 813270c) + 4e
    080c9dba PyCFunction_Call (811abec, 813270c, 0) + 15f
    08061031 PyObject_Call (811abec, 813270c, 0) + 1a
    0809b593 PyEval_CallObjectWithKeywords (811abec, 813270c, 0) + ae
    08097f6d eval_frame (81e07b4) + b53
    0809a997 PyEval_EvalCodeEx (81a1220, 812979c, 812979c, 0, 0, 0) + 60f
    08097416 PyEval_EvalCode (81a1220, 812979c, 812979c) + 1f
    080b2278 run_node (8112380, 80cc034, 812979c, 812979c, 8047710) + 32
    080b1490 PyRun_InteractiveOneFlags (8111370, 80cc034, 8047710) + 14f
    080b131d PyRun_InteractiveLoopFlags (8111370, 80cc034, 8047710) + a6
    080b1231 PyRun_AnyFileExFlags (8111370, 80cc034, 0, 8047710) + 30
    0805c96c Py_Main (1, 8047750, 8047744, 805c27e, 1, 8047750) + 5b9
    0805c322 main (1, 8047750, 8047758) + e
    0805c27e ???????? (1, 8047828, 0, 804782f, 80478ad, 80478b4)
    root@Epeius #

    root@Epeius # gdb /usr/sfw/bin/python core.python2.3.1194501034.26543
    GNU gdb 6.6
    Copyright (C) 2006 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB. Type "show warranty" for details.
    This GDB was configured as "i386-pc-solaris2.10"...
    (no debugging symbols found)

    warning: core file may not match specified executable file.
    Reading symbols from /usr/lib/libresolv.so.2...(no debugging symbols found)...done.
    Loaded symbols for /usr/lib/libresolv.so.2
    Reading symbols from /usr/lib/libsocket.so.1...(no debugging symbols found)...done.
    Loaded symbols for /usr/lib/libsocket.so.1
    Reading symbols from /usr/lib/libnsl.so.1...(no debugging symbols found)...done.
    Loaded symbols for /usr/lib/libnsl.so.1
    Reading symbols from /usr/lib/librt.so.1...
    (no debugging symbols found)...done.
    Loaded symbols for /usr/lib/librt.so.1
    Reading symbols from /usr/lib/libdl.so.1...(no debugging symbols found)...done.
    Loaded symbols for /usr/lib/libdl.so.1
    Reading symbols from /usr/lib/libm.so.2...(no debugging symbols found)...done.
    Loaded symbols for /usr/lib/libm.so.2
    Reading symbols from /usr/lib/libc.so.1...
    (no debugging symbols found)...done.
    Loaded symbols for /usr/lib/libc.so.1
    Reading symbols from /usr/lib/libaio.so.1...(no debugging symbols found)...done.
    Loaded symbols for /usr/lib/libaio.so.1
    Reading symbols from /usr/lib/libmd5.so.1...(no debugging symbols found)...done.
    Loaded symbols for /usr/lib/libmd5.so.1
    Reading symbols from /usr/sfw/lib/python2.3/lib-dynload/time.so...
    (no debugging symbols found)...done.
    Loaded symbols for /usr/sfw/lib/python2.3/lib-dynload/time.so
    Reading symbols from /usr/sfw/lib/python2.3/lib-dynload/strop.so...(no debugging symbols found)...done.
    Loaded symbols for /usr/sfw/lib/python2.3/lib-dynload/strop.so
    Reading symbols from /usr/sfw/lib/python2.3/lib-dynload/itertools.so...(no debugging symbols found)...done.
    Loaded symbols for /usr/sfw/lib/python2.3/lib-dynload/itertools.so
    Reading symbols from /.python-eggs/MySQL_python-1.2.2-py2.3-solaris-2.10-i86pc.egg-tmp/_mysql.so...
    (no debugging symbols found)...done.
    Loaded symbols for /.python-eggs/MySQL_python-1.2.2-py2.3-solaris-2.10-i86pc.egg-tmp/_mysql.so
    Reading symbols from /data/mysql-5.0.45-solaris10-i386/lib/libmysqlclient.so.15...(no debugging symbols found)...done.
    Loaded symbols for /data/mysql-5.0.45-solaris10-i386/lib/libmysqlclient.so.15
    Reading symbols from /usr/lib/libgen.so.1...(no debugging symbols found)...done.
    Loaded symbols for /usr/lib/libgen.so.1
    Reading symbols from /usr/lib/libpthread.so.1...
    warning: Lowest section in /usr/lib/libpthread.so.1 is .dynamic at 00000074

    (no debugging symbols found)...done.
    Loaded symbols for /usr/lib/libpthread.so.1
    Reading symbols from /usr/lib/libthread.so.1...
    warning: Lowest section in /usr/lib/libthread.so.1 is .dynamic at 00000074
    (no debugging symbols found)...done.
    Loaded symbols for /usr/lib/libthread.so.1
    Reading symbols from /usr/lib/libscf.so.1...(no debugging symbols found)...done.
    Loaded symbols for /usr/lib/libscf.so.1
    Reading symbols from /usr/lib/libdoor.so.1...
    (no debugging symbols found)...done.
    Loaded symbols for /usr/lib/libdoor.so.1
    Reading symbols from /usr/lib/libuutil.so.1...(no debugging symbols found)...done.
    Loaded symbols for /usr/lib/libuutil.so.1
    Reading symbols from /usr/lib/libmp.so.2...(no debugging symbols found)...done.
    Loaded symbols for /usr/lib/libmp.so.2
    Reading symbols from /lib/ld.so.1...
    (no debugging symbols found)...done.
    Loaded symbols for /lib/ld.so.1
    Core was generated by `python'.
    Program terminated with signal 11, Segmentation fault.

    0 0x080732d9 in PyDict_SetItem ()

    (gdb)

    is it python's bug or MySQL's bug?

     
    • powerccna

      powerccna - 2007-11-08

      My OS: Solaris 5.10 X86
      here is my environment variable configuration about mysql:
      LD_INCLUDE_PATH="/data/mysql-5.0.45-solaris10-i386/include:/usr/include:
      LD_LIBRARY_PATH="/data/mysql-5.0.45-solaris10-i386/lib:/usr/lib
      LD_RUN_PATH="/export/home/jim/mysql-5.0.45-solaris10-sparc/lib"

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.