-
Notifications
You must be signed in to change notification settings - Fork 2k
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 with Node:8-alpine docker image on AWS using an M5 instance type #813
Comments
Can you provide the output of |
|
Is it me or this seems like an error specific to npm? |
I think there is something between node / alpine (musl) and the new Hyperv on AWS M5s:
returns a "Segmentation fault (core dumped)" in M5s. So, in summary, those are all tests in an AWS M5 instance: Test 1: setgid node
Test 2: setgid npm
Test 3: setgid c++This works:
|
Root cause seems to be: https://wiki.musl-libc.org/functional-differences-from-glibc.html#Thread_stack_size There three possible solutions:
|
Can you try node 10? I've read that this was fixed in Alpine 3.7 |
It still fails in Details:
|
Alternatively, you should switch to the |
I followed the And also the Debien non root version (Jessie) I'm still getting this issue after upgraded my instance. Anyone else has another workaround? this is been very annoying. |
Issue #3 is still prematurely closed with lots of "me too" comments |
Looks like this is the root cause of the Alpine half of docker-library/ghost#157 -- interestingly, it's only failing on certain architectures for us (and we've narrowed the reproducer down to simply running |
It's not just "platforms", it's more "environments". Eg on "64bit Intel/amd", I have three systems I tried this on:
The strange thing is: on that DO node where I can trigger the segfault, I can rebuild the image, based on https://raw.githubusercontent.com/nodejs/docker-node/86b9618674b01fc5549f83696a90d5bc21f38af0/8/alpine/Dockerfile (which should be the latest node:8-alpine Dockerfile), and then it doesn't crash !? So it seems to be an incompatibility when building the image... As this buggers me quite a lot (I am an instructor and one of the courses I teach happen to have a lot of node-alpine docker examples in them), I am more than happy to test things out, help debug etc. Unfortunately, my musl/glibc C powers are not strong enough to suggest an actual solution... Anything I can do / help / ...? |
btw: I also suggest that we change the title of this issue, as it is not AWS M5-onl |
@raulgomis I have the same issue! When running this:
I get the following on Ubuntu:
but get segmentation fault on Amazon Linux:
|
FWIW we're running on an r5.xlarge. r5.large and tried a c5d.large and experiencing the same issue. Finally switched to using m4.large and the problem stopped. I should say this was on the EXACT same AMI from AWS ( Some how the kernal must be picking up something from the host hypervisor and a kernel setting may be contributing to why this only occurs on certain systems. |
Also, tried c5.xlarge and m5.xlarge and both also didnt work, but m5a.xlarge did. |
I am also having this issue on 10.16.0-alpine. This error started yesterday for me |
We've also been facing this for from node:10.15-alpine, compiling on quay.io since today morning. Worked around this by adding |
i am also running with this issue from today morning. having below versions: issue:
TypeError: Cannot read property 'get' of undefined TypeError: Cannot read property 'get' of undefined |
Maybe this helps: https://github.com/opentargets/webapp/blob/34f66d7383e6e4459280826133269d440fc3d5f4/Dockerfile It seems to be working, with node:8 alpine and yarn install steps. |
thank you pieter, i am geeting this issue please give pointer to solve it. error: |
amauryaE3156: maybe check the project I linked. Try to build that one and check what "full-install" means there (maybe it is a custom config?) |
Fixed in
|
Closing since Node 8 support ended 4 months ago |
This is still a problem on node 10.19 and 10.20 (see the last two issues linked here, waveformhealth/virtualvisit-web#1 and docker-library/official-images#7962). One uses the In case someone wants to go digging to figure out why it works in newer versions (and if that could be applied to 10), here is what I found out:
|
@yosifkit It somehow resolved with |
* Cleanup and restructure Dockerfile Use build and app stage * Add container build CI * Use normal node image The alpine image has a bug which causes an error 'Error: could not get uid/gid' It is fixed in later node versions, see nodejs/docker-node#813 (comment) * Use node 10, 11 is EOL and 12 not supported * git is already installed * Run grunt with npx * Run as node user * Add release and latest build * Declare exact base image * Enable image push Co-authored-by: rxcket <[email protected]>
Problem:
Node 8 alpine image does not appear to work on AWS m5 instances.
Command:
docker container run -it node:8-alpine /bin/sh -c 'npm -g'
Terminal logs:
Strace logs:
The text was updated successfully, but these errors were encountered: