FIX: "No exceptions should be raised by this code" error when you run parallel query in SQL Server 2014

Symptoms

When you execute a parallel query that involves a Merge Join in Microsoft SQL Server 2014, an assertion exception occurs, and you receive the following error message from the SQL Server error log:
<Date> <Time> spid<ID> Using 'dbghelp.dll' version '4.0.5'
<Date> <Time> spid<ID> **Dump thread - spid = <ID>, EC = 0x0000007F8608E160
<Date> <Time> spid<ID> ***Stack Dump being sent to <Disk Name>:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\LOG\SQLDump0002.txt
<Date> <Time> spid<ID> * *******************************************************************************
<Date> <Time> spid<ID> *
<Date> <Time> spid<ID> * BEGIN STACK DUMP:
<Date> <Time> spid<ID> * <Date> <Time> spid <ID>
<Date> <Time> spid<ID> *
<Date> <Time> spid<ID> * Location: qxcntxt.cpp:1143
<Date> <Time> spid<ID> * Expression: !"No exceptions should be raised by this code"
<Date> <Time> spid<ID> * SPID: <ID>
<Date> <Time> spid<ID> * Process ID: 3556
<Date> <Time> spid<ID> *
<Date> <Time> spid<ID> * Input Buffer 37 bytes -
<Date> <Time> spid<ID> * 16 00 00 00 12 00 00 00 02 00 00 00 00 00 00 00 00 00
<Date> <Time> spid<ID> * ÿÿ & 01 00 00 00 ff ff 0c 00 00 00 00 00 26 04 04 05 00 00
<Date> <Time> spid<ID> * 00
<Date> <Time> spid<ID> *
<Date> <Time> spid<ID> *
...
<Date> <Time> spid<ID> Stack Signature for the dump is 0x000000014202549F
<Date> <Time> spid<ID> [INFO] Identity Begin End | State Result Error Speculate Prepared LazyCommit ReadOnly | Transaction Database ThreadId | ReadSet WriteSet ScanSet Savepoint LogSizeRq | CommitDep TotalComm Dependent 0 Dependent 1 Dependent 2 Dependent 3 Dependent 4 Dependent 5 Dependent 6 Dependent 7 | Area Location |
<Date> <Time> spid<ID> Timeout waiting for external dump process 11800.

<Date> <Time> spid<ID> Error: 17066, Severity: 16, State: 1.
<Date> <Time> spid<ID> SQL Server Assertion: File: <qxcntxt.cpp>, line=1143 Failed Assertion = '!"No exceptions should be raised by this code"'. This error may be timing-related. If the error persists after rerunning the statement, use DBCC CHECKDB to check the database for structural integrity, or restart the server to ensure in-memory data structures are not corrupted.

Resolution

This issue was first fixed in the following cumulative update of SQL Server. 

Cumulative Update 5 for SQL Server 2014

About 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.
Properties

Article ID: 3014825 - Last Review: Mar 14, 2016 - Revision: 1

Feedback