Re: sqlite problems on Mac OS X 10.4
Jim Correia <[email protected]> Fri, 9 Sep 2005 21:23:45 -0400
| Newsgroups | gmane.mail.bogofilter.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sep 9, 2005, at 8:28 PM, David Relson wrote: >> 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. [...] > 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. Sorry if my words mislead you. I mean identical in frames, but not necissarily in values. The delay does vary, and as I mentioned above, if I change bf_sleep to always use 10 microseconds (so that the delay is short and the 60 tries will finish before the heat death of the universe :-) the first process fails, but the second stays stuck. Here is the output should it help (I'm not convinced yet it does.) [pid 22516] rand_sleep( 1000, 1000000, 771978 ) [pid 22518] rand_sleep( 1000, 1000000, 783260 ) [pid 22514] rand_sleep( 1000, 1000000, 794449 ) [pid 22517] rand_sleep( 1000, 1000000, 816122 ) [pid 22515] rand_sleep( 4000, 1000000, 864224 ) [pid 22516] rand_sleep( 1000, 1000000, 808307 ) [pid 22518] rand_sleep( 1000, 1000000, 617526 ) [pid 22514] rand_sleep( 1000, 1000000, 847870 ) [pid 22517] rand_sleep( 1000, 1000000, 470996 ) [pid 22515] retrying registration after avoided deadlock... [pid 22515] rand_sleep( 1000, 1000000, 851123 ) [pid 22517] rand_sleep( 1000, 1000000, 142326 ) [pid 22518] rand_sleep( 1000, 1000000, 332966 ) [pid 22517] rand_sleep( 1000, 1000000, 648343 ) [pid 22516] rand_sleep( 1000, 1000000, 993824 ) [pid 22514] rand_sleep( 1000, 1000000, 603911 ) [pid 22515] rand_sleep( 1000, 1000000, 334599 ) [pid 22518] rand_sleep( 1000, 1000000, 941545 ) [pid 22515] rand_sleep( 1000, 1000000, 414382 ) [pid 22517] rand_sleep( 1000, 1000000, 790668 ) [pid 22514] rand_sleep( 1000, 1000000, 270555 ) [pid 22515] rand_sleep( 1000, 1000000, 670936 ) [pid 22514] rand_sleep( 1000, 1000000, 959717 ) [pid 22516] rand_sleep( 1000, 1000000, 110237 ) [pid 22518] rand_sleep( 1000, 1000000, 570190 ) and so on for rand_sleep For this run there was only one "retrying registration". In some runs we don't get that message at all, in others 2 or 3 times. Thanks, Jim _______________________________________________ Bogofilter-dev mailing list [email protected] http://www.bogofilter.org/mailman/listinfo/bogofilter-dev