microsoft / mssql-docker

Official Microsoft repository for SQL Server in Docker resources
MIT License
1.71k stars 755 forks source link

SQL Server Hang and Crash after backup in Docker #820

Open robinhalabicki opened 1 year ago

robinhalabicki commented 1 year ago

We have a SQL instance running in docker for Bitwarden.

The backup finishes and shortly after a crash.

Backup: 2023-03-23 00:00:04.85 Backup BACKUP DATABASE successfully processed 7682 pages in 4.729 seconds (12.690 MB/sec). This program has encountered a fatal error and cannot continue running at Thu Mar 23 13:47:56 2023

The crash log: `The following diagnostic information is available:

     Reason: 0x00000004
    Message: RETAIL ASSERT: Expression=(!"A timeout or deadlock was encountered while waiting" " for a thread to terminate/suspend/resume.") File=NtumWaiter.cpp Line=702
Stack Trace:
             file://package4/windows/system32/sqlpal.dll+0x000000000000E16F
             file://package4/windows/system32/sqlpal.dll+0x000000000000CEF3
             file://package4/windows/system32/sqlpal.dll+0x0000000000013F3B
             file://package4/windows/system32/sqlpal.dll+0x00000000000A271E
             file://package4/windows/system32/sqlpal.dll+0x000000000006B929
             file://package4/windows/system32/sqlpal.dll+0x000000000005D621
             file://package4/windows/system32/sqlpal.dll+0x000000000005D19C
             file://package4/windows/system32/sqlpal.dll+0x000000000005A269
             file://package4/windows/system32/sqlpal.dll+0x0000000000003D1F
             file://package4/windows/system32/sqlpal.dll+0x0000000000202398
             file:///Windows/SYSTEM32/KERNELBASE.dll+0x0000000000070A5F
             file:///binn/sqlmin.dll+0x00000000001F0198
             file:///binn/sqlmin.dll+0x00000000001F0477
             file:///binn/sqlservr.exe+0x0000000000004894
             file:///binn/sqldk.dll+0x0000000000116390
             file:///binn/sqldk.dll+0x0000000000013DF8
             file:///binn/sqldk.dll+0x00000000001147C9
             file:///binn/sqldk.dll+0x0000000000009E53
             file:///binn/sqldk.dll+0x000000000000A28F
             file:///binn/sqldk.dll+0x000000000000A05E
             file:///binn/sqldk.dll+0x00000000000279A2
             file:///binn/sqldk.dll+0x0000000000027B9F
             file:///binn/sqldk.dll+0x00000000000283FA
             file:///Windows/SYSTEM32/KERNEL32.DLL+0x0000000000014414
             file:///windows/system32/ntdll.dll+0x0000000000075541
    Modules:
             file://package4/windows/system32/sqlpal.dll=2783696C75EB41553CC5480CD7503AC51
             file:///Windows/SYSTEM32/KERNELBASE.dll=ACB8C8887582458AADBABAF6F2400B2C2
             file:///binn/sqlmin.dll=47C817319B2847F3B15D7F502A5A9B9A2
             file:///binn/sqlservr.exe=04BAAAEE89C640B3BACF9D14021A95A52
             file:///binn/sqldk.dll=98E863FDEEF04423903854CB0E05C83A2
             file:///Windows/SYSTEM32/KERNEL32.DLL=C715300FB2664729A6126A3F591E6F302
             file:///windows/system32/ntdll.dll=45137AA3F9814512B3123991067EEE6E2
    Process: 46 - sqlservr
     Thread: 160 (application thread 0x19c)
Instance Id: 0917c009-d788-494e-b15c-ee826f5449be
   Crash Id: 3921362a-457b-4b22-b2f1-312562ee304f
Build stamp: e5dea205d0938e2848fb2509856a7e8f30783e6d5f62d0c88355e288de0db89a

Distribution: Ubuntu 20.04.4 LTS Processors: 1 Total Memory: 2081599488 bytes Timestamp: Thu Mar 23 13:47:56 2023`

PepeFuego369 commented 10 months ago

Hello, were you able to find a solution to the issue. I am experiencing the same issue on my sql server 2019 server on Ubuntu 20.04.5 LTS.

euregon commented 2 months ago

Same problem here. Tried everything. Mssql server 2019 and 2022.

AlexanderSchuetz97 commented 1 month ago

Same problem only change is "File=NtumWaiter.cpp Line=829" when importing a dump file. This occurs randomly on all my gitlab runners. Its about 20-30% odds. Ive been unable to see any pattern. I am using sqlserver 2022 that gets updated daily to whatever the microsofts apt repo hands out. Ive had this for a couple of months consistently. OS is Ubuntu 20.04.6 LTS.

I am honestly considering having my test code parse the STDOUT of the sqlserver and just look for "Message: RETAIL ASSERT" and have that be a trigger to sigkill to sqlserver and restart it. This always happens when the database is restored before a test case...