python2.3-sqlite: on importing sqlite from python, the script dies from a Segmentation fault
Bug #7539 reported by
Debian Bug Importer
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-sqlite (Debian) |
Fix Released
|
Unknown
|
|||
python-sqlite (Ubuntu) |
Invalid
|
High
|
Unassigned |
Bug Description
Automatically imported from Debian bug report #267082 http://
Changed in python-sqlite: | |
status: | Unknown → Fix Released |
To post a comment you must log in.
Hi,
Thanks for the report.
alexs <email address hidden> writes:
> on importing SQLite module in python the program dies from a
> Segmentation fault. strace suggest it may be to do with the math
> module, but the math module by itself load fine.
>
> the minimum script for it to break is
>
> #!/usr/bin/python
> import sqlite
I can't reproduce this.
However, I recognize the error; I've seen it before. It happened when 3-egenix- mxdatetime, it started
I was packaging the newest version (2.0.5) of python-egenix-*. After
installing the new packages, python-sqlite segfaulted exactly like it
did for you. After removing python2.
working again, so it seems to be connected to PySQLite's use of
mxDateTime. But I was able to work around the problem (without knowing
the exact cause of it) in python-egenix-*, so the 2.0.5-1 packages
seem to work OK.
Here is a demo build of python2. 3-egenix- mx{tools, datetime} that makes
python-sqlite crash in the above mentioned way:
http:// joel.rosdahl. net/tmp/ python2. 3-egenix- mxtools_ 2.0.5-1+ segfaultdemo_ i386.deb joel.rosdahl. net/tmp/ python2. 3-egenix- mxdatetime_ 2.0.5-1+ segfaultdemo_ i386.deb
http://
So: Do you by any chance have python2. 3-egenix- mxdatetime installed,
and if so, what version? Or a local build of it?
Does the sqlite module start working again if you apply the following
patch?
======= ======= ======= ======= ======= ======= ======= ======= ======= ======= python2. 3/site- packages/ sqlite/ main.py~ 2004-07-04 00:24:18.000000000 +0200 python2. 3/site- packages/ sqlite/ main.py 2004-08-20 19:31:51.000000000 +0200
--- /usr/lib/
+++ /usr/lib/
@@ -4,11 +4,12 @@
import copy, new, sys, weakref
from types import *
-try:
- from mx import DateTime
- have_datetime = 1
-except ImportError:
- have_datetime = 0
+#try:
+# from mx import DateTime
+# have_datetime = 1
+#except ImportError:
+# have_datetime = 0
+have_datetime = 0
if have_datetime: ======= ======= ======= ======= ======= ======= ======= ======= =======
# Make the required Date/Time constructor visable in the PySQLite module.
=======
Joel
--
Joel Rosdahl <email address hidden>
Key BB845E97; fingerprint 9F4B D780 6EF4 5700 778D 8B22 0064 F9FF BB84 5E97