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 stopped working. The tracd that comes with Trac works fine, but mod_python under Apache 2.0.58 reports a serious problem:


[Thu Feb 01 08:49:14 2007] [notice] child pid 388 exit signal
Segmentation fault (11)

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:


cnx = sqlite.connect(path, detect_types=sqlite.PARSE_DECLTYPES,
check_same_thread=sqlite_version < 30301,
timeout=timeout)

which is located at SQLiteConnection.__init__ in trac/db/sqlite_backend.py. This is how sqlite got imported:


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

I have both pysqlite2 and sqlite3 installed. Remove pysqlite2 so that sqlite3 is imported as sqlite. It does the trick.

Advertisements
This entry was posted in SQLite, Trac. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s