Debugging Trac
After a series of upgrading on my PowerBook:
- Trac 0.9.6 to 0.11dev
- Python 2.4 to 2.5
- Subversion 1.3.2 to 1.4.2
- SQLite 2.8.x to 3.3.5
My Trac database has been upgraded to SQLite 3. I've also recompiled mod_python a few times, with different options each time. Still Segmentation fault. As a last resort, I inserted a bunch of apache.log_error into Trac source code to nail down the line at fault:
[Thu Feb 01 08:49:14 2007] [notice] child pid 388 exit signal
Segmentation fault (11)
which is located at SQLiteConnection.__init__ in trac/db/sqlite_backend.py. This is how sqlite got imported:
cnx = sqlite.connect(path, detect_types=sqlite.PARSE_DECLTYPES,
check_same_thread=sqlite_version < 30301,
timeout=timeout)
I have both pysqlite2 and sqlite3 installed. Remove pysqlite2 so that sqlite3 is imported as sqlite. It does the trick.
try:
import pysqlite2.dbapi2 as sqlite
have_pysqlite = 2
except ImportError:
try:
import sqlite3 as sqlite
have_pysqlite = 2
except ImportError:
try:
import sqlite
have_pysqlite = 1
except ImportError:
have_pysqlite = 0
Comments