oivq4cb5
(Oivq4cb5)
June 17, 2022, 6:24pm
1
While trying to start docker-compose i am getting this error:
ERROR: for private_web_1 Cannot start service web: start failed: runtime: failed to create new OS thread (have 8 already; errno=11)
runtime: may need to increase max user processes (ulimit -u)
fatal error: newosproc
my setup is hier: Nginx error: connect() failed (111: Connection refused) while connecting to upstream
any help would be highly appreciated.
rimelek
(Ákos Takács)
June 17, 2022, 10:25pm
2
When you get error messages that indicate OS related issues, please share more infomration about your OS. Is it Mac, Windows or Linux? Does it have ARM or AMD64 cpu?
Without that I could only search for the title of the topic and found this:
opened 09:31PM - 16 Jan 22 UTC
closed 12:16AM - 16 Jun 22 UTC
version/4.3.2
<!--
************************************************************************… ************
*READ ME FIRST*
This repository is for reporting bugs with the Docker Desktop for Mac software,
which we respond to on a best-effort basis.
Do *not* paste logfiles into github issues: upload diagnostics instead, which are
only visible to Docker engineers.
Support requests in this repository (i.e., trouble installing or using the
software) will be ignored, but personalized support is available to Docker Pro and
Team customers at https://hub.docker.com/support/desktop/, and community support is
available from the Docker community Slack (https://www.docker.com/docker-community).
Issues without sufficient detail to debug them will be closed. They generally need
a clear title and description, steps to reproduce, and a diagnostics ID. See
https://docs.docker.com/docker-for-windows/troubleshoot/#diagnose-and-feedback for
how to generate a diagnostics ID either from inside the app or from the command line.
************************************************************************************
-->
- [x] I have tried with the latest version of Docker Desktop
- [x] I have tried disabling enabled experimental features
- [x] I have uploaded Diagnostics
- Diagnostics ID: CD89DDF1-5DF9-4B62-A6CF-88A2A7B38242/20220116205359
### Expected behavior
Run successfully `linux/am64` containers of old services (`mysql:5.x`, `elasticsearch:1.x` ...) on `arm64` (Apple M1)
### Actual behavior
Failed with the error :
```
runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc
runtime stack:
runtime.throw(0x524da0, 0x9)
/usr/local/go/src/runtime/panic.go:527 +0x90
runtime.newosproc(0xc82002a000, 0xc820039fc0)
/usr/local/go/src/runtime/os1_linux.go:150 +0x1ab
runtime.newm(0x555ce8, 0x0)
/usr/local/go/src/runtime/proc1.go:1105 +0x130
runtime.main.func1()
/usr/local/go/src/runtime/proc.go:48 +0x2c
runtime.systemstack(0x5c4300)
/usr/local/go/src/runtime/asm_amd64.s:262 +0x79
runtime.mstart()
/usr/local/go/src/runtime/proc1.go:674
goroutine 1 [running]:
runtime.systemstack_switch()
/usr/local/go/src/runtime/asm_amd64.s:216 fp=0xc820024770 sp=0xc820024768
runtime.main()
/usr/local/go/src/runtime/proc.go:49 +0x62 fp=0xc8200247c0 sp=0xc820024770
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1696 +0x1 fp=0xc8200247c8 sp=0xc8200247c0
```
### Information
Please, help us understand the problem. For instance:
- Is it reproducible? Yes
- Is the problem new? No, see
- Did the problem appear with an update? No
- A reproducible case if this is a bug, Dockerfiles FTW.
` $ docker run --platform linux/amd64 -d mysql:5.5`
` $ docker run --platform linux/amd64 -d elasticsearch:1.5`
- macOS Version: 12.0.1
- Intel chip or Apple chip: Apple
- Docker Desktop Version:
### Output of `/Applications/Docker.app/Contents/MacOS/com.docker.diagnose check`
```
[PASS] DD0027: is there available disk space on the host?
[PASS] DD0028: is there available VM disk space?
[PASS] DD0031: does the Docker API work?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0011: are the LinuxKit services running?
[FAIL] DD0016: is the LinuxKit VM running? vm is not running: vm has not started
[PASS] DD0001: is the application running?
[PASS] DD0018: does the host support virtualization?
[FAIL] DD0017: can a VM be started? vm has not started: vm has not started
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0003: is the Docker CLI working?
[PASS] DD0013: is the $PATH ok?
[PASS] DD0007: is the backend responding?
[PASS] DD0014: are the backend processes running?
[PASS] DD0008: is the native API responding?
[PASS] DD0009: is the vpnkit API responding?
[PASS] DD0010: is the Docker API proxy responding?
[PASS] DD0012: is the VM networking working?
[PASS] DD0032: do Docker networks overlap with host IPs?
[SKIP] DD0030: is the image access management authorized?
[PASS] DD0019: is the com.docker.vmnetd process responding?
[PASS] DD0033: does the host have Internet access?
```
### Steps to reproduce the behavior
```
% docker run --platform linux/amd64 -d mysql:5.5
2b046c4819afb41f078371b7f1ac6484d6b0fe471bed9793d342353e2e1941d6
% docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
% docker logs 2b0
runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc
runtime stack:
runtime.throw(0x524da0, 0x9)
/usr/local/go/src/runtime/panic.go:527 +0x90
runtime.newosproc(0xc82002a000, 0xc820039fc0)
/usr/local/go/src/runtime/os1_linux.go:150 +0x1ab
runtime.newm(0x555ce8, 0x0)
/usr/local/go/src/runtime/proc1.go:1105 +0x130
runtime.main.func1()
/usr/local/go/src/runtime/proc.go:48 +0x2c
runtime.systemstack(0x5c4300)
/usr/local/go/src/runtime/asm_amd64.s:262 +0x79
runtime.mstart()
/usr/local/go/src/runtime/proc1.go:674
goroutine 1 [running]:
runtime.systemstack_switch()
/usr/local/go/src/runtime/asm_amd64.s:216 fp=0xc820024770 sp=0xc820024768
runtime.main()
/usr/local/go/src/runtime/proc.go:49 +0x62 fp=0xc8200247c0 sp=0xc820024770
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1696 +0x1 fp=0xc8200247c8 sp=0xc8200247c0
```
I know there is similar closed issue (due to inactivity) here https://github.com/docker/for-mac/issues/6083 (and on stackoverflow) where @stephen-turner answered
> Unfortuantely running under emulation is best-effort only. Some containers simply don't run successfully under emulation and the only fix is to use an Arm version of the container.
But unfortunately there is no ARM version for old containers and if possible I would like to have a little bit more informations about the exact source of this error where the stack trace error talk about /usr/local/go/... code.
I'm not sure but this golang error is not a qemu error here, or maybe a docker component linked to qemu ... ?
If this is a qemu error is there a way to understand where the emulation failed ?
Thanks in advance for your help.
Have you also tried to search for the issue? Could you find anything with the same message that did not seem relevant?
oivq4cb5
(Oivq4cb5)
June 18, 2022, 12:23pm
3
I get this on Linux on Virtual Private Server, it has ‘‘4 Core Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz’’
The problem appears only if I define more then 2-3 Ports in one service.
Like this:
ports:
- 20222:20222
- 2226:2226
- 2228:2228
- 2288:2288
- 2444:2444
And each time there are differen erros reported.
Like this one:
ERROR: for letsencrypt-companion Cannot start service letsencrypt-companion: ttrpc: closed: unknown
ERROR: Encountered errors while bringing up the project.
Or that memory limit should be increased.
rimelek
(Ákos Takács)
June 18, 2022, 12:32pm
4
This is probably because the processes are starting in different order and you have a limit.
Check the content of the following files:
/etc/security/limits.conf
every file in /etc/security/limits.d/
and search for nproc
Update
Make sure you don’t have limits for the containers: Set ulimits in container
dockerd --default-ulimit