Applies ToSQL Server 2014 Enterprise - duplicate (do not use) SQL Server 2014 Developer - duplicate (do not use) SQL Server 2014 Standard - duplicate (do not use) SQL Server 2012 Developer SQL Server 2012 Enterprise SQL Server 2012 Standard

Symptoms

Assume that you use merge replication in Microsoft SQL Server 2012 or in Microsoft SQL Server 2014. As a part of the synchronization process, merge agent makes new generation in a session. If for some reason, such as a deadlock or time-out, the generation making transaction is selected as deadlock victim, and the transaction is rolled back, there may be a large chain of blocking for MSinternal_makegeneration_inprog application lock in the forthcoming generation makings, and the session previously mentioned is displayed as the head blocker.

Cause

The application lock that is used to help secure a generation making process is a session level application lock. When a deadlock is detected during generation making process, only the transaction is rolled back but session is not logged off. To release a session level application lock, the session must logoff. Therefore, because of the design of retry logic (session will not be logged off during generation making failure in merge replication), if the first generation making fails with deadlock, the session lock (MSinternal_makegeneration_inprog) it obtained, will not be released during transaction rollback. This causes blocking chain of lock requests in the forthcoming generation making process. The head blocker is displayed to be the first generation making request which fails with deadlock. Before the hotfix, SQL Server only clears the lock for a successful generation making process. It leaves an orphaned session application lock before the session logoff if a deadlock happens.

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.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.