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
Random bug in finalizing DbCommands [DNET582] #551
Comments
Commented by: Hennadii Zabula (zabulus) Forgot to mention the exception, that occurs Exception object: 00000000039081f0 StackTraceString: <none> |
Commented by: Hennadii Zabula (zabulus) my suggestion, that connection.InnerConnection is null or/and disposed when finalization performs. |
Commented by: Hennadii Zabula (zabulus) Reproduced again in our production environment after several days working. |
Modified by: @cincuranetstatus: Open [ 1 ] => In Progress [ 3 ] |
Commented by: @cincuranet Does this only happen in embedded or also when running against server? |
Modified by: @cincuranet |
Modified by: @cincuranet |
Modified by: @cincuranetstatus: In Progress [ 3 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: vNext - Finalizers [ 10807 ] |
Submitted by: Hennadii Zabula (zabulus)
Is related to DNET684
Is related to DNET698
Several times I've experienced randomly reproduced bug. It has some different symptoms: OOM, unhandled crash and so on.
But all this times I had the same stack:
000000001b56edb0 00000000773a186a [FaultingExceptionFrame: 000000001b56edb0]
000000001b56f300 000007fe9a9920b0 FirebirdSql.Data.FirebirdClient.FbCommand.Release() [*\FirebirdSql.Data.FirebirdClient\FirebirdClient\FbCommand.cs @ 821]
000000001b56f340 000007fe9a9a47f5 FirebirdSql.Data.FirebirdClient.FbCommand.Dispose(Boolean) [*\FirebirdSql.Data.FirebirdClient\FirebirdClient\FbCommand.cs @ 384]
000000001b56f3a0 000007fef71cc8da System.ComponentModel.Component.Finalize()
000000001b56f798 000007fef9479d56 [DebuggerU2MCatchHandlerFrame: 000000001b56f798]
It is locally built library so I'll provide lines referred above:
FbCommand.cs @ 821
if (this.connection != null && this.connection.State == ConnectionState.Open)
{
this.connection.InnerConnection.RemovePreparedCommand(this);
}
FbCommand.cs @ 384
try
{
// Release any unmanaged resources
this.Release();
I've added crutch to the FbCommand.Release method as in other places, just handle exception without any code. But I think it is not the best way to fix it.
Don't you think that catching swallowing exceptions in dispose methods is a bad way to handle errors?
The text was updated successfully, but these errors were encountered: