| Previous | Next |
| ERROR_LOG_BLOCKS_EXHAUSTED | ERROR_LOG_RESTART_INVALID |
ERROR_LOG_READ_CONTEXT_INVALID
A CLFS read sequence is using an invalid context
ReadLogRecord starts a read sequence and returns an opaque read context; ReadNextLogRecord uses that context to continue according to the selected traversal mode. TerminateReadLog frees the resources associated with the context, and Microsoft warns not to continue reading after termination. Restart-area reads also return their own read contexts for traversing earlier restart records. These contexts are stateful handles to an active CLFS read sequence, not durable cursors that can be serialized or reused later.
Audit ownership and lifetime of the context passed to the failing call. Look for double termination, use-after-cleanup, mixing a restart context with a data-record path, or storing the context beyond the lifetime of its marshalling area. In kernel-mode CLFS documentation, read contexts are not thread-safe, so callers must serialize access. Reusing only the last LSN is safer than retaining an opaque context across component restarts: begin a new ReadLogRecord sequence from a currently valid LSN.
What to inspect
- Trace context creation, each ReadNext call, and the exact TerminateReadLog site.
- Verify the context came from the same read family and marshalling area used by the failing operation.
- Serialize access to a read context and recreate the sequence instead of reusing a terminated context.
References
- Microsoft: ReadLogRecord and CLFS read context modes
- Microsoft: ReadLogRestartArea and restart read contexts
- Microsoft: clfsw32 API reference
Looking for a different code? Search another status or error code.