Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on some containers: stopped just after being started #5170

Closed
2 tasks
mourad-zitouni opened this issue Dec 21, 2020 · 9 comments
Closed
2 tasks

Error on some containers: stopped just after being started #5170

mourad-zitouni opened this issue Dec 21, 2020 · 9 comments
Labels

Comments

@mourad-zitouni
Copy link

I'm trying to prepare a local environment for a drupal project and I used docker4drupal:
https://wodby.com/docs/1.0/stacks/drupal/local/

When I launch some containers (nginx, mariadb,...), everything seems working (I have all containers "done"), but when I check containers status I find that some are down, and in containers log I have this error:

runtime: failed to create new OS thread (have 2 already; errno=22),
fatal error: newosproc,
,
runtime stack:,
runtime.throw(0x6249a0, 0x9),
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/panic.go:530 +0x90,
runtime.newosproc(0xc820026000, 0xc820035fc0),
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/os1_linux.go:149 +0x18c,
runtime.newm(0x676240, 0x0),
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/proc.go:1513 +0x135,
runtime.main.func1(),
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/proc.go:125 +0x2c,
runtime.systemstack(0x732c00),
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/asm_amd64.s:291 +0x79,
runtime.mstart(),
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/proc.go:1048,
,
goroutine 1 [running]:,
runtime.systemstack_switch(),
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/asm_amd64.s:245 fp=0xc820020770 sp=0xc820020768,
runtime.main(),
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/proc.go:126 +0x62 fp=0xc8200207c0 sp=0xc820020770,
runtime.goexit(),
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/asm_amd64.s:1998 +0x1 fp=0xc8200207c8 sp=0xc8200207c0,
  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics
  • Diagnostics ID:

Expected behavior

Actual behavior

Information

  • macOS Version: 11.0.1

Diagnostic logs

Docker for Mac: Apple Silicon Preview 7

Steps to reproduce the behavior

  1. Prepare compose file
  2. Launch containers: docker-compose up -d
@andrepintado
Copy link

Having exactly the same problem. Happens with containers having images:

  • "webdevops/php-nginx-dev:5.6"
  • "webdevops/php-nginx-dev:7.4-alpine"
  • "webdevops/nginx:alpine"

I tried with flag --platform linux/amd64 with no success.

Others seem to be working ok.

@kevincennis
Copy link

Seeing this as well on Big Sur 11.0 running Docker-AppleSilicon-Preview7.

Ultra reduced test case:

docker run --platform linux/amd64 mongo:3.4.9

Results in:

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

@stephen-turner stephen-turner added the area/m1 M1 preview builds label Jan 4, 2021
@jbmeslin
Copy link

jbmeslin commented Jan 4, 2021

Same with an old-version of ES elasticsearch:5.5 (works since the version 7.8 with linux/arm64/v8 platform)

@jcalabro
Copy link

jcalabro commented Jan 8, 2021

Hello! Wanted a drop a note here that I also am experiencing this with mysql:5.7.12. Thank you!

@dhindrik
Copy link

I experiencing this with, mcr.microsoft.com/mssql/server:2019-latest.

@bwinchester
Copy link

Same with an old-version of ES elasticsearch:5.5 (works since the version 7.8 with linux/arm64/v8 platform)

elasticsearch containers on docker hub started supporting arm64 on their 7.8 tags and above. I noticed it too because we were on 7.5, but didn't have an issue upgrading.

@ocean
Copy link

ocean commented Feb 24, 2021

I am attacking a similar issue as this, after getting a new M1 MBP last week (but using a different set of containers, Amazee Lagoon - a similar themed Drupal-focused stack). I got here after frustratedly searching for the same string fatal error: newosproc runtime stack 😁

The issue is within the container images, and their upstream builds. If you look at the Dockerfile e.g. for the Wodby php image, https://github.com/wodby/php/blob/master/8/Dockerfile it has quite a few amd64 specific libraries and utilities, though some progress has been made, for instance using $BUILDPLATFORM to download an architecture-specific version of the gotpl tool into the container.

I've embarked on a "recompile the world" quest to get my stack working, and I'll post back here if I have any useful things to share. In the meantime, the best everyone can do is dig in and try and get each part building, piece by piece. If one container doesn't work, find its upstream and try and get that working. If something isn't available for linux/arm64 (the architecture that Docker for Mac uses, and what is shown in $BUILDPLATFORM), then try and see if you can rebuild it for that architecture.

Good luck and go build! 😄

@stephen-turner
Copy link
Contributor

I think all these issues are to do with trying to run amd64 containers on M1 hardware. We attempt to run them under emulation, but it's best effort only. Even when it works it will be slower and use more memory. We recommend running only arm64 containers on M1 hardware.

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jun 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

10 participants