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

Native error running node 22.12.x #57293

Closed
adnan-mujagic opened this issue Mar 3, 2025 · 2 comments
Closed

Native error running node 22.12.x #57293

adnan-mujagic opened this issue Mar 3, 2025 · 2 comments

Comments

@adnan-mujagic
Copy link

Version

v22.12.0

Platform

Linux <my_service> 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

I am trying to deploy a service using Docker, with node version 22.12. The issue occurs while starting the container.

How often does it reproduce? Is there a required condition?

The issue can be reproduced all the time on particular servers, but on some servers it cannot be reproduced at all.

What is the expected behavior? Why is that the expected behavior?

I am expecting the container to be started normally.

What do you see instead?

The container seems to be stuck restarting, I am seeing this stack trace:

2025-03-03 13:47:34.379 stderr ----- Native stack trace -----
2025-03-03 13:47:34.379 stderr 
2025-03-03 13:47:34.382 stderr  1: 0xf76da7 node::Assert(node::AssertionInfo const&) [node]
2025-03-03 13:47:34.382 stderr  2: 0x10003be node::WorkerThreadsTaskRunner::WorkerThreadsTaskRunner(int) [node]
2025-03-03 13:47:34.384 stderr  3: 0x100049c node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node]
2025-03-03 13:47:34.384 stderr  4: 0xf2a17d  [node]
2025-03-03 13:47:34.388 stderr  5: 0xf2b6ac node::Start(int, char**) [node]
2025-03-03 13:47:34.388 stderr  6: 0x7fc1f6d7e24a  [/lib/x86_64-linux-gnu/libc.so.6]
2025-03-03 13:47:34.388 stderr  7: 0x7fc1f6d7e305 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
2025-03-03 13:47:34.388 stderr  8: 0xe71bde _start [node]
2025-03-03 13:47:35.314 stderr 
2025-03-03 13:47:35.314 stderr   #  node[1]: std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start() at ../src/node_platform.cc:68
2025-03-03 13:47:35.314 stderr   #  Assertion failed: (0) == (uv_thread_create(t.get(), start_thread, this))

Additional information

No response

@adnan-mujagic adnan-mujagic changed the title Native error running node 22.14.x Native error running node 22.12.x Mar 3, 2025
@juanarbol
Copy link
Member

juanarbol commented Mar 3, 2025

This seems to be a failure creating threads in your docker container.

From the pthread_create man page.

       EAGAIN Insufficient resources to create another thread.

       EAGAIN A system-imposed limit on the number of threads was
              encountered.  There are a number of limits that may trigger
              this error: the RLIMIT_NPROC soft resource limit (set via
              [setrlimit(2)](https://man7.org/linux/man-pages/man2/setrlimit.2.html)), which limits the number of processes and
              threads for a real user ID, was reached; the kernel's
              system-wide limit on the number of processes and threads,
              /proc/sys/kernel/threads-max, was reached (see [proc(5)](https://man7.org/linux/man-pages/man5/proc.5.html)); or
              the maximum number of PIDs, /proc/sys/kernel/pid_max, was
              reached (see [proc(5)](https://man7.org/linux/man-pages/man5/proc.5.html)).

       EINVAL Invalid settings in attr.

       EPERM  No permission to set the scheduling policy and parameters
              specified in attr.

https://man7.org/linux/man-pages/man3/pthread_create.3.html

Can we get a bit more details of your Dockerfile? That seems to be an environmental issue more than a Node.js issue. Also, your kernel is quite old.

@adnan-mujagic
Copy link
Author

Hi, the problem seems to have been resolved once I updated Docker on problematic instances to version greater than or equal to 20.10.18 (the output of docker -v on remote instance).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants