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

"npm i" crashes with exit code 134 on ARM64 #1254

Open
SuNNjek opened this issue Apr 27, 2020 · 6 comments
Open

"npm i" crashes with exit code 134 on ARM64 #1254

SuNNjek opened this issue Apr 27, 2020 · 6 comments

Comments

@SuNNjek
Copy link

@SuNNjek SuNNjek commented Apr 27, 2020

Hello,

I'm trying to build a simple web app via Docker using the node:12 (also tried node:14, no luck) image on my Raspberry Pi 4 running Ubuntu 20.04. When the build process wants to execute npm i I just get the error:

Aborted (core dumped)
The command '/bin/sh -c npm i' returned a non-zero code: 134

Even when I go into a new interactive container and execute npm (no arguments) myself I get the same error.

For some reason, the node:14-alpine image worked, but since my app requires native dependencies that I need to recompile and the image doesn't come with the right build tools I can't use that.

@LaurentGoderre
Copy link
Contributor

@LaurentGoderre LaurentGoderre commented Apr 28, 2020

@SuNNjek
Copy link
Author

@SuNNjek SuNNjek commented Apr 28, 2020

@LaurentGoderre Thanks, I might try this as a workaround. However, this doesn't change the fact, that the ARM64 image simply doesn't work

@lewisacidic
Copy link

@lewisacidic lewisacidic commented May 2, 2020

I too am using arm64 based Ubuntu 20.04, and ran into the same issue as @SuNNjek.

I've found its specifically the stretch (and slim variant) containers that are producing this. It works with buster (and slim variant), so that's an easier workaround than using alpine!

@shotor
Copy link

@shotor shotor commented May 5, 2020

I have the same issue on a raspberry pi 4 running ubuntu server 20.04.

Every yarn or npm command in a container immediately returns Aborted (core dumped). Both commands work fine outside docker.

I tried stretch packages from node 10 - 14, all with the same error. Buster package works.

@samip5
Copy link

@samip5 samip5 commented Jun 3, 2020

I think my issue is related to this.

node --version works, but trying to execute index.js file does not and results in Aborted (core dumped).

Container image: node:14.4

gdb:

Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/local/bin/node...done.
[New LWP 304]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
Core was generated by `node index.js'.
Program terminated with signal SIGABRT, Aborted.
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x0000007f994d8df4 in __GI_abort () at abort.c:89
#2  0x00000000012a2ba8 in thread_stack_size () at ../deps/uv/src/unix/thread.c:176
#3  uv_thread_create_ex (arg=0x122e4390, entry=0xa8ba28 <node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start()::{lambda(void*)#1}::_FUN(void*)>, params=<synthetic pointer>, tid=0x122e4b20) at ../deps/uv/src/unix/thread.c:236
#4  uv_thread_create (tid=0x122e4b20, entry=0xa8ba28 <node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start()::{lambda(void*)#1}::_FUN(void*)>, arg=0x122e4390) at ../deps/uv/src/unix/thread.c:212
#5  0x0000000000a8a044 in node::WorkerThreadsTaskRunner::WorkerThreadsTaskRunner(int) ()
#6  0x0000000000a8a308 in node::NodePlatform::NodePlatform(int, v8::TracingController*) ()
#7  0x00000000009f8f78 in node::InitializeOncePerProcess(int, char**) ()
#8  0x00000000009f93f8 in node::Start(int, char**) ()
#9  0x0000007f994c6364 in __libc_start_main (main=0x0, argc=0, argv=0x0, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=<optimized out>) at libc-start.c:291
#10 0x000000000099bf8c in _start ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

bt full trace via gdb:

#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
        set = {__val = {512, 0, 0, 0, 0, 0, 0, 0, 0, 0, 549364153200, 548032843636, 548033970176, 548036849424, 549364153200, 548032843536}}
        pid = <optimized out>
        tid = <optimized out>
#1  0x0000007f994d8df4 in __GI_abort () at abort.c:89
        save_stage = 2
        act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, sa_mask = {__val = {549364153584, 548033113036, 548033968536, 8, 549364153872, 305021840, 66587264, 305020960, 305019024, 4, 66587240, 0, 511101108348,
              390842024046, 0, 0}}, sa_flags = 64, sa_restorer = 0x0}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#2  0x00000000012a2ba8 in thread_stack_size () at ../deps/uv/src/unix/thread.c:176
        lim = {rlim_cur = 549364153664, rlim_max = 11051056}
#3  uv_thread_create_ex (arg=0x122e4390, entry=0xa8ba28 <node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start()::{lambda(void*)#1}::_FUN(void*)>, params=<synthetic pointer>, tid=0x122e4b20) at ../deps/uv/src/unix/thread.c:236
        err = <optimized out>
        stack_size = <optimized out>
        attr = <optimized out>
        attr_storage = {
          __size = "\020A.\022\000\000\000\000\340\275\247\350\177\000\000\000\020\276\247\350\177\000\000\000\220C.\022\000\000\000\000@\275\247\350\177\000\000\000\030\240\250\000\000\000\000\000\020A.\022\000\000\000\000\034\236\250\000\000\000\000", __align = 305021200}
#4  uv_thread_create (tid=0x122e4b20, entry=0xa8ba28 <node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start()::{lambda(void*)#1}::_FUN(void*)>, arg=0x122e4390) at ../deps/uv/src/unix/thread.c:212
No locals.
#5  0x0000000000a8a044 in node::WorkerThreadsTaskRunner::WorkerThreadsTaskRunner(int) ()
No symbol table info available.
#6  0x0000000000a8a308 in node::NodePlatform::NodePlatform(int, v8::TracingController*) ()
No symbol table info available.
#7  0x00000000009f8f78 in node::InitializeOncePerProcess(int, char**) ()
No symbol table info available.
#8  0x00000000009f93f8 in node::Start(int, char**) ()
No symbol table info available.
#9  0x0000007f994c6364 in __libc_start_main (main=0x0, argc=0, argv=0x0, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=<optimized out>) at libc-start.c:291
        self = <optimized out>
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {27874416, 0, 10076000, 0, 0, 0, 0, 0, 0, 0, 549364154640, 4188861406190153964, 548036915608, 4188861404836860624, 0, 0, 0, 0, 0, 0, 0, 0}, mask_was_saved = 0}}, priv = {pad = {0x0,
              0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#10 0x000000000099bf8c in _start ()
No symbol table info available.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
@angeloevangelista
Copy link

@angeloevangelista angeloevangelista commented Sep 12, 2020

I solved my problem specifying node and npm version engines on package.json:

"engines": {
    "node": "12.1.0",
    "npm": "6.9.0"
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.