SQL Server Assertion: File: p:\sql\ntdbms\cursors\src\ccursor.cpp, line=850

Microsoft SQL Server

I have a problem when executing the following stored
procedure twice in the same session:

EXEC purchase_request_create 17, '3,2,35,'

Here is the prototype of store procedure:

dbo.purchase_request_create
(@process_id numeric,
@equip_list text)

The first call is ok. However, the second call will crash
the SQL server and it write an error entry as shown in the
Subject.

The following is the corresponding dump:

*Stack Dump being sent to e:\data
files\MSSQL\log\SQLDump0002.txt
*
***********************************************************
********************
*
* BEGIN STACK DUMP:

*
* Exception Address = CD043B00
* Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
* Access Violation occurred reading address CD043B00
* Input Buffer 88 bytes -
* EXEC purchase_request_create 17, '3,2,35,'
*
*
* MODULE BASE END SIZE
* sqlservr 00400000 00B2CFFF
0072d000
* ntdll 77F80000 77FFAFFF
0007b000
* KERNEL32 77E80000 77F34FFF
000b5000
* ADVAPI32 77DB0000 77E0AFFF
0005b000
* RPCRT4 77D40000 77DAFFFF
00070000
* USER32 77E10000 77E73FFF
00064000
* GDI32 77F40000 77F7BFFF
0003c000
* OPENDS60 41060000 41065FFF
00006000
* MSVCRT 78000000 78045FFF
00046000
* UMS 41070000 4107CFFF
0000d000
* SQLSORT 42AE0000 42B6FFFF
00090000
* MSVCIRT 780A0000 780B1FFF
00012000
* sqlevn70 41080000 41086FFF
00007000
* NETAPI32 243A0000 243EEFFF
0004f000
* SECUR32 243F0000 243FEFFF
0000f000
* NETRAP 24400000 24405FFF
00006000
* SAMLIB 24410000 2441FFFF
00010000
* WS2_32 24420000 24432FFF
00013000
* WS2HELP 24440000 24447FFF
00008000
* WLDAP32 24450000 24478FFF
00029000
* DNSAPI 24480000 244A3FFF
00024000
* WSOCK32 244B0000 244B7FFF
00008000
* ole32 247A0000 24895FFF
000f6000
* XOLEHLP 248A0000 248A7FFF
00008000
* MSDTCPRX 248B0000 2495EFFF
000af000
* MTXCLU 24960000 2496FFFF
00010000
* VERSION 24970000 24976FFF
00007000
* LZ32 24980000 24985FFF
00006000
* CLUSAPI 24990000 2499FFFF
00010000
* RESUTILS 249A0000 249ACFFF
0000d000
* USERENV 249B0000 24A0CFFF
0005d000
* rnr20 785C0000 785CBFFF
0000c000
* iphlpapi 24A50000 24A62FFF
00013000
* ICMP 24A70000 24A74FFF
00005000
* MPRAPI 24A80000 24A96FFF
00017000
* OLEAUT32 24AA0000 24B3AFFF
0009b000
* ACTIVEDS 24B40000 24B6DFFF
0002e000
* ADSLDPC 24B70000 24B91FFF
00022000
* RTUTILS 24BA0000 24BADFFF
0000e000
* SETUPAPI 24BB0000 24C3CFFF
0008d000
* RASAPI32 24C40000 24C71FFF
00032000
* RASMAN 24C80000 24C90FFF
00011000
* TAPI32 24CA0000 24CC1FFF
00022000
* COMCTL32 24CD0000 24D58FFF
00089000
* SHLWAPI 24D60000 24DA9FFF
0004a000
* DHCPCSVC 24DB0000 24DC8FFF
00019000
* CLBCATQ 251E0000 25264FFF
00085000
* winrnr 25310000 25317FFF
00008000
* rasadhlp 25320000 25324FFF
00005000
* SSNETLIB 25AE0000 25AF4FFF
00015000
* SSNMPN70 410D0000 410D5FFF
00006000
* security 26240000 26243FFF
00004000
* msafd 26250000 2626EFFF
0001f000
* wshtcpip 262B0000 262B6FFF
00007000
* SSmsLPCn 26340000 26346FFF
00007000
* ntdsapi 263E0000 263F0FFF
00011000
* SQLFTQRY 41020000 41051FFF
00032000
* sqloledb 26C30000 26CA2FFF
00073000
* MSDART 26CB0000 26CCEFFF
0001f000
* comdlg32 26CD0000 26D0DFFF
0003e000
* SHELL32 782F0000 78531FFF
00242000
* MSDATL3 26D10000 26D24FFF
00015000
* oledb32 27030000 27095FFF
00066000
* OLEDB32R 271B0000 271BFFFF
00010000
* msv1_0 782D0000 782EDFFF
0001e000
* xpsqlbot 271D0000 271D5FFF
00006000
* rsabase 7CA00000 7CA21FFF
00022000
* CRYPT32 27390000 27404FFF
00075000
* MSASN1 27410000 2741FFFF
00010000
* xpstar 410F0000 41136FFF
00047000
* SQLRESLD 42AC0000 42AC6FFF
00007000
* SQLSVC 27420000 27436FFF
00017000
* ODBC32 27440000 27470FFF
00031000
* odbcbcp 27480000 27485FFF
00006000
* W95SCM 41140000 4114BFFF
0000c000
* SQLUNIRL 10000000 1002CFFF
0002d000
* WINSPOOL 10030000 1004CFFF
0001d000
* SHFOLDER 10050000 10057FFF
00008000
* odbcint 101A0000 101B5FFF
00016000
* NDDEAPI 101C0000 101C6FFF
00007000
* SQLSVC 101D0000 101D5FFF
00006000
* xpstar 101E0000 101E8FFF
00009000
* dbghelp 02800000 028B4FFF
000b5000
*
* Edi: 4337EAF8: 00680068 00010001 00000000
00000000 00000000 00000000
* Esi: 4360426C: 4337EAF8 00000000 00650070
0069005F 00000064 00000000
* Eax: 00680068: 98EDC08E CD043B00 0098EEC0
3A41870F 8E8A0000 0098FE68
* Ebx: 00000007:
* Ecx: 4360426C: 4337EAF8 00000000 00650070
0069005F 00000064 00000000
* Edx: 00000000:
* Eip: CD043B00:
* Ebp: 26C2DDFC: 26C2DE1C 006B6676 4337EAF8
4337EB38 43604268 26C2E114
* SegCs: 0000001B:
* EFlags: 00010246: 0067006F 00610072 0020006D
00690046 0065006C 005C0073
* Esp: 26C2DDDC: 006B5E38 4337EAF8 43604268
00000000 4360426C 26C2DE10
* SegSs: 00000023:
*
***********************************************************
********************
* ---------------------------------------------------------
----------------------
* Short Stack Dump
* CD043B00 Module(UNKNOWN+00000000)
* 006B5E38 Module(sqlservr+002B5E38)
(CLob::CopyFromIlb+0000007E)
* 006B6676 Module(sqlservr+002B6676)
(CXVariant::CopyDeep+00000116)
* 00428915 Module(sqlservr+00028915)
(CExecParamTbl::ICopyByOrder+0000052E)
* 0041AFE5 Module(sqlservr+0001AFE5)
(CExecParamTbl::InitLocals+000001AF)
* 0041AA65 Module(sqlservr+0001AA65)
(CMsqlExecContext::Execute+00000189)
* 0041B9B6 Module(sqlservr+0001B9B6)
(CSQLSource::Execute+00000357)
* 005F45F7 Module(sqlservr+001F45F7)
(CSQLObject::ExecuteFunction+0000014A)
* 005CA5C6 Module(sqlservr+001CA5C6) (UDFInvoke+000001A0)
* 0041C5EA Module(sqlservr+0001C5EA)
(CEs::GeneralEval4+00000091)
* 0056D0FE Module(sqlservr+0016D0FE)
(CQScanFilter::GetRow+0000002B)
* 004FAAE4 Module(sqlservr+000FAAE4)
(CQScanSort::BuildSortTable+00000047)
* 004FAA94 Module(sqlservr+000FAA94)
(CQScanSort::Open+00000032)
* 00428F27 Module(sqlservr+00028F27)
(CQueryScan::Uncache+00000194)
* 005973B6 Module(sqlservr+001973B6)
(CFetchPopulate::PopulateWorkTable+00000230)
* 0059798A Module(sqlservr+0019798A)
(CFetchPopulate::StartPopulating+00000477)
* 005987CA Module(sqlservr+001987CA)
(CFetchSnapshot::StartPopulating+0000000D)
* 00597C57 Module(sqlservr+00197C57)
(CFetchPopulate::Populate+0000000E)
* 0058269D Module(sqlservr+0018269D)
(CCursor::Open+000000CE)
* 0057F858 Module(sqlservr+0017F858)
(CCursorSimpleStmt::XretExecute+000000C1)
* 0041B442 Module(sqlservr+0001B442)
(CMsqlExecContext::ExecuteStmts+000003B9)
* 0041AA88 Module(sqlservr+0001AA88)
(CMsqlExecContext::Execute+000001B6)
* 0041B9B6 Module(sqlservr+0001B9B6)
(CSQLSource::Execute+00000357)
* 00498A8A Module(sqlservr+00098A8A)
(CStmtExec::XretLocalExec+0000014D)
* 00498926 Module(sqlservr+00098926)
(CStmtExec::XretExecute+0000031A)
* 0041B442 Module(sqlservr+0001B442)
(CMsqlExecContext::ExecuteStmts+000003B9)
* 0041AA88 Module(sqlservr+0001AA88)
(CMsqlExecContext::Execute+000001B6)
* 0041B9B6 Module(sqlservr+0001B9B6)
(CSQLSource::Execute+00000357)
* 0048A63B Module(sqlservr+0008A63B)
(language_exec+000003E1)
* 0042708C Module(sqlservr+0002708C)
(process_commands+0000010E)
* 41075002 Module(UMS+00005002)
(ProcessWorkRequests+00000272)
* 41074698 Module(UMS+00004698)
(ThreadStartRoutine+00000098)
* 7800A27B Module(MSVCRT+0000A27B) (beginthread+000000CE)
* 77E8758A Module(KERNEL32+0000758A)
(SetFilePointer+0000018A)
* ---------------------------------------------------------
----------------------

dump is 0xC09D334B

version '4.0.5'
*Dump thread - spid = 55, PSS = 0x4302f1f8, EC = 0x4302f520
*Stack Dump being sent to e:\data
files\MSSQL\log\SQLDump0003.txt
*
***********************************************************
********************
*
* BEGIN STACK DUMP:

*
*
*
* EXEC purchase_request_create 17, '3,2,35,'
*
*
* MODULE BASE END SIZE
* sqlservr 00400000 00B2CFFF
0072d000
* ntdll 77F80000 77FFAFFF
0007b000
* KERNEL32 77E80000 77F34FFF
000b5000
* ADVAPI32 77DB0000 77E0AFFF
0005b000
* RPCRT4 77D40000 77DAFFFF
00070000
* USER32 77E10000 77E73FFF
00064000
* GDI32 77F40000 77F7BFFF
0003c000
* OPENDS60 41060000 41065FFF
00006000
* MSVCRT 78000000 78045FFF
00046000
* UMS 41070000 4107CFFF
0000d000
* SQLSORT 42AE0000 42B6FFFF
00090000
* MSVCIRT 780A0000 780B1FFF
00012000
* sqlevn70 41080000 41086FFF
00007000
* NETAPI32 243A0000 243EEFFF
0004f000
* SECUR32 243F0000 243FEFFF
0000f000
* NETRAP 24400000 24405FFF
00006000
* SAMLIB 24410000 2441FFFF
00010000
* WS2_32 24420000 24432FFF
00013000
* WS2HELP 24440000 24447FFF
00008000
* WLDAP32 24450000 24478FFF
00029000
* DNSAPI 24480000 244A3FFF
00024000
* WSOCK32 244B0000 244B7FFF
00008000
* ole32 247A0000 24895FFF
000f6000
* XOLEHLP 248A0000 248A7FFF
00008000
* MSDTCPRX 248B0000 2495EFFF
000af000
* MTXCLU 24960000 2496FFFF
00010000
* VERSION 24970000 24976FFF
00007000
* LZ32 24980000 24985FFF
00006000
* CLUSAPI 24990000 2499FFFF
00010000
* RESUTILS 249A0000 249ACFFF
0000d000
* USERENV 249B0000 24A0CFFF
0005d000
* rnr20 785C0000 785CBFFF
0000c000
* iphlpapi 24A50000 24A62FFF
00013000
* ICMP 24A70000 24A74FFF
00005000
* MPRAPI 24A80000 24A96FFF
00017000
* OLEAUT32 24AA0000 24B3AFFF
0009b000
* ACTIVEDS 24B40000 24B6DFFF
0002e000
* ADSLDPC 24B70000 24B91FFF
00022000
* RTUTILS 24BA0000 24BADFFF
0000e000
* SETUPAPI 24BB0000 24C3CFFF
0008d000
* RASAPI32 24C40000 24C71FFF
00032000
* RASMAN 24C80000 24C90FFF
00011000
* TAPI32 24CA0000 24CC1FFF
00022000
* COMCTL32 24CD0000 24D58FFF
00089000
* SHLWAPI 24D60000 24DA9FFF
0004a000
* DHCPCSVC 24DB0000 24DC8FFF
00019000
* CLBCATQ 251E0000 25264FFF
00085000
* winrnr 25310000 25317FFF
00008000
* rasadhlp 25320000 25324FFF
00005000
* SSNETLIB 25AE0000 25AF4FFF
00015000
* SSNMPN70 410D0000 410D5FFF
00006000
* security 26240000 26243FFF
00004000
* msafd 26250000 2626EFFF
0001f000
* wshtcpip 262B0000 262B6FFF
00007000
* SSmsLPCn 26340000 26346FFF
00007000
* ntdsapi 263E0000 263F0FFF
00011000
* SQLFTQRY 41020000 41051FFF
00032000
* sqloledb 26C30000 26CA2FFF
00073000
* MSDART 26CB0000 26CCEFFF
0001f000
* comdlg32 26CD0000 26D0DFFF
0003e000
* SHELL32 782F0000 78531FFF
00242000
* MSDATL3 26D10000 26D24FFF
00015000
* oledb32 27030000 27095FFF
00066000
* OLEDB32R 271B0000 271BFFFF
00010000
* msv1_0 782D0000 782EDFFF
0001e000
* xpsqlbot 271D0000 271D5FFF
00006000
* rsabase 7CA00000 7CA21FFF
00022000
* CRYPT32 27390000 27404FFF
00075000
* MSASN1 27410000 2741FFFF
00010000
* xpstar 410F0000 41136FFF
00047000
* SQLRESLD 42AC0000 42AC6FFF
00007000
* SQLSVC 27420000 27436FFF
00017000
* ODBC32 27440000 27470FFF
00031000
* odbcbcp 27480000 27485FFF
00006000
* W95SCM 41140000 4114BFFF
0000c000
* SQLUNIRL 10000000 1002CFFF
0002d000
* WINSPOOL 10030000 1004CFFF
0001d000
* SHFOLDER 10050000 10057FFF
00008000
* odbcint 101A0000 101B5FFF
00016000
* NDDEAPI 101C0000 101C6FFF
00007000
* SQLSVC 101D0000 101D5FFF
00006000
* xpstar 101E0000 101E8FFF
00009000
* dbghelp 02800000 028B4FFF
000b5000
*
* Edi: 4302F520: 4302F1F8 4302F524 4302F524
42C0F0D8 42C0F570 42F6C030
* Esi: 00000000:
* Eax: 00000000:
* Ebx: 4302F1F8: 00060037 00000000 01109692
000093C5 00000000 00000000
* Ecx: 26C294E8: 00000000 0001003F 00000000
00000000 00000000 00000000
* Edx: FFFFFFFF:
* Eip: 0087A90E: 4D830088 75FFFFFC 0875FF0C
E8E04D8B 0000002D 64F04D8B
* Ebp: 26C294CC: 26C29CEC 0087C41F 4302F1F8
26C29E50 26C2A0C8 7802452E
* SegCs: 0000001B:
* EFlags: 00010246: 0067006F 00610072 0020006D
00690046 0065006C 005C0073
* Esp: 26C294A0: 4302F520 00000000 4302F1F8
26C294E8 4302F000 26C294A0
* SegSs: 00000023:
*
***********************************************************
********************
* ---------------------------------------------------------
----------------------
* Short Stack Dump
* 0087A90E Module(sqlservr+0047A90E)
(CStackDump::GetContextAndDump+0000002E)
* 0087C41F Module(sqlservr+0047C41F) (stackTrace+00000223)
* 00931097 Module(sqlservr+00531097)
(utassert_fail+000002E3)
* 00581DB3 Module(sqlservr+00181DB3)
(CCursor::Cleanup+00000110)
* 00586362 Module(sqlservr+00186362)
(CCursorDeclarationSink::Release+0000000C)
* 0058606D Module(sqlservr+0018606D)
(CFnScopeNotificationDestroy::operator()+0000000B)
* 00425C08 Module(sqlservr+00025C08)
(CHashList::CFnD_HashListElPtr::operator()+00000015)
* 00416A0A Module(sqlservr+00016A0A)
(CQList::~CQList+0000001E)
* 005F2CF0 Module(sqlservr+001F2CF0)
(CSQLSource::~CSQLSource+0000009E)
* 0042C364 Module(sqlservr+0002C364)
(CSQLObject::~CSQLObject+000000A4)
* 7800B0A7 Module(MSVCRT+0000B0A7) (_doserrno+00000030)
* 00498926 Module(sqlservr+00098926)
(CStmtExec::XretExecute+0000031A)
* 0041B442 Module(sqlservr+0001B442)
(CMsqlExecContext::ExecuteStmts+000003B9)
* 0041AA88 Module(sqlservr+0001AA88)
(CMsqlExecContext::Execute+000001B6)
* 0041B9B6 Module(sqlservr+0001B9B6)
(CSQLSource::Execute+00000357)
* 0048A63B Module(sqlservr+0008A63B)
(language_exec+000003E1)
* 0042708C Module(sqlservr+0002708C)
(process_commands+0000010E)
* 41075002 Module(UMS+00005002)
(ProcessWorkRequests+00000272)
* 41074698 Module(UMS+00004698)
(ThreadStartRoutine+00000098)
* 7800A27B Module(MSVCRT+0000A27B) (beginthread+000000CE)
* 77E8758A Module(KERNEL32+0000758A)
(SetFilePointer+0000018A)
* ---------------------------------------------------------