cli icon indicating copy to clipboard operation
cli copied to clipboard

Docker CLI crashes when using with --no-trunc

Open eben0 opened this issue 5 months ago • 2 comments

Description

Docker CLI crashes when using with --no-trunc

docker --context my-context service ps  --no-trunc my_service

Error:

start shim: start failed: runtime: failed to create new OS thread (have 5 already; errno=11)
runtime: may need to increase max user processes (ulimit -u)
fatal error: newosproc

runtime stack:
runtime.throw({0xaefb24?, 0x7ffef9f58178?})
          /usr/local/go/src/runtime/panic.go:1073 +0x48 fp=0x7ffef9f58150 sp=0x7ffef9f58120 pc=0x46f488
runtime.newosproc(0xc000067508)
          /usr/local/go/src/runtime/os_linux.go:195 +0x165 fp=0x7ffef9f581c0 sp=0x7ffef9f58150 pc=0x434c05
runtime.newm1(0xc000067508)
          /usr/local/go/src/runtime/proc.go:2805 +0xbf fp=0x7ffef9f58200 sp=0x7ffef9f581c0 pc=0x43fa3f
runtime.newm(0x232bfc?, 0xc00004e008, 0x0?)
          /usr/local/go/src/runtime/proc.go:2780 +0x125 fp=0x7ffef9f58230 sp=0x7ffef9f58200 pc=0x43f905
runtime.startm(0xc00004e008?, 0x0, 0x0)
          /usr/local/go/src/runtime/proc.go:2974 +0x159 fp=0x7ffef9f58280 sp=0x7ffef9f58230 pc=0x43fef9
runtime.handoffp(0x7ffef9f582f0?)
          /usr/local/go/src/runtime/proc.go:3015 +0x358 fp=0x7ffef9f582a8 sp=0x7ffef9f58280 pc=0x4403d8
runtime.stoplockedm()
          /usr/local/go/src/runtime/proc.go:3137 +0x52 fp=0x7ffef9f58300 sp=0x7ffef9f582a8 pc=0x440452
runtime.schedule()
          /usr/local/go/src/runtime/proc.go:3975 +0x3a fp=0x7ffef9f58338 sp=0x7ffef9f58300 pc=0x4427ba
runtime.park_m(0xc0000061c0)
          /usr/local/go/src/runtime/proc.go:4103 +0x1eb fp=0x7ffef9f58390 sp=0x7ffef9f58338 pc=0x442c4b
runtime.mcall()
          /usr/local/go/src/runtime/asm_amd64.s:459 +0x4e fp=0x7ffef9f583a8 sp=0x7ffef9f58390 pc=0x47540e

goroutine 1 gp=0xc0000061c0 m=nil [runnable, locked to thread]:
runtime.gopark(0xc00007e000?, 0x7fb63af467e8?, 0x10?, 0x0?, 0x0?)
          /usr/local/go/src/runtime/proc.go:424 +0xce fp=0xc000060688 sp=0xc000060668 pc=0x46f5ae
runtime.chanrecv(0xc00007a000, 0x0, 0x1)
          /usr/local/go/src/runtime/chan.go:639 +0x41c fp=0xc000060700 sp=0xc000060688 pc=0x409c3c
runtime.chanrecv1(0xff4538?, 0x2?)
          /usr/local/go/src/runtime/chan.go:489 +0x12 fp=0xc000060728 sp=0xc000060700 pc=0x4097f2
runtime.gcenable()
          /usr/local/go/src/runtime/mgc.go:207 +0xbd fp=0xc000060750 sp=0xc000060728 pc=0x41a0dd
runtime.main()
          /usr/local/go/src/runtime/proc.go:211 +0x165 fp=0xc0000607e0 sp=0xc000060750 pc=0x43af45
runtime.goexit({})
          /usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0000607e8 sp=0xc0000607e0 pc=0x4772c1

goroutine 2 gp=0xc000006700 m=nil [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
          /usr/local/go/src/runtime/proc.go:424 +0xce fp=0xc000060fa8 sp=0xc000060f88 pc=0x46f5ae
runtime.goparkunlock(...)
          /usr/local/go/src/runtime/proc.go:430
runtime.forcegchelper()
          /usr/local/go/src/runtime/proc.go:337 +0xb3 fp=0xc000060fe0 sp=0xc000060fa8 pc=0x43b3b3
runtime.goexit({})
          /usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000060fe8 sp=0xc000060fe0 pc=0x4772c1
created by runtime.init.7 in goroutine 1
          /usr/local/go/src/runtime/proc.go:325 +0x1a

goroutine 3 gp=0xc000006c40 m=nil [GC sweep wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
          /usr/local/go/src/runtime/proc.go:424 +0xce fp=0xc000061780 sp=0xc000061760 pc=0x46f5ae
runtime.goparkunlock(...)
          /usr/local/go/src/runtime/proc.go:430
runtime.bgsweep(0xc00007a000)
          /usr/local/go/src/runtime/mgcsweep.go:277 +0x94 fp=0xc0000617c8 sp=0xc000061780 pc=0x425b14
runtime.gcenable.gowrap1()
          /usr/local/go/src/runtime/mgc.go:204 +0x25 fp=0xc0000617e0 sp=0xc0000617c8 pc=0x41a185
runtime.goexit({})
          /usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0000617e8 sp=0xc0000617e0 pc=0x4772c1
created by runtime.gcenable in goroutine 1
          /usr/local/go/src/runtime/mgc.go:204 +0x66

goroutine 4 gp=0xc000006e00 m=nil [GC scavenge wait]:
runtime.gopark(0xc00007a000?, 0xbd05b8?, 0x1?, 0x0?, 0xc000006e00?)
          /usr/local/go/src/runtime/proc.go:424 +0xce fp=0xc000061f78 sp=0xc000061f58 pc=0x46f5ae
runtime.goparkunlock(...)
          /usr/local/go/src/runtime/proc.go:430
runtime.(*scavengerState).park(0x1055ec0)
          /usr/local/go/src/runtime/mgcscavenge.go:425 +0x49 fp=0xc000061fa8 sp=0xc000061f78 pc=0x423549
runtime.bgscavenge(0xc00007a000)
          /usr/local/go/src/runtime/mgcscavenge.go:653 +0x3c fp=0xc000061fc8 sp=0xc000061fa8 pc=0x423abc
runtime.gcenable.gowrap2()
          /usr/local/go/src/runtime/mgc.go:205 +0x25 fp=0xc000061fe0 sp=0xc000061fc8 pc=0x41a125
runtime.goexit({})
          /usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000061fe8 sp=0xc000061fe0 pc=0x4772c1
created by runtime.gcenable in goroutine 1
                            /usr/local/go/src/runtime/mgc.go:205 +0xa5
: exit status 2"
vhcbmndyjsixskessq18825a3  [REDUCTED]   Shutdown   Failed about an hour ago   "starting container failed: failed to create task for container: failed to start shim: start failed: runtime: failed to create new OS thread (have 4 already; errno=11)
runtime: may need to increase max user processes (ulimit -u)
fatal error: newosproc

runtime stack:
runtime.throw({0xaefb24?, 0x7ffe1ed07148?})
          /usr/local/go/src/runtime/panic.go:1073 +0x48 fp=0x7ffe1ed07120 sp=0x7ffe1ed070f0 pc=0x46f488
runtime.newosproc(0xc000066e08)
          /usr/local/go/src/runtime/os_linux.go:195 +0x165 fp=0x7ffe1ed07190 sp=0x7ffe1ed07120 pc=0x434c05
runtime.newm1(0xc000066e08)
          /usr/local/go/src/runtime/proc.go:2805 +0xbf fp=0x7ffe1ed071d0 sp=0x7ffe1ed07190 pc=0x43fa3f
runtime.newm(0x7fcea0a23fc8?, 0xc00004e008, 0x20?)
          /usr/local/go/src/runtime/proc.go:2780 +0x125 fp=0x7ffe1ed07200 sp=0x7ffe1ed071d0 pc=0x43f905
runtime.startm(0xc00004e008?, 0x0, 0x0)
          /usr/local/go/src/runtime/proc.go:2974 +0x159 fp=0x7ffe1ed07250 sp=0x7ffe1ed07200 pc=0x43fef9
runtime.handoffp(0x1060420?)
          /usr/local/go/src/runtime/proc.go:3015 +0x358 fp=0x7ffe1ed07278 sp=0x7ffe1ed07250 pc=0x4403d8
runtime.stoplockedm()
          /usr/local/go/src/runtime/proc.go:3137 +0x52 fp=0x7ffe1ed072d0 sp=0x7ffe1ed07278 pc=0x440452
runtime.schedule()
          /usr/local/go/src/runtime/proc.go:3975 +0x3a fp=0x7ffe1ed07308 sp=0x7ffe1ed072d0 pc=0x4427ba
runtime.park_m(0xc0000061c0)
          /usr/local/go/src/runtime/proc.go:4103 +0x1eb fp=0x7ffe1ed07360 sp=0x7ffe1ed07308 pc=0x442c4b
runtime.mcall()
          /usr/local/go/src/runtime/asm_amd64.s:459 +0x4e fp=0x7ffe1ed07378 sp=0x7ffe1ed07360 pc=0x47540e

goroutine 1 gp=0xc0000061c0 m=nil [runnable, locked to thread]:
runtime.gopark(0x0?, 0x7fcea0a247e8?, 0x10?, 0x0?, 0x0?)
          /usr/local/go/src/runtime/proc.go:424 +0xce fp=0xc000060688 sp=0xc000060668 pc=0x46f5ae
runtime.chanrecv(0xc00007a000, 0x0, 0x1)
          /usr/local/go/src/runtime/chan.go:639 +0x41c fp=0xc000060700 sp=0xc000060688 pc=0x409c3c
runtime.chanrecv1(0xff4538?, 0x2?)
          /usr/local/go/src/runtime/chan.go:489 +0x12 fp=0xc000060728 sp=0xc000060700 pc=0x4097f2
runtime.gcenable()
          /usr/local/go/src/runtime/mgc.go:206 +0xb1 fp=0xc000060750 sp=0xc000060728 pc=0x41a0d1
runtime.main()
          /usr/local/go/src/runtime/proc.go:211 +0x165 fp=0xc0000607e0 sp=0xc000060750 pc=0x43af45
runtime.goexit({})
          /usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0000607e8 sp=0xc0000607e0 pc=0x4772c1

goroutine 2 gp=0xc000006700 m=nil [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
          /usr/local/go/src/runtime/proc.go:424 +0xce fp=0xc000060fa8 sp=0xc000060f88 pc=0x46f5ae
runtime.goparkunlock(...)
          /usr/local/go/src/runtime/proc.go:430
runtime.forcegchelper()
          /usr/local/go/src/runtime/proc.go:337 +0xb3 fp=0xc000060fe0 sp=0xc000060fa8 pc=0x43b3b3
runtime.goexit({})
          /usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000060fe8 sp=0xc000060fe0 pc=0x4772c1
created by runtime.init.7 in goroutine 1
          /usr/local/go/src/runtime/proc.go:325 +0x1a

goroutine 3 gp=0xc000006c40 m=nil [GC sweep wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
          /usr/local/go/src/runtime/proc.go:424 +0xce fp=0xc000061780 sp=0xc000061760 pc=0x46f5ae
runtime.goparkunlock(...)
          /usr/local/go/src/runtime/proc.go:430
runtime.bgsweep(0xc00007a000)
          /usr/local/go/src/runtime/mgcsweep.go:277 +0x94 fp=0xc0000617c8 sp=0xc000061780 pc=0x425b14
runtime.gcenable.gowrap1()
          /usr/local/go/src/runtime/mgc.go:204 +0x25 fp=0xc0000617e0 sp=0xc0000617c8 pc=0x41a185
runtime.goexit({})
          /usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0000617e8 sp=0xc0000617e0 pc=0x4772c1
created by runtime.gcenable in goroutine 1
          /usr/local/go/src/runtime/mgc.go:204 +0x66

goroutine 4 gp=0xc000006e00 m=nil [runnable]:
runtime.gcenable.gowrap2()
          /usr/local/go/src/runtime/mgc.go:205 fp=0xc000061fe0 sp=0xc000061fd8 pc=0x41a100
runtime.goexit({})
          /usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000061fe8 sp=0xc000061fe0 pc=0x4772c1
created by runtime.gcenable in goroutine 1
                   /usr/local/go/src/runtime/mgc.go:205 +0xa5
: exit status 2"

Reproduce

docker --context my-context service ps --no-trunc my_service

Expected behavior

No response

docker version

Client:
 Version:           28.3.3
 API version:       1.51
 Go version:        go1.24.5
 Git commit:        980b856
 Built:             Fri Jul 25 11:36:03 2025
 OS/Arch:           windows/amd64
 Context:           desktop-linux

Server: Docker Desktop 4.45.0 (203075)
 Engine:
  Version:          28.3.3
  API version:      1.51 (minimum version 1.24)
  Go version:       go1.24.5
  Git commit:       bea959c
  Built:            Fri Jul 25 11:34:00 2025
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.27
  GitCommit:        05044ec0a9a75232cad458027ca83437aae3f4da
 runc:
  Version:          1.2.5
  GitCommit:        v1.2.5-0-g59923ef
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker info

Client:
 Version:    28.3.3
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  ai: Docker AI Agent - Ask Gordon (Docker Inc.)
    Version:  v1.9.11
    Path:     C:\Program Files\Docker\cli-plugins\docker-ai.exe
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.27.0-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-buildx.exe
  cloud: Docker Cloud (Docker Inc.)
    Version:  v0.4.21
    Path:     C:\Program Files\Docker\cli-plugins\docker-cloud.exe
  compose: Docker Compose (Docker Inc.)
    Version:  v2.39.2-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-compose.exe
  debug: Get a shell into any image or container (Docker Inc.)
    Version:  0.0.42
    Path:     C:\Program Files\Docker\cli-plugins\docker-debug.exe
  desktop: Docker Desktop commands (Docker Inc.)
    Version:  v0.2.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-desktop.exe
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.31
    Path:     C:\Program Files\Docker\cli-plugins\docker-extension.exe
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.4.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-init.exe
  mcp: Docker MCP Plugin (Docker Inc.)
    Version:  v0.15.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-mcp.exe
  model: Docker Model Runner (EXPERIMENTAL) (Docker Inc.)
    Version:  v0.1.39
    Path:     C:\Program Files\Docker\cli-plugins\docker-model.exe
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-sbom.exe
  scout: Docker Scout (Docker Inc.)
    Version:  v1.18.3
    Path:     C:\Program Files\Docker\cli-plugins\docker-scout.exe

Server:
 Containers: 1
  Running: 1
  Paused: 0
  Stopped: 0
 Images: 5
 Server Version: 28.3.3
 Storage Driver: overlayfs
  driver-type: io.containerd.snapshotter.v1
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 CDI spec directories:
  /etc/cdi
  /var/run/cdi
 Discovered Devices:
  cdi: docker.com/gpu=webgpu
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 nvidia runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 05044ec0a9a75232cad458027ca83437aae3f4da
 runc version: v1.2.5-0-g59923ef
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.6.87.2-microsoft-standard-WSL2
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 7.715GiB
 Name: docker-desktop
 ID: 70b408bd-6717-4c5d-b38e-eefcb68b8574
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Labels:
  com.docker.desktop.address=npipe://\\.\pipe\docker_cli
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5555
  ::1/128
  127.0.0.0/8
 Live Restore Enabled: false

Additional Info

No response

eben0 avatar Sep 05 '25 11:09 eben0

The error looks to be on the daemon side, but your example shows you're using --context my-context, but the docker version and docker info output are using the desktop-linux context; can you provide docker version and docker info when using the --context my-context option? (docker --context my-context version and docker --context my-context info)?

thaJeztah avatar Sep 05 '25 15:09 thaJeztah

docker --context eben0-tls version

Client:
 Version:           28.3.3
 API version:       1.49 (downgraded from 1.51)
 Go version:        go1.24.5
 Git commit:        980b856
 Built:             Fri Jul 25 11:33:09 2025
 OS/Arch:           linux/amd64
 Context:           eben0-tls

Server: Docker Engine - Community
 Engine:
  Version:          28.1.1
  API version:      1.49 (minimum version 1.24)
  Go version:       go1.23.8
  Git commit:       01f442b
  Built:            Fri Apr 18 09:52:18 2025
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.27
  GitCommit:        05044ec0a9a75232cad458027ca83437aae3f4da
 runc:
  Version:          1.2.5
  GitCommit:        v1.2.5-0-g59923ef
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker --context eben0-tls info

Client:
 Version:    28.3.3
 Context:    eben0-tls
 Debug Mode: false
 Plugins:
  ai: Docker AI Agent - Ask Gordon (Docker Inc.)
    Version:  v1.9.11
    Path:     /usr/local/lib/docker/cli-plugins/docker-ai
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.27.0-desktop.1
    Path:     /usr/local/lib/docker/cli-plugins/docker-buildx
  cloud: Docker Cloud (Docker Inc.)
    Version:  v0.4.21
    Path:     /usr/local/lib/docker/cli-plugins/docker-cloud
  compose: Docker Compose (Docker Inc.)
    Version:  v2.39.2-desktop.1
    Path:     /usr/local/lib/docker/cli-plugins/docker-compose
  debug: Get a shell into any image or container (Docker Inc.)
    Version:  0.0.42
    Path:     /usr/local/lib/docker/cli-plugins/docker-debug
  desktop: Docker Desktop commands (Docker Inc.)
    Version:  v0.2.0
    Path:     /usr/local/lib/docker/cli-plugins/docker-desktop
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.31
    Path:     /usr/local/lib/docker/cli-plugins/docker-extension
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.4.0
    Path:     /usr/local/lib/docker/cli-plugins/docker-init
  mcp: Docker MCP Plugin (Docker Inc.)
    Version:  v0.15.0
    Path:     /usr/local/lib/docker/cli-plugins/docker-mcp
  model: Docker Model Runner (EXPERIMENTAL) (Docker Inc.)
    Version:  v0.1.39
    Path:     /usr/local/lib/docker/cli-plugins/docker-model
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     /usr/local/lib/docker/cli-plugins/docker-sbom
  scout: Docker Scout (Docker Inc.)
    Version:  v1.18.3
    Path:     /usr/local/lib/docker/cli-plugins/docker-scout

Server:
 Containers: 14
  Running: 5
  Paused: 0
  Stopped: 9
 Images: 9
 Server Version: 28.1.1
 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: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: active
  NodeID: p0l6ig7cdupvrotlg7sa022ab
  Is Manager: true
  ClusterID: kzyyx3mt7nlzf3o1pk1wa98wm
  Managers: 1
  Nodes: 1
  Default Address Pool: 10.0.0.0/8
  SubnetSize: 24
  Data Path Port: 4789
  Orchestration:
   Task History Retention Limit: 5
  Raft:
   Snapshot Interval: 10000
   Number of Old Snapshots to Retain: 0
   Heartbeat Tick: 1
   Election Tick: 10
  Dispatcher:
   Heartbeat Period: 5 seconds
  CA Configuration:
   Expiry Duration: 3 months
   Force Rotate: 0
  Autolock Managers: false
  Root Rotation In Progress: false
  Node Address: 
  Manager Addresses:
   
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 05044ec0a9a75232cad458027ca83437aae3f4da
 runc version: v1.2.5-0-g59923ef
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
 Kernel Version: 5.4.0
 Operating System: Ubuntu 20.04.6 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 3
 Total Memory: 4GiB
 Name: 
 ID: T3ZB:VNUL:7QPN:NMN6:7LVQ:ELX4:FYUU:PRKP:LLDB:6NPH:PSJH:OJGX
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  ::1/128
  127.0.0.0/8
 Live Restore Enabled: false

eben0 avatar Sep 06 '25 09:09 eben0