Connection Pool Returns Same Exception Instance from Two Threads using Identical Bad Connection String - by John Saunders

Status : 


Sign in
to vote
ID 522506 Comments
Status Active Workarounds
Type Bug Repros 3
Opened 12/29/2009 6:21:26 PM
Access Restriction Public


This is a boiled-down version of

Two theads, at almost the same time, open a connection using the identical connection string. This string is bad, in the example, it's opening "AdventureWorksX" database, which does not exist.

In this case, it appears that the identical instance of Exception class is being thrown to both threads, resulting in confusion to the reader.

Sometimes, the StackTrace property of the exception is corrupted, showing stack trace entries from both threads.

Commenting out either of the Thread.Start calls produces a totally different stack trace, in a way that suggests that the connection pool was not involved.
Sign in to post a comment.
Posted by John Saunders on 11/5/2011 at 2:38 PM
This issue was brought to my attention again in, so I was wondering if a release has been determined for this fix.
Posted by Microsoft on 4/22/2010 at 1:36 PM

Thanks for reporting this issue. We investigated the problem and it is indeed a bug in our product. We will release the fix for this bug in a future release.


Young Gah Kim
Development Lead
ADO.Net Managed Providers Team

Posted by Microsoft on 12/29/2009 at 11:27 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Thank you