Re: [sqlite] Crash - How can I tell if sqlite is compiled threadsafe?

2005-12-06 Thread Henry Miller



On 12/6/2005 at 15:29 [EMAIL PROTECTED] wrote:
>
>This assertion failure inside of sqliteOsEnterMutex indicates
>that the program was probably not compiled THREADSAFE.  That 
>assert() statement was put there specifically to catch this
>kind of problem.  (Good thing you didn't compile with -DNDEBUG
>to disable assert() statements - if the program had continued
>the consequences could have been a corrupted database rather
>than just a program crash.)

Thank you.   

Moving to THREADSAFE solved this problem.  (Now I just get to correct
the rest of the bugs in my code)



Re: [sqlite] Crash - How can I tell if sqlite is compiled threadsafe?

2005-12-06 Thread drh
"Henry Miller" <[EMAIL PROTECTED]> wrote:
> Greeting,
> 
> I'm using sqlite 2.8.16 in a threaded programs.We have been seeing
> crashes when opening databases, and it looks like two threads are
> trying to open databases at the same time.  We know that whoever
> compiled sqlite was told to define THREADSAFE, but we do not know if
> that was done.So the first question is how do we know if sqlite was
> compiled with THREADSAFE (if there is a way to tell). 
> 
> 
> Thread 0:   (opens from python)
> 
> #5  0x282c3713 in __assert () from /lib/libc.so.5
> #6  0x2868e627 in sqliteOsEnterMutex () from

This assertion failure inside of sqliteOsEnterMutex indicates
that the program was probably not compiled THREADSAFE.  That 
assert() statement was put there specifically to catch this
kind of problem.  (Good thing you didn't compile with -DNDEBUG
to disable assert() statements - if the program had continued
the consequences could have been a corrupted database rather
than just a program crash.)
--
D. Richard Hipp <[EMAIL PROTECTED]>