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_needRefreshntdll!ZwWaitForSingleObject+0xaKERNELBASE!WaitForSingleObjectEx+0x94sqlservr!CDmpDump::DumpInternal+0x20fsqlservr!`CDmpDump::Dump'::`1'::filt$0+0x60msvcr100!__C_specific_handler+0x97sqlservr!__GSHandlerCheck_SEH+0x75ntdll!RtlpExecuteHandlerForException+0xdntdll!RtlDispatchException+0x197ntdll!RtlRaiseException+0x18dKERNELBASE!RaiseException+0x68sqlservr!CDmpDump::Dump+0x65sqllang!SQLDumperLibraryInvoke+0x1e4sqllang!SQLLangDumperLibraryInvoke+0x15esqllang!CImageHelper::DoMiniDump+0x426sqllang!stackTrace+0x9d5sqllang!utassert_fail_imp+0x5d0sqldk!utassert_fail+0x2a5sqlmin!IAMPageRangeCache::FindMatchingIAMPageId+0x73sqlmin!AutoIAMPageRangeCache::FindMatchingIAMPageId+0x25sqlmin!AutoAllocationCaches::FindMatchingIAMPageId+0x455sqlmin!GetIAMPage+0x238sqlmin!CheckPageAllocStatus+0x32esqlmin!IsPageInAllocUnit+0x3fsqlmin!IndexPageManager::ReacquireAccess+0x259sqlmin!PageContext::ReacquireAccess+0x29sqlmin!BTreeRow::ValidateAccessOnRowLong+0xc8sqlmin!BTreeRow::ValidateAccessOnRow+0x21sqlmin!BTreeRow::Reposition+0x21sqlmin!BTreeRow::GetVersion+0xe4sqlmin!BTreeRow::GetRecord+0x19afsqlmin!IndexDataSetSession::OutputColumnData+0x19d8sqlmin!IndexDataSetSession::GetDataInternal+0x93sqlmin!DatasetSession::GetData+0x123sqlmin!RowsetNewSS::GetData+0x171sqlmin!CValSSTable::GetDataX+0x48sqltses!CallEsFn+0x13sqltses!CEsExec::GeneralEval4+0xe7sqltses!CallEsFn+0x9sqltses!CEsExec::GeneralEval+0x1a9sqlmin!CEsRuntime::Eval+0xcsqlmin!CQScanSortNew::PushRow+0x2bsqlmin!CQScanSortNew::BuildSortTable+0x22fsqlmin!CQScanSortNew::OpenHelper+0xc0sqlmin!CQueryScan::StartupQuery+0x23csqllang!CXStmtQuery::SetupQueryScanAndExpression+0x2e5sqllang!CXStmtQuery::InitForExecute+0x34sqllang!CXStmtQuery::ErsqExecuteQuery+0x36dsqllang!CXStmtSelect::XretDoExecute+0xffffffffffc59219sqllang!CXStmtSelect::XretExecute+0x2e7sqllang!CExecStmtLoopVars::ExecuteXStmtAndSetXretReturn+0xfsqllang!CMsqlExecContext::ExecuteStmts<1,1>+0x427sqllang!CMsqlExecContext::FExecute+0xa43sqllang!CSQLSource::Execute+0x86csqllang!process_request+0xa57sqllang!process_commands+0x4a3sqldk!SOS_Task::Param::Execute+0x21esqldk!SOS_Scheduler::RunTask+0xabsqldk!SOS_Scheduler::ProcessTasks+0x279sqldk!SchedulerManager::WorkerEntryPoint+0x24csqldk!SystemThread::RunWorker+0x8fsqldk!SystemThreadDispatcher::ProcessWorker+0x366sqldk!SchedulerManager::ThreadEntryPoint+0x226kernel32!BaseThreadInitThunk+0x22ntdll!RtlUserThreadStart+0x34
Resolution
Cumulative Update information
This issue is fixed in the following updates:
-
Cumulative Update 2 for SQL Server 2012 Service Pack 3 (SP3)
-
Cumulative Update 11 for SQL Server 2012 Service Pack 2 (SP2)
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:
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.