SQL Server 2022 CU27 (16.0.4295.3): Assertion at recovery.cpp:15949 (lp->GetOpCode () != LOP_NULL) and logrec.cpp:136 (Unclassifed log op) on spid47s

Darren Chow Fei 0 Reputation points
2026-11-30T08:13:27.24+00:00

We are hitting recurring SQL Server assertion failures on sqlservr.exe (PID 9044, TID 9064, SPID 47 / spid47s) running SQL Server 2022 CU27 (16.0.4295.3, branch sql2022_rtm_qfe-cu27) on Windows Server x64. This same assertion pattern occurred on RTM prior to upgrading to CU27 and continues after patching.

What Happens in the Error Log

Around 2026-11-29 15:35:55–15:35:56, spid47s generated multiple dumps (SQLDump0064–SQLDump0066) within roughly two seconds:

  1. First assertion (recovery.cpp:15949):
    • Error 17066, Severity 16, State 1: SQL Server Assertion: File: <recovery.cpp>, line=15949 Failed Assertion = 'lp->GetOpCode () != LOP_NULL'. This error may be timing-related.
    • Error 3624, Severity 20, State 1: A system assertion check has failed. Check the SQL Server error log for details.
  2. Follow-up assertion (logrec.cpp:136):
    • Immediately afterward on the same SPID/thread (EC = 0x0000025BE8203D10, Connection = 0x0000025BE8203CA0): Location: "Sql\\Ntdbms\\storeng\\logrec\\logrec.cpp":136 Expression: 0 Description: Unclassifed log op

No database name or database ID was printed immediately preceding the spid47s dump entries in ERRORLOG.

Call Stack Summary (SQLDump0064)

The call stack on the faulting thread goes through HadrWorkItem::Execute -> DBMgr::RunRollbackRecovery -> RecoveryUnit::DoAsyncRecovery -> RecoveryUnit::RedoWorker -> RecoveryMgr::MoveUpRedo, and then into DumpLogForFailures -> DumpLog::Execute -> DumpLogRecord::Format -> LogRec::GetTotalLength -> LogRec::HasVarLogData -> utassert_fail -> CDmpDump::Dump.

Environment & Checks So Far

  • SQL Server Build: 16.0.4295.3 (SQL Server 2022 CU27, x64 Release GoldenBits)
  • Dump Type: Minidump (SQL Dumper Flags: 0x460, MINIDUMP_TYPE: 0x221164, filtered/non-full dump)
  • Behavior Across Builds: Occurred multiple times on RTM and still reproduces after patching to CU27.

Questions for the Community / Microsoft Engineers

  1. What typically triggers lp->GetOpCode () != LOP_NULL at recovery.cpp:15949 followed by Unclassifed log op at logrec.cpp:136 during recovery/redo (MoveUpRedo / RedoWorker / HadrWorkItem)?
  2. Since this persisted from RTM through CU27, are there known edge cases, log/redo/HADR conditions, or storage/I/O/filter-driver behaviors that cause a LOP_NULL log record during recovery?
  3. What specific DMVs, Extended Events, or diagnostic steps do you recommend to pinpoint the exact database and log record/LSN involved when ERRORLOG does not show the database name?
SQL Server Database Engine

2 answers

Sort by: Most helpful
  1. Erland Sommarskog 138K Reputation points MVP Volunteer Moderator
    2026-11-30T14:08:58.4+00:00

    Generally, an assertion check is a check that the developers has added of an assumption that they make at the place in this code. If this assumption is wrong, the code that follows would not be correct and to prevent further accidents, they terminate execution.

    Typically, all crashes that leads to termination of the process can be construed as bugs in the product, although they could be triggered by corruption or faulty hardware. It is very difficult to troubleshoot this on your own, and the best remedy is to open a support case. Obviously, here it helps if you have a support contract.

    Trying to troubleshoot this on your own would be tedious.

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-11-30T08:15:07.04+00:00

    This recurring recovery assertion on CU27 requires a Microsoft support case with the existing dumps; first correlate it to an AG database and redo position, because the assertion text alone does not establish whether the cause is an engine defect, damaged log content, an external filter/module, or hardware/I/O corruption.

    What the assertion establishes

    The stack shows that a HADR recovery worker encountered a log record it could not classify while applying or formatting redo. Recovery uses transaction-log records to roll changes forward, and every record normally has an operation and LSN.^1^

    lp->GetOpCode() != LOP_NULL followed by Unclassifed log op is therefore consistent with an internal log-record validation failure. It does not, by itself, prove that a literal LOP_NULL was persisted to disk or identify its cause. Microsoft lists these general assertion causes:

    • SQL Server product defect
    • Database corruption
    • External DLL or file-system filter driver
    • Less commonly, faulty memory or CPU^2^

    CU27 is build 16.0.4295.3, but its published fix list does not document this exact assertion.^3^ The persistence from RTM through CU27 makes another generic “install the CU” recommendation insufficient.

    Identify the affected database and redo boundary

    Capture this repeatedly on both replicas and preserve the row immediately before and after the next assertion:

    SELECT
        DB_NAME(database_id) AS database_name,
        is_local, synchronization_state_desc,
        database_state_desc, is_suspended,
        suspend_reason_desc, redo_queue_size, redo_rate,
        last_received_lsn, last_hardened_lsn,
        last_redone_lsn, last_redone_time
    FROM sys.dm_hadr_database_replica_states
    ORDER BY database_name, is_local;
    

    On SQL Server 2022, this DMV requires VIEW SERVER PERFORMANCE STATE. Only last_redone_lsn and last_commit_lsn are real record LSNs; values such as last_received_lsn and last_hardened_lsn represent log-block boundaries. Consequently, this identifies the database and narrows the failure window, but normally will not reveal the exact offending record.^4^

    Also monitor Redo Queue Size and Redo Rate per database:

    • SSMS → Always On High Availability → availability group → Show Dashboard
    • Add Redo Queue Size (KB) and Redo Rate (KB/sec)
    • On the secondary, Performance Monitor → SQLServer:Database Replica → Recovery Queue and Redone Bytes/sec^5^

    A database whose redo stops, queue grows, last_redone_time freezes, or state changes at 15:35:55 is the primary candidate.

    Preserve the HADR event history

    Ensure AlwaysOn_health is running and starts automatically on every replica:

    ALTER EVENT SESSION AlwaysOn_health ON SERVER
    STATE = START;
    
    ALTER EVENT SESSION AlwaysOn_health ON SERVER
    WITH (STARTUP_STATE = ON);
    

    Then preserve the alwayson_health*.xel, system_health*.xel, and *_SQLDIAG_*.xel files spanning the event. The built-in session captures AG state changes and other HADR events; additional HADR debug events can be enumerated with:

    SELECT name, description
    FROM sys.dm_xe_objects
    WHERE name LIKE '%hadr%';
    

    The supported configuration and SSMS path are Management → Extended Events → Sessions → Alwayson_health.^6^

    CU27 caveat: avoid polling sys.dm_exec_requests while a database is recovering. CU27 has a separate known issue where that query can itself generate an access-violation dump during startup, restore, or AG recovery.^3^ That issue has a different failure signature and does not explain the assertions shown here.

    Integrity and external-I/O checks

    After identifying the database, run a full DBCC CHECKDB on a restored copy where possible:

    DBCC CHECKDB (N'AffectedDatabase')
    WITH NO_INFOMSGS, ALL_ERRORMSGS;
    

    Restore from a known-good backup rather than using repair if corruption is reported.^7^ A clean result does not clear the transaction log: CHECKDB does not validate log corruption.^2^

    Inventory non-Microsoft modules and filter drivers:

    SELECT company, name, description, file_version
    FROM sys.dm_os_loaded_modules
    WHERE company <> 'Microsoft Corporation';
    
    fltmc filters
    

    Pay particular attention to antivirus, endpoint protection, encryption, snapshot, replication, and backup filters touching .mdf, .ndf, or .ldf paths. Do not disable security software indiscriminately; involve its vendor and test exclusions or updates under change control.^8^

    Support package

    Provide Microsoft Support with:

    • SQLDump0064–SQLDump0066: .mdmp, .txt, and .log
    • Complete ERRORLOG archives from every replica
    • alwayson_health, system_health, and SQLDIAG XEL files
    • DMV snapshots showing database name and redo boundaries
    • Windows System/Application event logs, especially storage errors
    • fltmc filters, loaded-module output, systeminfo
    • AG topology and exact operation preceding the event
    • Whether reseeding/restoring that database to different storage reproduces it

    The current minidumps are valid diagnostic artifacts. Generate a larger dump only if Microsoft requests it: dump generation freezes sqlservr.exe and can trigger an AG timeout or failover.^9^


    References

    1. Restore and recovery overview (SQL Server)
    2. MSSQLSERVER_3624
    3. Cumulative Update 27 for SQL Server 2022 (KB5104824) - SQL Server | Microsoft Support
    4. sys.dm_hadr_database_replica_states (Transact-SQL)
    5. Troubleshoot recovery (redo) queuing in an Always On availability group
    6. Configure Extended Events for availability groups
    7. DBCC CHECKDB (Transact-SQL)
    8. Performance and consistency issues when certain modules or filter drivers are loaded
    9. Use Sqldumper.exe to generate a dump file in SQL Server
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.