sqlite problems on Mac OS X 10.4
David Relson
relson at osagesoftware.com
Sat Sep 10 02:28:02 CEST 2005
On Fri, 9 Sep 2005 13:25:58 -0400
Jim Correia wrote:
...[snip]...
>
> Both have identical backtraces (easier to verify with only 2 :-):
>
> #0 0x9001efe8 in select ()
> #1 0x000161f4 in bf_sleep (delay=4) at system.c:58
> #2 0x0000dfdc in rand_sleep (min=1000, max=1000000) at rand_sleep.c:20
> #3 0x000157bc in busyhandler (dummy=0x4, count=0) at
> datastore_sqlite.c:247
> #4 0x9436b188 in sqlite3pager_pagecount ()
> #5 0x9436b520 in sqlite3pager_ref ()
> #6 0x9436cc4c in sqlite3pager_sync ()
> #7 0x94357ff8 in sqlite3BtreeSync ()
> #8 0x94380f30 in sqlite3VdbeSetColName ()
> #9 0x943812f0 in sqlite3VdbeHalt ()
> #10 0x9437ca80 in sqlite3VdbeExec ()
> #11 0x9437f26c in sqlite3_step ()
> #12 0x94385a0c in sqlite3_exec ()
> #13 0x00015420 in sqlexec (db=0x4, cmd=0x27b84 "COMMIT;") at
> datastore_sqlite.c:144
> #14 0x0000c804 in close_wordlists (commit=4) at wordlists.c:259
> #15 0x0000a130 in bogomain (argc=8, argv=0x0) at bogomain.c:80
> #16 0x00003324 in main (argc=8, argv=0xbffff6b0) at main.c:30
>
> If I hardcode bf_sleep to use 10 microseconds rather than the passed
> in value (in an attempt to make things complete faster) I get
>
> retrying registration after avoided deadlock...
> ...[repeat many times]
> retrying registration after avoided deadlock...
> retry count exceeded, giving up.
> #### Part 2 ####
>
> And we end up right back where we started.
>
> I'm willing to poke at the problem some more, but I'm not sure where
> to go next.
>
> Jim
Hi Jim,
Attached is a patch I used to show the sleep times generated in
rand_sleep(). Below is the output of "make check TESTS=t.lock3" (as
suggested my Matthias). Notice that the last column, which is the
random sleep period, varies. You've stated that your stack dumps
(backtraces) always show 4 as the sleep period. According to the code
in rand_sleep(), the sleep period should vary between min and max, i.e.
between 1000 and 100000. A value of "4" isn't possible.
Can you verify apply my patch and verify that you all 4's? If you get
_any_ values under 1000 (or over 100000), then focus on function
rand_sleep() and see what you can learn.
HTH,
David
[pid 20076] rand_sleep( 1000, 1000000, 167566 )
[pid 20070] rand_sleep( 1000, 1000000, 4557 )
[pid 20070] rand_sleep( 1000, 1000000, 144058 )
[pid 20072] rand_sleep( 1000, 1000000, 810708 )
[pid 20074] rand_sleep( 1000, 1000000, 529385 )
[pid 20076] rand_sleep( 1000, 1000000, 160993 )
[pid 20070] rand_sleep( 1000, 1000000, 867595 )
[pid 20076] rand_sleep( 1000, 1000000, 989339 )
[pid 20072] rand_sleep( 1000, 1000000, 834882 )
[pid 20070] rand_sleep( 1000, 1000000, 931485 )
[pid 20072] rand_sleep( 1000, 1000000, 243249 )
[pid 20070] rand_sleep( 1000, 1000000, 165125 )
[pid 20070] rand_sleep( 1000, 1000000, 874371 )
[pid 20084] rand_sleep( 1000, 1000000, 359941 )
[pid 20086] rand_sleep( 1000, 1000000, 990229 )
[pid 20082] rand_sleep( 4000, 1000000, 974373 )
[pid 20088] rand_sleep( 1000, 1000000, 606017 )
[pid 20090] rand_sleep( 1000, 1000000, 765408 )
[pid 20090] rand_sleep( 1000, 1000000, 848763 )
[pid 20088] rand_sleep( 1000, 1000000, 968581 )
[pid 20082] retrying registration after avoided deadlock...
[pid 20082] rand_sleep( 4000, 1000000, 936203 )
[pid 20088] rand_sleep( 1000, 1000000, 657644 )
[pid 20082] retrying registration after avoided deadlock...
[pid 20082] rand_sleep( 4000, 1000000, 242178 )
[pid 20082] retrying registration after avoided deadlock...
[pid 20082] rand_sleep( 4000, 1000000, 431650 )
[pid 20082] retrying registration after avoided deadlock...
[pid 20082] rand_sleep( 4000, 1000000, 561773 )
[pid 20082] retrying registration after avoided deadlock...
PASS: t.lock3
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.rand_sleep.txt
URL: <https://www.bogofilter.org/pipermail/bogofilter-dev/attachments/20050909/019a5724/attachment.txt>
More information about the bogofilter-dev
mailing list