-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deadlock in System.Data.SqlClient reproduced only on Unix #22
Comments
As a precision, it seems that ExecuteSqlBatch:
OnTimeout
We haven't been able to figure out why it's happening so often in our environment and why only on Linux, but this is clearly a deadlock condition. |
It only happens on Linux because windows and Linux don't use the same |
I've tried to look through this and the locking and callback behaviour in there is giving me a major headache. I suspect the "easy" fix is to I thought locking |
As recently announced in the .NET Blog, focus on new SqlClient features an improvements is moving to the new Microsoft.Data.SqlClient package. For this reason, we are moving this issue to the new repo at https://github.com/dotnet/SqlClient. We will still use https://github.com/dotnet/corefx to track issues on other providers like System.Data.Odbc and System.Data.OleDB, and general ADO.NET and .NET data access issues. |
@crntn , I am following up on this issue to see if you still facing the problem and if the answer is yes, can you kindly provide use a repro please? It makes it easier to investigate while we are looking in the same code. |
Hi @crntn , Thanks, |
Hi !
We hit a deadlock in System.Data.SqlClient (4.5.1) when running on Unix.
The deadlock is random but we run into it quite often, we don't reproduce on windows.
Thanks to the work done for https://github.com/dotnet/coreclr/issues/20803 we were able to use the command syncblk on my unix memory dump.
It looks like OnTimeout (https://github.com/dotnet/corefx/blob/master/src/System.Data.SqlClient/src/System/Data/SqlClient/TdsParserStateObject.cs#L2166)
kicks-in in the middle of ExecuteSqlBatch ( https://github.com/dotnet/corefx/blob/master/src/System.Data.SqlClient/src/System/Data/SqlClient/TdsParser.cs#L6934 and
https://github.com/dotnet/corefx/blob/master/src/System.Data.SqlClient/src/System/Data/SqlClient/TdsParser.cs#L7018)
Unfortunately we're not sure what approach to take regarding this deadlock, any help would be welcome !
Cheers
Here are some info we gathered that might be of help.
Let me know if more is needed.
The text was updated successfully, but these errors were encountered: