[DBD-SQLite] Re: [sqlite] ANN - DBD::SQLite version

Stefan Evert stefan.evert at collocations.de
Thu Apr 9 17:01:42 GMT 2009


>> However, I played around a little with the source code and came a
>> little closer to tracking down the source of the segfaults.  Perhaps
>> the SQLite gurus can help us out from here?
>
> I saw that you are on the SQLite list as well and you seem to know  
> what
> you are talking about when it comes to C code debugging. Could you
> explain your findings there -- perhaps after your trip?
> If I can be of any help I am willing to do what is within my  
> capability
> but I don't know any C at all.

Oops, I'm afraid my report was a bit premature.  After rebooting my  
system (I didn't expect _that_ to be a factor, either :-), the  
behaviour changed from crashing for error messages exceeding 22  
characters to crashing for any error message at all.  Plus, I could  
sometimes avoid the crashes by running the test script from a debugger  
(gdb).

There's a good quote from Richard Hipp about this kind of behaviour:

<quote>
Of course, I wasted 4 hours tracking the problem down.....  This is  
yet another episode that demonstrates how threads are a pernicious  
evil that should be studiously avoided in any program that you  
actually want to work.  Threads cause hard-to-trace bugs.  Threads  
result in non-deterministic behavior.  Threads make programs run  
slower.  Just say "No" to threads ...
</quote>

It turned out that the crashes are triggered by a Perl interpreter  
with threading support, which in turn causes DBD::SQLite to compile  
the SQLite source code in threadsafe mode.  Manually adding "- 
DTHREADSAFE=0" to the compile options fixed the problem, and the  
entire test suite was passed successfully.

The good news is that the newly released version 1.22_02 of  
DBD::SQLite works out of the box on both platforms I have access to  
(Mac OS X 10.5.6 / Intel and Debian Linux 64-bit).  Possibly related  
to some bug fixes in SQLite 3.6.12?

Anyway, thanks for your great work on DBD::SQLite, Darren!  Looks like  
we've got a fully functional and up-to-date version now, at least on  
my platforms.

Best wishes,
Stefan





More information about the DBD-SQLite mailing list