Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker build fails and exit with error code 139

running the following command on jenkins pipeline sh 'docker run --rm --name "node${commitIdLong}" -v "$(pwd)":/app -w /app node:latest /bin/bash -c "npm install; npm run build --prod --loglevel verbose"' got the following error

node[1]: ../src/node_platform.cc:68:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: node::Abort() [node]
 2: [node]
 3: node::WorkerThreadsTaskRunner::WorkerThreadsTaskRunner(int) [node]
 4: node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node]
 5: node::V8Platform::Initialize(int) [node]
 6: [node]
 7:node::Start(int, char**) [node]
 8:[/lib/x86_64-linux-gnu/libc.so.6]
 9: __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
10:_start [node]
ERROR: script returned exit code 139

it was working before just fine and i checked the memory status and there's plenty of memory available

like image 850
Thameur Saadi Avatar asked Sep 17 '25 13:09

Thameur Saadi


1 Answers

Please refer to this thread, which seems to contain a solution for you. In short, before your npm install command, try running ulimit -u 1024 to increase user process count. The error indicates resource (ulimit) constraints.

like image 110
Wian Snyman Avatar answered Sep 20 '25 06:09

Wian Snyman