I'm trying to solve a RedHat Enterprise Linux 4 issue where I have
built, from source, Python 2.5.2, mod_python v3.2.8, and SQLite 3.5.9.
SQLite works fine in the Python 2.5.2 interpreter, but when running from
mod_python (I also tried mod_wsgi), I get a segmentation fault in the
Python file Objects/dictobject.c:571 when running a query.

I would like to try SQLite version 3.4.2 to get to a known setup just to
verify the problem isn't being caused elsewhere.

Any ideas are welcome.
 

----------------
Python test code
----------------
 
"""\
This program verifies that mod_python is able to use the SQLite module
integrated into
Python.
"""
import sqlite3
 
from mod_python import apache
 
def handler(req):
    req.content_type = 'text/plain'
    req.send_http_header()
 
    # query SQLite3
    req.write('Opening database connection ')
    con = sqlite3.connect('/rh241/u01/TestWsgiPylons/test.db')
 
    req.write('[OK]\r\nQuerying database ')

    # ****THIS CAUSES A SEGMENTATION FAULT (see GDB snippet below)****
    cur = con.execute('select * from test')
 
    req.write('[OK]\r\nFetching result set')
    results = cur.fetchall()
    req.write('[OK]\r\n')
    req.write('Query results = ' + str(results) + '\n')
 

    return apache.OK

----------
GDB Output
----------
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1209055008 (LWP 25808)]
PyDict_GetItem (op=0x0, key=0xb7ce82cc) at Objects/dictobject.c:571
571             if (!PyDict_Check(op))
(gdb)



Thanks,
 
Eric Holmberg
Applications Engineer, Arrow Electronics
Engineering Solutions Center
Denver, Colorado
ESC:  877-ESC-8950, [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
Direct:  303-824-4537, [EMAIL PROTECTED]
 
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to