Open ccykevin opened 1 month ago
I've started getting the same issue on 4.33.0. I can confirm that setting the CPU limit to 1 fixes/mitigates the problem.
Full output below:
docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=testtest123" \
-p 1433:1433 \
mcr.microsoft.com/mssql/server:2017-latest
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
SQL Server 2017 will run as non-root by default.
This container is running as user root.
To learn more visit https://go.microsoft.com/fwlink/?linkid=2099216.
2024-08-27 11:02:21.27 Server Setup step is copying system data file 'C:\templatedata\master.mdf' to '/var/opt/mssql/data/master.mdf'.
2024-08-27 11:02:21.30 Server Did not find an existing master data file /var/opt/mssql/data/master.mdf, copying the missing default master and other system database files. If you have moved the database location, but not moved the database files, startup may fail. To repair: shutdown SQL Server, move the master database to configured location, and restart.
2024-08-27 11:02:21.31 Server Setup step is copying system data file 'C:\templatedata\mastlog.ldf' to '/var/opt/mssql/data/mastlog.ldf'.
2024-08-27 11:02:21.31 Server Setup step is copying system data file 'C:\templatedata\model.mdf' to '/var/opt/mssql/data/model.mdf'.
2024-08-27 11:02:21.31 Server Setup step is copying system data file 'C:\templatedata\modellog.ldf' to '/var/opt/mssql/data/modellog.ldf'.
2024-08-27 11:02:21.32 Server Setup step is copying system data file 'C:\templatedata\msdbdata.mdf' to '/var/opt/mssql/data/msdbdata.mdf'.
2024-08-27 11:02:21.33 Server Setup step is copying system data file 'C:\templatedata\msdblog.ldf' to '/var/opt/mssql/data/msdblog.ldf'.
2024-08-27 11:02:21.36 Server Microsoft SQL Server 2017 (RTM-CU31-GDR) (KB5029376) - 14.0.3465.1 (X64)
Jul 30 2023 15:31:58
Copyright (C) 2017 Microsoft Corporation
Developer Edition (64-bit) on Linux (Ubuntu 18.04.6 LTS)
2024-08-27 11:02:21.36 Server UTC adjustment: 0:00
2024-08-27 11:02:21.36 Server (c) Microsoft Corporation.
2024-08-27 11:02:21.36 Server All rights reserved.
2024-08-27 11:02:21.36 Server Server process ID is 396.
2024-08-27 11:02:21.36 Server Logging SQL Server messages in file '/var/opt/mssql/log/errorlog'.
2024-08-27 11:02:21.37 Server Registry startup parameters:
-d /var/opt/mssql/data/master.mdf
-l /var/opt/mssql/data/mastlog.ldf
-e /var/opt/mssql/log/errorlog
2024-08-27 11:02:21.37 Server SQL Server detected 1 sockets with 12 cores per socket and 12 logical processors per socket, 12 total logical processors; using 12 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
2024-08-27 11:02:21.37 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2024-08-27 11:02:21.37 Server Detected 6271 MB of RAM. This is an informational message; no user action is required.
2024-08-27 11:02:21.37 Server Using conventional memory in the memory manager.
2024-08-27 11:02:21.38 Server Page exclusion bitmap is enabled.
2024-08-27 11:02:21.45 Server Automatic soft-NUMA was enabled because SQL Server has detected hardware NUMA nodes with greater than 8 physical cores.
2024-08-27 11:02:21.49 Server Buffer pool extension is already disabled. No action is necessary.
2024-08-27 11:02:21.58 Server InitializeExternalUserGroupSid failed. Implied authentication will be disabled.
2024-08-27 11:02:21.59 Server Implied authentication manager initialization failed. Implied authentication will be disabled.
2024-08-27 11:02:21.59 Server Successfully initialized the TLS configuration. Allowed TLS protocol versions are ['1.0 1.1 1.2']. Allowed TLS ciphers are ['ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:!DHE-RSA-AES256-GCM-SHA384:!DHE-RSA-AES128-GCM-SHA256:!DHE-RSA-AES256-SHA:!DHE-RSA-AES128-SHA'].
2024-08-27 11:02:21.63 Server Query Store settings initialized with enabled = 1,
SetThreadAffinity failed: 87
2024-08-27 11:02:21.64 Server The maximum number of dedicated administrator connections for this instance is '1'
2024-08-27 11:02:21.65 Server Node configuration: node 0: CPU mask: 0x000000000000003f:0 Active CPU mask: 0x000000000000003f:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2024-08-27 11:02:21.65 Server Node configuration: node 1: CPU mask: 0x0000000000000fc0:0 Active CPU mask: 0x0000000000000fc0:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2024-08-27 11:02:21.66 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
2024-08-27 11:02:21.67 Server In-Memory OLTP initialized on lowend machine.
2024-08-27 11:02:21.71 Server Database Instant File Initialization: enabled. For security and performance considerations see the topic 'Database Instant File Initialization' in SQL Server Books Online. This is an informational message only. No user action is required.
ForceFlush is enabled for this instance.
2024-08-27 11:02:21.73 Server Software Usage Metrics is disabled.
2024-08-27 11:02:21.74 spid7s Starting up database 'master'.
ForceFlush feature is enabled for log durability.
2024-08-27 11:02:21.78 spid7s The tail of the log for database master is being rewritten to match the new sector size of 4096 bytes. 3072 bytes at offset 418816 in file /var/opt/mssql/data/mastlog.ldf will be written.
2024-08-27 11:02:21.89 spid7s Converting database 'master' from version 862 to the current version 869.
2024-08-27 11:02:21.89 spid7s Database 'master' running the upgrade step from version 862 to version 863.
2024-08-27 11:02:21.93 spid7s Database 'master' running the upgrade step from version 863 to version 864.
2024-08-27 11:02:21.95 spid7s Database 'master' running the upgrade step from version 864 to version 865.
2024-08-27 11:02:21.95 spid7s Database 'master' running the upgrade step from version 865 to version 866.
2024-08-27 11:02:21.95 spid7s Database 'master' running the upgrade step from version 866 to version 867.
2024-08-27 11:02:21.95 spid7s Database 'master' running the upgrade step from version 867 to version 868.
2024-08-27 11:02:21.96 spid7s Database 'master' running the upgrade step from version 868 to version 869.
This program has encountered a fatal error and cannot continue running at Tue Aug 27 11:02:22 2024
The following diagnostic information is available:
Reason: 0x00000001
Signal: SIGABRT - Aborted (6)
Stack:
IP Function
---------------- --------------------------------------
000055555569e9ec <unknown>
000055555569e432 <unknown>
000055555569da41 <unknown>
00007ffffcd2af10 killpg+0x40
00007ffffcd2ae87 gsignal+0xc7
00007ffffcd2c7f1 abort+0x141
0000555555632672 <unknown>
00005555556b5204 <unknown>
00005555556e81f8 <unknown>
00005555556e7fda <unknown>
000055555563e4ea <unknown>
000055555563e13f <unknown>
Process: 9 - sqlservr
Thread: 154 (application thread 0x260)
Instance Id: 78d4d1eb-8c3c-4fd6-92df-a3a2574bcb5a
Crash Id: b1fb2d29-4392-4e3b-96b4-1c2b759ba25d
Build stamp: 388f6c66c6dbc4da12ba35a003fcb9b5e0f65b6bc460dbf45ba9cf2562768e67
Distribution: Ubuntu 18.04.6 LTS
Processors: 12
Total Memory: 8219254784 bytes
Timestamp: Tue Aug 27 11:02:22 2024
Last errno: 2
Last errno text: No such file or directory
Capturing a dump of 9
FAILED to capture a dump. Details in paldumper log.
Executing: /opt/mssql/bin/handle-crash.sh with parameters
handle-crash.sh
/opt/mssql/bin/sqlservr
9
/opt/mssql/bin
/var/opt/mssql/log/
78d4d1eb-8c3c-4fd6-92df-a3a2574bcb5a
b1fb2d29-4392-4e3b-96b4-1c2b759ba25d
Ubuntu 18.04.6 LTS
Capturing core dump and information to /var/opt/mssql/log...
dmesg: read kernel buffer failed: Operation not permitted
/usr/bin/timeout: failed to run command '/bin/journalctl': No such file or directory
/usr/bin/timeout: failed to run command '/bin/journalctl': No such file or directory
Tue Aug 27 11:02:27 UTC 2024 Capturing program information
Tue Aug 27 11:02:28 UTC 2024 Attempting to capture a dump with paldumper for pid 9
WARNING: Capture attempt failure detected
Attempting to capture a filtered dump with paldumper for pid 9
WARNING: Attempt to capture dump failed. Reference /var/opt/mssql/log/core.sqlservr.9.temp/log/paldumper-debug.log for details
Tue Aug 27 11:02:28 UTC 2024 Attempting to capture a dump with gdb
Tue Aug 27 11:02:28 UTC 2024 Captured a dump with gdb
Tue Aug 27 11:02:28 UTC 2024 Capturing program binaries
Tue Aug 27 11:02:30 UTC 2024 Not compressing the dump files, moving instead to: /var/opt/mssql/log/core.sqlservr.08_27_2024_11_02_22.9.d
Description
I’ve tried using versions 4.32.0, 4.27.2, 4.26.1, 4.26.0, and 4.20.1. In all cases, the startup was successful, and I was able to connect. However, after about 5 minutes, the process exits with Error Code 139. Even after a normal reboot, the issue persists, and it still results in Exited (139).
Reproduce
docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=Password123456' --name sql_server --platform linux/amd64 -p 1433:1433 -d mcr.microsoft.com/mssql/server:2022-latest
Expected behavior
Not crashing
docker version
docker info
Diagnostics ID
FCD7F5C4-CE9A-4B52-8B29-4880F70C1F67/20240810111527
Additional Info
CPU limit to 1 seems like work fine