Microsoft KB Archive/141853

{|
 * width="100%"|

FIX: Unexpected Vines IPC Msg Can Cause CPU Spin or Exception

 * }

Q141853

-

The information in this article applies to:


 * Microsoft SQL Server versions 4.2x, 6.0

-

BUG# NT: 12636 (4.21a)

SYMPTOMS
The SQL Server Banyan network library can cause a CPU spin on SQL Server version 4.21a or an unhandled exception in SQL Server version 6.0 if it receives an unexpected Vines IPC message from any Banyan client.

When the CPU spin occurs, all connections through the Banyan net library are disabled. However, you can still connect to SQL Server using other network libraries. On a single processor computer, the server will appear to be very sluggish, and on a symmetric multiprocessor (SMP) computer, only one CPU is tied up and the server will continue to be fairly responsive.

SQL Server must be shut down and restarted to restore Banyan net library connectivity.

CAUSE
When SQL Server's Banyan SPP socket receives an IPC message, it tries to "flush" it. However, in 4.21a, when we try to discard the message, one of the parameters we use with VnsSocketReceive to flush this message is SO_CREC and this, as documented by Banyan, is supported only by the SPP service. Because we are dealing with an IPC message, not SPP data, we are unable to flush this message and thus caught in a loop trying repeatedly to flush the same IPC message.

For SQL Server 6.0, we are not caught in a loop because the first time we try to flush this IPC message, SQL Server generates an unhandled exception. In version 4.21a, when we flush the message, we initialize the Vines connection identifier (cid) to zero; in version 6.0, we initialize the cid to a variable in a data structure whose address is stored in a pointer. Unfortunately, the pointer to the data structure in most cases is a null pointer.

WORKAROUND
Use other SQL Server net libraries, such as TCP/IP sockets or Named Pipes. There is no other known workaround for this problem.

STATUS
Microsoft has confirmed this to be a problem in Microsoft SQL Server versions 4.21a and 6.0. This problem was corrected in a hot fix release. Contact your primary support provider to obtain the hot fix or for more information.

MORE INFORMATION
SQL Server uses the connection-oriented SPP service provided by the Vines Transport Layer to communicate with any Banyan network clients. Once this SPP socket is opened by SQL Server, it can theoretically be used for Vines' IPC communication also.

IPC Service, provided also by Vines Transport Layer, can be used to send both unreliable datagrams and reliable messages. Applications using SQL Server Banyan client side net library use an IPC datagram to communicate with the Banyan server to enumerate SQL Servers available on the network.

However, IPC messages are not sent by SQL Server Banyan client-side net library directly to SQL Server. Because the server-side net library never expects to receive an IPC message, it is unable to get rid of this message when it receives one, and thus leads to the CPU spin as described above.

Additional query words: sql6 Banyan Vines CPU SPIN hotfix

Keywords : kb3rdparty kbinterop kbnetwork

Issue type : kbbug

Technology : kbSQLServSearch kbAudDeveloper kbSQLServ600 kbSQLServ420OS2