question

SebastianOzdoba-7474 avatar image
0 Votes"
SebastianOzdoba-7474 asked SebastianOzdoba-7474 commented

SQL Server 2019 CU9 - Access_Violation

Hi
I installed SQL 2019 CU9 and experienced high error Access_Violation, then sql server services are restarting

Version of SQL:
Microsoft SQL Server 2019 (RTM-CU9) (KB5000642) - 15.0.4102.2 (X64) Jan 25 2021 20:16:12 Copyright (C) 2019 Microsoft Corporation Standard Edition (64-bit) on Windows Server 2019 Standard 10.0 <X64> (Build 17763: )



All sql dump has stack trace (by day I had 30-40 sql-dump files)

  • BEGIN STACK DUMP:

  • 03/16/21 15:28:59 spid 4258

  • Exception Address = 00007FFC72003C01 Module(sqllang+00000000000B3C01)

  • Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION

  • Access Violation occurred reading address 0000000000000000

  • Input Buffer 510 bytes -


  • BEGIN STACK DUMP:

  • 03/17/21 10:27:36 spid 3101



  • Exception Address = 00007FFC35593C01 Module(sqllang+00000000000B3C01)

  • Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION

  • Access Violation occurred reading address 0000000000000000


I have also SQL 2017 with latest CU and didn't have any issues with this, the issue is only in SQL Server 2019

sql-server-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Stefan-1807 avatar image
0 Votes"
Stefan-1807 answered

Hi @SebastianOzdoba-7474

I got a similar error. See this thread https://docs.microsoft.com/en-us/answers/questions/318695/sql-server-2019-cu9-scalar-udf-inlining-issue.html
Not sure if you have the same (or similar) issue, but it might be worth looking into.

Regards
Stefan

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SebastianOzdoba-7474 avatar image
0 Votes"
SebastianOzdoba-7474 answered Stefan-1807 commented

Hi @Stefan-1807

I use UDF in select statment, my select and udf is quite simple

create database testdb
go
create table tab1 (col1 int, col2 varchar(20))
go
create table tab2 (tab2col1 int, tab2col2 varchar(50))
insert into tab1
select 1, 'abc'
insert into tab1
select 2, 'abcd'
insert into tab1
select 3, 'abcde'
insert into tab2
select 1, 'tab2test'
create Function [dbo].[Function1](@DokId Int)
Returns NVARCHAR(256)
As
Begin
Declare @Result NVARCHAR(256)
Select @Result = tab2col2 From tab2 Join tab1 On col1= tab2col1 Where tab2col1 = @DokId
Return IsNull(@result, '')
End
GO
SELECT dbo.Function1(col1), col1, col2
FROM tab1


My error is (but this error I am not always reproduce):
00007FFC72003C01 Module(sqllang+00000000000B3C01)

Your error is:
00007FFC6FAE2F95 Module(sqlmin+0000000000102F95)

Maybe they have common source, all crashes are on SELECT statment with UDF functions


· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,
I testet your code and it doesn´t crash for me when I run it in SSMS.
Do you get this error when running it?

0 Votes 0 ·

I know, this error is not always reproduce, I see it in sql-dump files, but when I run this query in SSMS i will not reproduce

0 Votes 0 ·
Stefan-1807 avatar image Stefan-1807 SebastianOzdoba-7474 ·

Ok, thanks.

0 Votes 0 ·
TomPhillips-1744 avatar image
0 Votes"
TomPhillips-1744 answered SebastianOzdoba-7474 commented

These kinds of problems are almost always problems in the SQL Server application code. I suggest you contact MS Support and see if they can help you resolve the issue.

If you do not have a service contract, they will ask for you to pay for the call, but normally refund the money if they determine it is a bug.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I will do that :)

0 Votes 0 ·