FIX: Service broker stops working when you unregister and remove a session in SQL Server

Applies to: SQL Server 2008 R2 Service Pack 2SQL Server 2008 R2 DeveloperSQL Server 2008 R2 Enterprise More


Assume that you use service broker in Microsoft SQL Server 2008 R2, SQL Server 2012, or SQL Server 2014. When you use service broker as an initiator sending high number of messages to a remote target, a race condition might occur leading to an access violation and deadlocked schedulers. In this situation, service broker stops working.


The issue occurs because of a race condition that happens during the synchronization of registration and un-registration of remote service broker sessions. The race condition happens because a spinlock is released incorrectly.


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

Cumulative Update 4 for SQL Server 2014

Cumulative Update 2 for SQL Server 2012 SP2

Cumulative Update 11 for SQL Server 2012 SP1

Cumulative Update 13 for SQL Server 2008 R2 SP2


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