FIX: Parallel redo in a secondary replica of an availability group that contains heap tables generates a runtime assert dump or the SQL Server crashes with an access violation error

Applies to: SQL Server 2017 DeveloperSQL Server 2017 EnterpriseSQL Server 2017 Enterprise Core More

Symptoms


Assume that you use an Always On availability group (AG) that contains heap tables. Starting in SQL Server 2016, parallel thread for redo operations is used in secondary replicas. In this case, heap tables redo operation may generate a runtime assert dump or the SQL Server may crash with an access violation error in some cases.

Cause


This issue occurs after you apply the cumulative update that is mentioned in the following article:

4018866 FIX: Parallel redo causes high memory usage in SQL Server 2016 when it's compared to SQL Server 2014 or earlier versions

Resolution


This issue is fixed in the following cumulative updates for SQL Server:

       Cumulative update 9 for SQL Server 2016 SP1

       Cumulative Update 1 for SQL Server 2016 SP2

       Cumulative Update 6 for SQL Server 2017

Workaround


To work around this issue, disable parallel redo by enabling Trace Flag 3459.

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 standard terminology Microsoft uses to describe software updates.