chornbeak / pyodbc

Automatically exported from code.google.com/p/pyodbc
MIT No Attribution
0 stars 0 forks source link

segfault when attempting to establish ODBC connection #310

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

  import pyodbc; pyodbc.connect(...)

What version of the product are you using? On what operating system?

  pyodbc 3.0.6, installed from pip; I just cloned the latest version from the Git repository with the same results

Please provide any additional information below.

(gdb) backtrace
#0  0x00007ffff7aa084e in PyDict_SetItem () from /usr/lib/libpython2.7.so.1.0
#1  0x00007ffff69bec09 in GetConnectionInfo(_object*, Connection*) ()
   from /usr/lib/python2.7/site-packages/pyodbc.so
#2  0x00007ffff69be669 in Connection_New(_object*, bool, bool, bool, long, 
bool) ()
   from /usr/lib/python2.7/site-packages/pyodbc.so
#3  0x00007ffff69b734f in mod_connect(_object*, _object*, _object*) ()
   from /usr/lib/python2.7/site-packages/pyodbc.so
#4  0x00007ffff7afe05a in PyEval_EvalFrameEx () from 
/usr/lib/libpython2.7.so.1.0
#5  0x00007ffff7afeedd in PyEval_EvalCodeEx () from /usr/lib/libpython2.7.so.1.0
#6  0x00007ffff7afefb2 in PyEval_EvalCode () from /usr/lib/libpython2.7.so.1.0
#7  0x00007ffff7b17eea in run_mod () from /usr/lib/libpython2.7.so.1.0
#8  0x00007ffff7b18ce2 in PyRun_FileExFlags () from /usr/lib/libpython2.7.so.1.0
#9  0x00007ffff7b196fb in PyRun_SimpleFileExFlags () from 
/usr/lib/libpython2.7.so.1.0
#10 0x00007ffff7b2a9f2 in Py_Main () from /usr/lib/libpython2.7.so.1.0
#11 0x00007ffff747aa15 in __libc_start_main () from /usr/lib/libc.so.6
#12 0x0000000000400741 in _start ()

Original issue reported on code.google.com by b...@bendmorris.com on 18 Feb 2013 at 10:29

GoogleCodeExporter commented 8 years ago
I'm using Python 2.7.3 on Arch Linux and unixodbc.

Original comment by b...@bendmorris.com on 18 Feb 2013 at 10:41

GoogleCodeExporter commented 8 years ago
I'm able to use pyodbc sometimes without it segfaulting, but I haven't been 
able to figure out what's making the difference.

Running this file:

  https://raw.github.com/bendmorris/rdf-treestore/master/treestore.py

works fine, and afterward I can create a pyodbc connection with no problem. 
Otherwise, running the same connection line from the creation of the Treestore 
class in that file gives me a segfault.

Original comment by b...@bendmorris.com on 18 Feb 2013 at 10:51

GoogleCodeExporter commented 8 years ago
I'm still doing some detective work. Importing part of BioPython with the line 
"import Bio.Phylo" prevents the segfault for some reason.

Original comment by b...@bendmorris.com on 18 Feb 2013 at 10:59

GoogleCodeExporter commented 8 years ago
Can you reproduce this in a script with just pyodbc?  I'm not suggesting it 
isn't pyodbc, but it would greatly simplify researching this.

Original comment by mkleehammer on 28 Mar 2013 at 10:21

GoogleCodeExporter commented 8 years ago
The problem occurs in a script with just two lines:

import pyodbc
con = pyodbc.connect("DSN=Virtuoso;UID=dba;PWD=dba")

For some reason adding a BioPython import first prevents the segfault, but 
otherwise it happens. I wasn't able to figure out why this is.

Original comment by b...@bendmorris.com on 28 Mar 2013 at 10:36