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
Crash when using the REQ-ROUTER-ROUTER-REQ example from the docs #493
Comments
The only think I could find was a similar issue in grpc (grpc/grpc-node#1407), there are also some links there. It seems node at some point decided to no longer allow aliasing of ArrayBuffer pointers, but I'm not completely sure because I use node quite rarely. I also notice that the crash happens exactly at around the message size of Line 29 in e2821f0
Here is the source for that example in the zmq guide: https://zguide.zeromq.org/docs/chapter3/#A-Load-Balancing-Message-Broker |
Node runs out of memory because you are concatenating the reply string in the request.
if you replace that line (41) with:
It runs fine. |
You can see the messages explicitly in the output, they don't reach even 1KB. |
The output stream is maybe way behind (so the string is already a lot bigger). If you want to know for sure place in a delay so you are sure the output is flushed. |
Here is the output of
|
Describe the bug
Node crashes somewhere in its memory management routines (stacktrace below).
Reproducing
Expected behavior
not crash
Tested on
Linux newton 5.13.4-200.fc34.x86_64 #1 SMP Tue Jul 20 20:27:29 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
zeromq@6.0.0-beta.6
The text was updated successfully, but these errors were encountered: