Crash in libnode.so due to conflicting timers #4915
Unanswered
Amanmishra1
asked this question in
Q&A
Replies: 0 comments 5 replies
-
@nodejs/libuv |
Beta Was this translation helpful? Give feedback.
0 replies
-
I've converted this to a discussion because I don't think this is a node or libuv bug. You can use timer_create() but you need to handle the signal by installing a signal handler, otherwise the process gets killed. Aside: the line numbers in your screenshot are off, maybe because it's a release build. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Version
v14.19.0
Platform
arm64
Subsystem
No response
What steps will reproduce the bug?
Create a C++ application ( shared library ) using timers
https://man7.org/linux/man-pages/man2/timer_create.2.html
Load it inside a nodejs application.
Real time signal 0 should occur
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior?
No crash should occur
What do you see instead?
Real time signal 0
Additional information
We have a c++ library using timer_create API
https://man7.org/linux/man-pages/man2/timer_create.2.html ( it mentions it should be one per process )
the standalone application works perfect but when integrated with an UI (using nodejs ) Real time signal 0 occurs
The call stack suggests crash in libnode.so ( PFA screenshot )

Is there a way to disable timers in nodejs or you handle Timers in nodejs better so that C++ application using timers work fine within nodejs.
Beta Was this translation helpful? Give feedback.
All reactions