zeromq / zeromq.js

:zap: Node.js bindings to the ØMQ library
http://zeromq.github.io/zeromq.js/
MIT License
1.48k stars 210 forks source link

Mysterious SIGABRT signal received by Pub/Sub script #333

Closed gabrieldodan closed 1 month ago

gabrieldodan commented 5 years ago

Hi all,

I have implemented a Pub/Sub script using this library. Randomly , sometimes after an hour sometimes after two hours the script receive SIGABRT signal and it crash. There is no error message when it crash...just receive the SIGABRT signal and crash silently ...

I have added handler for uncaughtException event but it is not triggered...

Initially i have suspected the script use lot of memory, I have started the script with a lot of memory limit --max-old-space-size=5G , still receive that mysterious signal...

The Pub/Sub is used intensively, I mean a lot of messages are handled/processed by the script and goes through the script. Messages are small in size.

Anyone else encountered similar issue or have any idea what could be the source of the issue?

I have ran the script with strace, these are the last output lines:

poll([{fd=27, events=POLLIN}], 1, 0)    = 1 ([{fd=27, revents=POLLIN}])
poll([{fd=27, events=POLLIN}], 1, 0)    = 1 ([{fd=27, revents=POLLIN}])
read(27, "\1\0\0\0\0\0\0\0", 8)         = 8
poll([{fd=27, events=POLLIN}], 1, 0)    = 0 (Timeout)
close(55)                               = 0
poll([{fd=27, events=POLLIN}], 1, 0)    = 0 (Timeout)
poll([{fd=26, events=POLLIN}], 1, 0)    = 0 (Timeout)
poll([{fd=26, events=POLLIN}], 1, 0)    = 0 (Timeout)
write(24, "\1\0\0\0\0\0\0\0", 8)        = 8
poll([{fd=26, events=POLLIN}], 1, 0)    = 0 (Timeout)
poll([{fd=27, events=POLLIN}], 1, 0)    = 0 (Timeout)
poll([{fd=26, events=POLLIN}], 1, 0)    = 0 (Timeout)
write(24, "\1\0\0\0\0\0\0\0", 8)        = 8
poll([{fd=26, events=POLLIN}], 1, 0)    = 0 (Timeout)
poll([{fd=27, events=POLLIN}], 1, 0)    = 0 (Timeout)
epoll_pwait(3, [{EPOLLIN, {u32=8, u64=50279631651078152}}], 1024, 481639, NULL, 8) = 1
read(8, "\2\0\0\0\0\0\0\0", 1024)       = 8
epoll_pwait(3, [{EPOLLIN, {u32=8, u64=50279631651078152}}], 1024, 481637, NULL, 8) = 1
read(8, "\1\0\0\0\0\0\0\0", 1024)       = 8
epoll_pwait(3,  <unfinished ...>
+++ killed by SIGABRT +++
Aborted

Thank you for your time!

Gabriel

gabrieldodan commented 5 years ago

Downgraded to 4.6.0 as suggested on #296 . Everything works well now.

rolftimmermans commented 5 years ago

Recently we have released 6.0 beta. It features a new API that addresses some fundamental issues with the previous API and also addresses a number of stability bugs. To make upgrading easier it includes a compatibility layer with versions 4.x/5.x. It would be great if you could give the latest version a spin to see if this solves this particular issue. If you run into any problems with it, feel free to report it here or in a new issue.

aminya commented 2 months ago

v6 was released. Please try again with the latest version, and report back if the issue still persists. https://github.com/zeromq/zeromq.js/releases/tag/v6.0.0