MSSQL container fails due to missing syscal argument
- Dominant language
- Go
- Stars
- 19.3k
- Forks
- 2k
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 264
Description
### Description
```
docker run --runtime=runsc -e "MSSQL_ENABLE_HADR=0" -e "MSSQL_PID=Express" -v /tmp/socket:/tmp/socket -v
/home/liron/Downloads/userdata/data:/tmp/data -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=YourStrongPassw0rd" --name sqlserver -d mcr.microsoft.com/mssql/server
```
Crashes with the following logs:
```
The following diagnostic information is available:
Reason: 0x00000007
Status: 0x00000000
Message: BOOT: FATAL: Failed to initialize initial thread -1073741823
Process: 4 - sqlservr
Thread: 9
Instance Id: 14b18a39-6c46-4906-bb25-01f752b1d4a2
Crash Id: 5f8b2bd8-1882-42b1-8011-7eab6f0f22f2
Build stamp: 37246ef8816ea823c6820306d0b9c82d559924f0b19b80c72855e58b0e4b145f
Distribution: Ubuntu 22.04.5 LTS
Processors: 16
Total Memory: 46099476480 bytes
Timestamp: Mon Nov 4 14:44:41 2024
Last errno: 22
Last errno text: Invalid argument
Capturing a dump of 4
sqlservr: utils.cpp:561: uintptr_t GetEndOfLibOSVmRange(): Assertion `GetGlobals()->GetStatics()->IsLibOSVmmRangeEndValid()' failed.
```
Debug logs:
```
I1104 16:38:17.962665 1460517 strace.go:602] [ 4: 9] sqlservr X arch_prctl(0x1001, 0x3fffba240000) = 0 (0x0) errno=22 (invalid argument) (31.168µs)
```
And this:
```
syscalls.PartiallySupported("arch_prctl", ArchPrctl, "Options ARCH_GET_GS, ARCH_SET_GS not supported.", nil),
```
Why are those syscall arguments not implemented?
### Steps to reproduce
```
docker run --runtime=runsc -e "MSSQL_ENABLE_HADR=0" -e "MSSQL_PID=Express" -v /tmp/socket:/tmp/socket -v
/home/liron/Downloads/userdata/data:/tmp/data -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=YourStrongPassw0rd" --name sqlserver -d mcr.microsoft.com/mssql/server
```
### runsc version
runsc version release-20241028.0
spec: 1.1.0-rc.1
### docker version (if using docker)
```
\Client: Docker Engine - Community
Version: 24.0.5
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.11.2
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.20.2
Path: /usr/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 20
Running: 0
Paused: 0
Stopped: 20
Images: 18
Server Version: 24.0.5
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc runsc runsc-unix-debug
Default Runtime: runc
Init Binary: docker-init
containerd version: 3dce8eb055cbb6872793272b4f20ed16117344f8
runc version: v1.1.7-0-g860f061
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.8.0-47-generic
Operating System: Ubuntu 22.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 16
Total Memory: 42.93GiB
Name: liron-ThinkPad
ID: 5K57:D7LR:BPAE:FCFG:CCKI:UVE3:M7NP:L2I5:ZEYJ:GVYS:P7FR:AGM5
Docker Root Dir: /var/lib/docker
Debug Mode: false
Username: eksclustergames
Experimental: false
Insecure Registries:
127.0.0.0/8
```
### uname
Linux liron-ThinkPad 6.8.0-47-generic #47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Oct 2 16:16:55 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
### kubectl (if using Kubernetes)
_No response_
### repo state (if built from source)
_No response_
### runsc debug logs (if available)
```
1104 16:38:17.962558 1460517 usertrap_amd64.go:210] [ 4: 9] Found the pattern at ip 7ebf6c7269e4:sysno 158
D1104 16:38:17.962585 1460517 usertrap_amd64.go:122] [ 4: 9] Allocate a new trap: 0xc000811350 69
D1104 16:38:17.962601 1460517 usertrap_amd64.go:223] [ 4: 9] Apply the binary patch addr 7ebf6c7269e4 trap addr 63590 ([184 158 0 0 0 15 5] -> [255 36 37 144 53 6 0])
I1104 16:38:17.962618 1460517 strace.go:564] [ 4: 9] sqlservr E arch_prctl(0x1001, 0x3fffba240000)
I1104 16:38:17.962641 1460517 compat.go:120] Unsupported syscall arch_prctl(0x1001,0x3fffba240000,0x0,0x3fffba23aec8,0x8,0x0). It is likely that you can safely ignore this message and that this is not the cause of any error. Please, refer to https://gvisor.dev/c/linux/amd64/arch_prctl for more information.
I1104 16:38:17.962665 1460517 strace.go:602] [ 4: 9] sqlservr X arch_prctl(0x1001, 0x3fffba240000) = 0 (0x0) errno=22 (invalid argument) (31.168µs)
D1104 16:38:17.962696 1460517 usertrap_amd64.go:210] [ 4: 9] Found the pattern at ip 7ebf6c714fe4:sysno 32
D1104 16:38:17.962710 1460517 usertrap_amd64.go:122] [ 4: 9] Allocate a new trap: 0xc000811350 70
D1104 16:38:17.962723 1460517 usertrap_amd64.go:223] [ 4: 9] Apply the binary patch addr 7ebf6c714fe4 trap addr 635e0 ([184 32 0 0 0 15 5] -> [255 36 37 224 53 6 0])
I1104 16:38:17.962741 1460517 strace.go:561] [ 4: 9] sqlservr E dup(0x2 host:[3])
I1104 16:38:17.962757 1460517 strace.go:599] [ 4: 9] sqlservr X dup(0x2 host:[3]) = 20 (0x14) (2.805µs)
I1104 16:38:17.962787 1460517 strace.go:567] [ 4: 9] sqlservr E fcntl(0x14 host:[3], 0x3, 0x0)
I1104 16:38:17.962804 1460517 strace.go:605] [ 4: 9] sqlservr X fcntl(0x14 host:[3], 0x3, 0x0) = 1025 (0x401) (1.543µs)
I1104 16:38:17.962824 1460517 strace.go:561] [ 4: 9] sqlservr E close(0x14 host:[
```
Contributor guide
Assessment
This issue has not been assessed yet.