Re: [sqlite] iOS Watchdog and database corruption

2018-02-21 Thread Richard Hipp
On 2/21/18, Deon Brewis wrote: > I do. > > I'll have to request permission from the customer though to share it - who > will potentially be looking at the file? (Just so I can share names and > background with the customer to put him at ease). You can send corrupt database

Re: [sqlite] iOS Watchdog and database corruption

2018-02-21 Thread Deon Brewis
...@mailinglists.sqlite.org] On Behalf Of Jens Alfke Sent: Wednesday, February 21, 2018 9:19 AM To: SQLite mailing list <sqlite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] iOS Watchdog and database corruption > On Feb 21, 2018, at 7:45 AM, Simon Slavin <slav...@bigfraud.org> wrote:

Re: [sqlite] iOS Watchdog and database corruption

2018-02-21 Thread Jens Alfke
> On Feb 21, 2018, at 7:45 AM, Simon Slavin wrote: > > My concern was that it's abnormal for "sqlite3LeaveMutexAndCloseZombie" to > take five seconds to execute. As of a few weeks ago, I know all about this function ;-) It's called when the last statement is closed on

Re: [sqlite] iOS Watchdog and database corruption

2018-02-21 Thread Simon Slavin
On 21 Feb 2018, at 3:34pm, Deon Brewis wrote: > Yes, definitely the main thread - we close down the database during > applicationWillTerminate. It gives us 5 seconds to exit before it triggers > the watchdog. Okay, that all sounds right, and the dump you pasted suggested

Re: [sqlite] iOS Watchdog and database corruption

2018-02-21 Thread Stephen Chrzanowski
That number doesn't surprise me. At my company, one of our products is built around iPads. Airlines give their pilots 16-32GB iPads to bring into the cockpit to look at maps, charts, weather info, etc. The iPads essentially become EFB, or, Electronic Flight Bags. Compressed, we push two or

Re: [sqlite] iOS Watchdog and database corruption

2018-02-21 Thread Deon Brewis
Is it abnormal for sqlite3close to call sqlite3LeaveMutexAndCloseZombie? - Deon -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Simon Slavin Sent: Wednesday, February 21, 2018 7:23 AM To: SQLite mailing list <sqlite-users@mailing

Re: [sqlite] iOS Watchdog and database corruption

2018-02-21 Thread Simon Slavin
On 21 Feb 2018, at 2:35pm, Deon Brewis wrote: > The application got watchdog terminated by iOS because the main thread was > taking too long (waiting for the sqlite3close on the worker thread). The > resultant force close seems to have aborted SQLITE in such a way that it >

Re: [sqlite] iOS Watchdog and database corruption

2018-02-21 Thread Richard Hipp
On 2/21/18, Deon Brewis wrote: > > a) Is it expected that an app crash / force terminate in the middle of a > SQLITE3 checkpoint like this can cause corruption? No. See, for example, https://www.sqlite.org/atomiccommit.html and https://www.sqlite.org/wal.html and . If the