FIX: Parallel Query May Cause an Access Violation in CBitSet::Incl

Article translations Article translations
Article ID: 318874 - View products that this article applies to.
This article was previously published under Q318874
BUG #: 356774 (SHILOH_BUGS)
Expand all | Collapse all

SYMPTOMS

Running a complex query that results in a parallel plan may cause an Access Violation (AV) to occur.

RESOLUTION

To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
290211 INF: How To Obtain the Latest SQL Server 2000 Service Pack
NOTE: The following hotfix was created before the release of Microsoft SQL Server 2000 Service Pack 3.

The English version of this fix should have the following file attributes or later:
   Date       Time      Version    Size      File name
   -------------------------------------------------------

   3/7/2002   5:12 PM   8.00.594   7269 KB   Sqlservr.exe
NOTE: Because of file dependencies, the most recent hotfix or feature that contains the files may also contain additional files.


WORKAROUND

To work around this behavior you can either:
  • Disable parallelism for this specific query by using the OPTION (MAXDOP 1).

    -or-

  • Disable parallelism on the server by setting the max degree of parallelism configuration option to 1.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
This problem was first corrected in Microsoft SQL Server 2000 Service Pack 3.

MORE INFORMATION

The following code sample causes the AV to occur:
SELECT Salesman_dim.SalesmanName
FROM VW_Sls_Plan_Agg_Union, Customer_dim ,vw_Time_dim AGG_dbo_Time_dim_1 ,Salesman_dim
WHERE ( Customer_dim.CustKey=VW_Sls_Plan_Agg_Union.Custkey)  
   AND    (Salesman_dim.SalesmanKey=VW_Sls_Plan_Agg_Union.salesmankey)   
   AND   (AGG_dbo_Time_dim_1.FiscalYr=VW_Sls_Plan_Agg_Union.FiscalYr 
                and    AGG_dbo_Time_dim_1.FiscalMonth = VW_Sls_Plan_Agg_Union.FiscalMonth )
                and   ( AGG_dbo_Time_dim_1.LastDayFisMth ='Y') 
  AND (Customer_dim.SalesChannel + ' '  + Customer_dim.SalesChnDesc =     '1 ELEC DIST.'  
             and  Salesman_dim.SalesmanCode IN ('1U','SW','WA' ))

The SQL Server error log shows the following Stack dump file for SQL Server 2000 Service Pack 2 (8.00.534):
2002-03-08 09:40:04.21 spid51    Using 'dbghelp.dll' version '4.0.5'
*Stack Dump being sent to C:\Program Files\Microsoft SQL Server\MSSQL\log\SQL00005.dmp
2002-03-08 09:40:04.24 spid51    Error: 0, Severity: 19, State: 0
2002-03-08 09:40:04.24 spid51    SqlDumpExceptionHandler: Process 51 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process..
* *******************************************************************************
*
* BEGIN STACK DUMP:
*   03/08/02 09:40:04 spid 51
*
*   Exception Address = 00540EAD (CBitSet::Incl + 00000004 Line 0+00000000)
*   Exception Code    = c0000005 EXCEPTION_ACCESS_VIOLATION
*   Access Violation occurred reading address 00000014
* Input Buffer 1296 bytes -
*  SELECT Salesman_dim.SalesmanName  FROM VW_Sls_Plan_Agg_Union, Customer_d
*  im ,vw_Time_dim AGG_dbo_Time_dim_1 ,Salesman_dim  WHERE ( Customer_dim.C
*  ustKey=VW_Sls_Plan_Agg_Union.Custkey)       AND    (Salesman_dim.Salesma
*  nKey=VW_Sls_Plan_Agg_Union.salesmankey)        AND   (AGG_dbo_Time_dim_1
*  .FiscalYr=VW_Sls_Plan_Agg_Union.FiscalYr                   and    AGG_db
*  o_Time_dim_1.FiscalMonth = VW_Sls_Plan_Agg_Union.FiscalMonth )          
*          and   ( AGG_dbo_Time_dim_1.LastDayFisMth ='Y')     AND (Customer
*  _dim.SalesChannel + ' '  + Customer_dim.SalesChnDesc =     '1 ELEC DIST.
*  '                 and  Salesman_dim.SalesmanCode IN ('1U','SW','WA' ))  
*  

* -------------------------------------------------------------------------------
* Short Stack Dump
* 00540EAD Module(sqlservr+00140EAD) (CBitSet::Incl+00000004)
* 00540EA5 Module(sqlservr+00140EA5) (CPvrBitSet::Incl+00000015)
* 00454E98 Module(sqlservr+00054E98) (CPhyOp_Fetch::InputReqdProp+00000256)
* 00543796 Module(sqlservr+00143796) (COpArg::InputNormalizedReqdProp+0000001F)
* 004E5C25 Module(sqlservr+000E5C25) (CConvertCtx::CConvertCtx+0000019B)
* 004E5A67 Module(sqlservr+000E5A67) (CConvertCtx::PqteConvertChild+0000001D)
* 0046F402 Module(sqlservr+0006F402) (CPhyOp_Fetch::PqteConvert+000000F9)
* 00542D0E Module(sqlservr+00142D0E) (COptExpr::PqteConvert+000000BC)
* 004E5A77 Module(sqlservr+000E5A77) (CConvertCtx::PqteConvertChild+0000002D)
* 0048771D Module(sqlservr+0008771D) (CPhyOp_LoopsJoin::PqteConvert+00000041)
* 00542D0E Module(sqlservr+00142D0E) (COptExpr::PqteConvert+000000BC)
* 004E5A77 Module(sqlservr+000E5A77) (CConvertCtx::PqteConvertChild+0000002D)
* 0047E655 Module(sqlservr+0007E655) (CPhyOp_HashJoin::ConvertBuildInput+00000202)
* 0047E2B7 Module(sqlservr+0007E2B7) (CPhyOp_HashJoin::PqteConvert+00000164)
* 00542D0E Module(sqlservr+00142D0E) (COptExpr::PqteConvert+000000BC)
* 004E5A77 Module(sqlservr+000E5A77) (CConvertCtx::PqteConvertChild+0000002D)
* 0047E2DA Module(sqlservr+0007E2DA) (CPhyOp_HashJoin::PqteConvert+00000192)
* 00542D0E Module(sqlservr+00142D0E) (COptExpr::PqteConvert+000000BC)
* 004E5A77 Module(sqlservr+000E5A77) (CConvertCtx::PqteConvertChild+0000002D)
* 0047E2DA Module(sqlservr+0007E2DA) (CPhyOp_HashJoin::PqteConvert+00000192)
* 00542D0E Module(sqlservr+00142D0E) (COptExpr::PqteConvert+000000BC)
* 004E5A77 Module(sqlservr+000E5A77) (CConvertCtx::PqteConvertChild+0000002D)
* 0074150B Module(sqlservr+0034150B) (CPhyOp_Concat::PqteConvert+00000184)
* 00542D0E Module(sqlservr+00142D0E) (COptExpr::PqteConvert+000000BC)
* 004E5A77 Module(sqlservr+000E5A77) (CConvertCtx::PqteConvertChild+0000002D)
* 004F6AF9 Module(sqlservr+000F6AF9) (CPhyOp_ComputeScalar::PqteConvert+00000043)
* 00542D0E Module(sqlservr+00142D0E) (COptExpr::PqteConvert+000000BC)
* 00542B7A Module(sqlservr+00142B7A) (COptExpr::PqteConvertTree+00000055)
* 005528EE Module(sqlservr+001528EE) (COptContext::PcxteOptimizeQuery+000011D6)
* 00551A3A Module(sqlservr+00151A3A) (CQuery::Optimize+000003F9)
* 00551815 Module(sqlservr+00151815) (CQuery::Optimize+00000030)
* 0054C482 Module(sqlservr+0014C482) (CCvtTree::PqryFromTree+0000029D)
* 0054C230 Module(sqlservr+0014C230) (BuildQueryFromTree+00000046)
* 0054C19D Module(sqlservr+0014C19D) (CStmtQuery::InitQuery+0000013E)
* 004FF9C9 Module(sqlservr+000FF9C9) (CStmtSelect::Init+0000008A)
* 0053546E Module(sqlservr+0013546E) (CCompPlan::FCompileStep+00000AD6)
* 0053BD8F Module(sqlservr+0013BD8F) (CProchdr::FCompile+00000D23)
* 004106AD Module(sqlservr+000106AD) (CSQLSource::FTransform+0000034C)
* 0053C893 Module(sqlservr+0013C893) (CSQLStrings::FTransform+000001A1)
* 00410092 Module(sqlservr+00010092) (CSQLSource::Execute+0000015B)
* 0053C498 Module(sqlservr+0013C498) (language_exec+000003E1)
* 00411099 Module(sqlservr+00011099) (process_commands+000000EC)
* 41073379 Module(UMS+00003379) (ProcessWorkRequests+0000024A)
* 41073071 Module(UMS+00003071) (ThreadStartRoutine+000000BD)
* 7800A27B Module(MSVCRT+0000A27B) (_unDNameEx+00004849)
* 77E8758A Module(KERNEL32+0000758A) (SetFilePointer+0000018A)
* -------------------------------------------------------------------------------
2002-03-08 09:40:07.19 spid51    Error: 0, Severity: 19, State: 0
2002-03-08 09:40:07.19 spid51    language_exec: Process 51 generated an access violation. SQL Server is terminating this process..

Properties

Article ID: 318874 - Last Review: September 27, 2005 - Revision: 4.2
APPLIES TO
  • Microsoft SQL Server 2000 Standard Edition
Keywords: 
kbhotfixserver kbqfe kbsqlserv2000sp3fix kbbug kbfix kbsqlserv2000presp3fix KB318874

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com