Skip to content
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

invalid transaction handle with aborted threads [DNET910] #837

Open
firebird-automations opened this issue Oct 22, 2019 · 3 comments
Open

Comments

@firebird-automations
Copy link

Submitted by: Christian Mayer (byzo_mc)

Attachments:
FirebirdInvalidTransactionHandle.zip

Hi,

we migrated our project from version 2.6.5.1 to 7.1.1.0.
After that we get this exception in a multithreaded environment with the use of thread abortion.

FirebirdSql.Data.FirebirdClient.FbException (0x80004005): invalid transaction handle (expecting explicit transaction start) ---> invalid transaction handle (expecting explicit transaction start)
bei FirebirdSql.Data.FirebirdClient.FbTransaction.Dispose(Boolean disposing)
bei System.Data.Common.DbTransaction.Dispose()
bei FirebirdSql.Data.FirebirdClient.FbCommand.RollbackImplicitTransaction()
bei FirebirdSql.Data.FirebirdClient.FbCommand.CommitImplicitTransaction()
bei FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteScalar()

It seems that the unfinished implicit transaction is carried to the next connection through connection pooling.
A sample project is attached.
The remaining connection in the thread pool is unusable then.

@firebird-automations
Copy link
Author

Commented by: Christian Mayer (byzo_mc)

Example project

@firebird-automations
Copy link
Author

Modified by: Christian Mayer (byzo_mc)

Attachment: FirebirdInvalidTransactionHandle.zip [ 13392 ]

@firebird-automations
Copy link
Author

Modified by: Christian Mayer (byzo_mc)

description: We get this exception in a multithreaded environment with the use of thread abortion.

FirebirdSql.Data.FirebirdClient.FbException (0x80004005): invalid transaction handle (expecting explicit transaction start) ---> invalid transaction handle (expecting explicit transaction start)
bei FirebirdSql.Data.FirebirdClient.FbTransaction.Dispose(Boolean disposing)
bei System.Data.Common.DbTransaction.Dispose()
bei FirebirdSql.Data.FirebirdClient.FbCommand.RollbackImplicitTransaction()
bei FirebirdSql.Data.FirebirdClient.FbCommand.CommitImplicitTransaction()
bei FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteScalar()

It seems that the unfinished implicit transaction is carried to the next connection through connection pooling.
The remaining connection in the thread pool is unusable then.

=>

Hi,

we migrated our project from version 2.6.5.1 to 7.1.1.0.
After that we get this exception in a multithreaded environment with the use of thread abortion.

FirebirdSql.Data.FirebirdClient.FbException (0x80004005): invalid transaction handle (expecting explicit transaction start) ---> invalid transaction handle (expecting explicit transaction start)
bei FirebirdSql.Data.FirebirdClient.FbTransaction.Dispose(Boolean disposing)
bei System.Data.Common.DbTransaction.Dispose()
bei FirebirdSql.Data.FirebirdClient.FbCommand.RollbackImplicitTransaction()
bei FirebirdSql.Data.FirebirdClient.FbCommand.CommitImplicitTransaction()
bei FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteScalar()

It seems that the unfinished implicit transaction is carried to the next connection through connection pooling.
A sample project is attached.
The remaining connection in the thread pool is unusable then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants