Thanks for the explanation, makes sense. We were using the new backup support but had to revert due to the access violations, was causing IIS to reset. The plan is to use the New Backup support once the access violation problem is solved. I'm still trying to reproduce and verify the problem is solved on our end with your fix in place.
Btw, on an unrelated note, the is there a reason the System.Data.Sqlite source files are not directly included by the System.Data.Sqlite.csproj file instead of using a targets file? Just makes it a pain to view or make changes to the source in visual studio. -----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Joe Mistachkin Sent: Monday, April 30, 2012 2:01 PM To: 'General Discussion of SQLite Database' Subject: Re: [sqlite] System.Data.SQLite and pooling problem Alexander Spence wrote: > > (I'm the one that filed the Sqlite Backup API Ticket.. Actually just merged > that code in and found the access violations.) > Are you using the new backup API support in the latest System.Data.SQLite release or some custom code? > > Your fix looks a lot better than global mutexes. If you don't mind explaining > since it's not obvious to me, what caused the race condition? > Thread 1 could be in the SQLite3.Close method, calling the SQLiteBase.ResetConnection method. Thread 2 could be in a GC thread, calling Dispose on the SQLiteConnectionHandle object, which ends up calling SQLiteConnectionHandle.ReleaseHandle, which calls SQLiteBase.CloseConnection (i.e. this has the potential to pull the rug out from under the SQLiteBase.ResetConnection method in the other thread). -- Joe Mistachkin _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users Please NOTE: This electronic message, including any attachments, may include privileged, confidential and/or inside information owned by Demand Media, Inc. Any distribution or use of this communication by anyone other than the intended recipient(s) is strictly prohibited and may be unlawful. If you are not the intended recipient, please notify the sender by replying to this message and then delete it from your system. Thank you. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users