ddev: ddev-router on start failed: failed to create new OS thread (have 2 already; errno=22) - running wrong platform image, DOCKER_DEFAULT_PLATFORM=linux/amd64
Is there an existing issue for this?
- I have searched the existing issues
Run a Diagnostic and Paste Link Here
Current Behavior
I tried to setup ddev like described in documentation. After ddev-router tried to start, I’ll get following error message:
Failed to start project: ddev-router failed to become ready; debug with 'docker logs ddev-router'; logOutput=nginx config valid:OK ddev nginx config not yet generated , err=container /ddev-router unhealthy: nginx config valid:OK ddev nginx config not yet generated
After I run docker logs ddev-router
I’ll gett following debug message:
runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc
runtime stack:
runtime.throw(0x884500, 0x9)
/usr/local/go1.6/src/runtime/panic.go:530 +0x90
runtime.newosproc(0xc820026000, 0xc820035fc0)
/usr/local/go1.6/src/runtime/os1_linux.go:149 +0x18c
runtime.newm(0x932358, 0x0)
/usr/local/go1.6/src/runtime/proc.go:1513 +0x135
runtime.main.func1()
/usr/local/go1.6/src/runtime/proc.go:125 +0x2c
runtime.systemstack(0xa8e800)
/usr/local/go1.6/src/runtime/asm_amd64.s:291 +0x79
runtime.mstart()
/usr/local/go1.6/src/runtime/proc.go:1048
goroutine 1 [running]:
runtime.systemstack_switch()
/usr/local/go1.6/src/runtime/asm_amd64.s:245 fp=0xc820020770 sp=0xc820020768
runtime.main()
/usr/local/go1.6/src/runtime/proc.go:126 +0x62 fp=0xc8200207c0 sp=0xc820020770
runtime.goexit()
/usr/local/go1.6/src/runtime/asm_amd64.s:1998 +0x1 fp=0xc8200207c8 sp=0xc8200207c0
Expected Behavior
ddev-router start correctly with ddev start
Steps To Reproduce
- Clone project from git repository
- Run
ddev config
- Fill out config
- Run
ddev start
Anything else?
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 34 (20 by maintainers)
Big thank you to @rfay for helping me figure this out. This stack overthrow thread provided the breakthrough: https://stackoverflow.com/questions/66349391/failed-to-create-new-os-thread-have-2-already-errno-22
I’m on an Apple M1 chip and at some point in the past had set an environment variable
DOCKER_DEFAULT_PLATFORM=linux/amd64
in my~/.zshenv
file (which could also have been set in.bash_profile
,.bashrc
, etc). After removing that variable and removing the existing images in order to start fresh, theddev start
command completed successfully.Thanks for the output @scottatdrake - You did a
ddev poweroff
and restarting docker right? I’d be happy to do a screenshare call with you to try to sort this out. I also recommenddocker rm -f $(docker ps -aq) && docker rmi -f $(docker images -q)
to get a fresh start on all images. I’d love to know what’s going on with this.I can do a call today, I’m on US MT, UTC-6.