FIX: An assertion failure occurs on the secondary replica when you use the AlwaysOn Availability Groups feature in SQL Server 2012

Symptoms

When you use the AlwaysOn Availability Groups feature in Microsoft SQL Server 2012, an assertion failure occurs on the secondary replica. Also, a dump file resembles the following is generated in the SQL Server error log:

* BEGIN STACK DUMP:
* date time spid 101
*
* Location: IAMPageRangeCache.cpp:515
* Expression: !m_needRefresh

ntdll!ZwWaitForSingleObject+0xa
KERNELBASE!WaitForSingleObjectEx+0x94
sqlservr!CDmpDump::DumpInternal+0x20f
sqlservr!`CDmpDump::Dump'::`1'::filt$0+0x60
msvcr100!__C_specific_handler+0x97
sqlservr!__GSHandlerCheck_SEH+0x75
ntdll!RtlpExecuteHandlerForException+0xd
ntdll!RtlDispatchException+0x197
ntdll!RtlRaiseException+0x18d
KERNELBASE!RaiseException+0x68
sqlservr!CDmpDump::Dump+0x65
sqllang!SQLDumperLibraryInvoke+0x1e4
sqllang!SQLLangDumperLibraryInvoke+0x15e
sqllang!CImageHelper::DoMiniDump+0x426
sqllang!stackTrace+0x9d5
sqllang!utassert_fail_imp+0x5d0
sqldk!utassert_fail+0x2a5
sqlmin!IAMPageRangeCache::FindMatchingIAMPageId+0x73
sqlmin!AutoIAMPageRangeCache::FindMatchingIAMPageId+0x25
sqlmin!AutoAllocationCaches::FindMatchingIAMPageId+0x455
sqlmin!GetIAMPage+0x238
sqlmin!CheckPageAllocStatus+0x32e
sqlmin!IsPageInAllocUnit+0x3f
sqlmin!IndexPageManager::ReacquireAccess+0x259
sqlmin!PageContext::ReacquireAccess+0x29
sqlmin!BTreeRow::ValidateAccessOnRowLong+0xc8
sqlmin!BTreeRow::ValidateAccessOnRow+0x21
sqlmin!BTreeRow::Reposition+0x21
sqlmin!BTreeRow::GetVersion+0xe4
sqlmin!BTreeRow::GetRecord+0x19af
sqlmin!IndexDataSetSession::OutputColumnData+0x19d8
sqlmin!IndexDataSetSession::GetDataInternal+0x93
sqlmin!DatasetSession::GetData+0x123
sqlmin!RowsetNewSS::GetData+0x171
sqlmin!CValSSTable::GetDataX+0x48
sqltses!CallEsFn+0x13
sqltses!CEsExec::GeneralEval4+0xe7
sqltses!CallEsFn+0x9
sqltses!CEsExec::GeneralEval+0x1a9
sqlmin!CEsRuntime::Eval+0xc
sqlmin!CQScanSortNew::PushRow+0x2b
sqlmin!CQScanSortNew::BuildSortTable+0x22f
sqlmin!CQScanSortNew::OpenHelper+0xc0
sqlmin!CQueryScan::StartupQuery+0x23c
sqllang!CXStmtQuery::SetupQueryScanAndExpression+0x2e5
sqllang!CXStmtQuery::InitForExecute+0x34
sqllang!CXStmtQuery::ErsqExecuteQuery+0x36d
sqllang!CXStmtSelect::XretDoExecute+0xffffffffffc59219
sqllang!CXStmtSelect::XretExecute+0x2e7
sqllang!CExecStmtLoopVars::ExecuteXStmtAndSetXretReturn+0xf
sqllang!CMsqlExecContext::ExecuteStmts<1,1>+0x427
sqllang!CMsqlExecContext::FExecute+0xa43
sqllang!CSQLSource::Execute+0x86c
sqllang!process_request+0xa57
sqllang!process_commands+0x4a3
sqldk!SOS_Task::Param::Execute+0x21e
sqldk!SOS_Scheduler::RunTask+0xab
sqldk!SOS_Scheduler::ProcessTasks+0x279
sqldk!SchedulerManager::WorkerEntryPoint+0x24c
sqldk!SystemThread::RunWorker+0x8f
sqldk!SystemThreadDispatcher::ProcessWorker+0x366
sqldk!SchedulerManager::ThreadEntryPoint+0x226
kernel32!BaseThreadInitThunk+0x22
ntdll!RtlUserThreadStart+0x34

Resolution

Cumulative Update information

This issue is fixed in the following updates:




Recommendation: Install the latest cumulative update for SQL Server

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 that Microsoft uses to describe software updates.
Properties

Article ID: 3139614 - Last Review: Mar 22, 2016 - Revision: 1

Microsoft SQL Server 2012 Developer, Microsoft SQL Server 2012 Enterprise, Microsoft SQL Server 2012 Standard

Feedback