Home Dashboard Directory Help
Search

SQL Server Compact Edition (SQL CE) hangs in SqlCeConnection.Close(), caused by GC.WaitForPendingFinalizers() by Rene Schulte


Status: 

Closed
 as Fixed Help for as Fixed


16
0
Sign in
to vote
Type: Suggestion
ID: 411912
Opened: 2/6/2009 3:33:29 AM
Access Restriction: Public
0
Workaround(s)
view

Description

Calling SqlCeConnection.Close() (or implicit through SqlCeConnection.Dispose()) could result in a deadlock of the calling Thread. This behavior is caused by GC.WaitForPendingFinalizers() in SqlCeConnection.Close(). GC.WaitForPendingFinalizers() waits for the GC-Finalizer-Thread to finalize all pending instances. There are a lot of circumstances, where it is not guaranteed that all finalizers will be terminating gracefully.

We encountered this problem in our application. As a result our whole application hangs!

See also http://social.msdn.microsoft.com/forums/en-US/sqlce/thread/40e82853-b8b7-4512-bdc5-0268f4fe6f15
Details
Sign in to post a comment.
Posted by Abby Fichtner on 11/26/2009 at 9:37 AM
When you say the fix is in the "2010 beta 2" do you mean SQL Server Compact 3.5 Service Pack 2 Beta 2 for Windows Desktop, which is available here?

http://www.microsoft.com/downloads/details.aspx?FamilyID=411ba1c5-ba57-45b6-9148-91bed6e7a9f1&displaylang=en

If not, could you provide a URL from where we can get the version you're referring to?
Posted by ChrisTypeR on 9/17/2009 at 1:48 AM
I have managed to work around this issue by using SQLite instead.
Posted by ChrisTypeR on 9/14/2009 at 1:07 AM
Any updates on this ? Is a public fix available ?
Posted by Microsoft on 8/5/2009 at 9:43 PM
Hello Rene Schulte,

We have analyzed the issue and the fix will be available in Dev10 Beta2 release of SQL Server Compact.

Thanks!
-Imran.
Posted by Nanda.Dodd on 7/30/2009 at 12:00 PM
Any updates on a fix for this bug. This happens in our application while using .NET table adpaters .Fill methods. Doesn't look like I can use your workaround, since the code is generated by the designer. A timeline would be great!!!
Posted by Amit Jhawar on 4/14/2009 at 7:13 PM
is there a tentative timeline when this bug will be fixed? any plans to release a hotfix for this bug?
Posted by Microsoft on 3/9/2009 at 6:33 AM
Thanks for the feedback. We have analyzed the issue and the fix will be available in the next release of SQL Server Compact.

Thanks and regards,
Imran.
Posted by Microsoft on 3/2/2009 at 4:13 AM
Hello Rene Schulte,

Thanks for reporting the issue with SQL Server Compact. We are analyzing the issue and will revert back to you with the finding of our analysis. If you would like an update on the status of the issue please post back to this thread.

Regards

Ambrish
Sign in to post a workaround.