Symptoms

Consider the following scenario:

  • You use Microsoft SQL Server 2012,2014 or 2016 AlwaysOn Availability Groups.

  • A failover occurs, and the primary replica becomes the new secondary replica.

  • A part of the LSNs have to undo on the new secondary replica.

  • A deadlock occurs during the undo progress, and the failover associated transaction is picked as the deadlock victim by SQL lock manager.

In this scenario, the new secondary replica stops accepting transaction log records until the instance is restarted. Additionally, a latch time-out error message that resembles the following is logged in the SQL Server error log every few minutes:

Time out occurred while waiting for buffer latch -- type 3, bp 0000003CE3093CC0, page 1:0, stat 0x9, database id: 11, allocation unit id: 6488064, task 0x0000001436F2A558 : 0, waittime 300 seconds, flags 0x100000001a, owning task 0x0000001436F2A558. Continuing to wait.Using 'dbghelp.dll' version '4.0.5'**Dump thread - spid = 0, EC = 0x0000001038514B90***Stack Dump being sent to file_path* ******************************************************************************** BEGIN STACK DUMP:* date time spid spid* Latch timeout* *******************************************************************************

Resolution

This issue is fixed in the following cumulative update for SQL Server:     Cumulative Update 5 for SQL Server 2016 RTM     Cumulative Update 2 for SQL Server 2016 SP1

Cumulative Update 3 for SQL Server 2014 Service Pack 2     Cumulative Update 11 for SQL Server 2014 SP1

Cumulative Update 7 for SQL Server 2012 SP3

About cumulative updates for SQL Server

Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:     Latest cumulative update for SQL Server 2016

Latest cumulative update for SQL Server 2014

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

References

Learn about the terminology Microsoft uses to describe software updates.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.