| Previous | Next |
| ERROR_LOG_PINNED_RESERVATION | ERROR_TRANSACTION_NOT_ACTIVE |
ERROR_INVALID_TRANSACTION
KTM rejected the transaction handle before processing the operation
ERROR_INVALID_TRANSACTION belongs to the Windows Kernel Transaction Manager transaction-processing model. KTM exposes transactions as kernel objects accessed through handles. CreateTransaction creates the object, OpenTransaction can obtain another handle by transaction identifier, and commit or rollback functions act on that transaction object. This error means the operation did not receive a handle that KTM can use as a transaction. It is therefore more specific than a transaction that has already chosen an abort outcome: the object reference itself is invalid for the requested KTM call.
Trace handle ownership and lifetime at the API boundary. A wrapper can accidentally pass a resource-manager, enlistment, file, or already-closed handle because all native handles share the same scalar representation in user mode. Also inspect concurrent cleanup: closing a transaction while another thread still queues work against the handle can turn a valid creation path into an invalid-use race. Record the transaction ID immediately after creation and log the exact handle type in wrapper code instead of diagnosing only the final GetLastError value.
What to inspect
- Verify the handle came from CreateTransaction or OpenTransaction.
- Check for CloseHandle races and handle-value reuse by unrelated kernel objects.
- Keep transaction, transaction-manager, resource-manager, and enlistment handles in distinct typed wrappers.
References
- Microsoft: KTM programming model and transaction handles
- Microsoft: KTM transaction, TM, RM, and enlistment functions
- Microsoft: KTM object model
Looking for a different code? Search another status or error code.
