-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
zeromq with express crashing in v8 garbage collection #259
Comments
@iasna have you figured out why this happens? |
yeah, the internal max socket limit of zeromq is 1024, whenever limit is reached socket creations goes in error properly. But due to some reason socket close call crashes whenever the limit is reached, i was looking into in to close code, it calls zmq_socket_monitor which was causing the crash. I increased the internal socket limit of the existing context. Furthermore, I used the connection pool to avoid frequent close, by doing this I have totally avoided that crash flow. But it may still crash when file descriptors limit is reached and close is called. |
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. |
v6 was released. Please try again with the latest version, and report back if the issue still persists. |
I'm stress testing my application, after increasing the number of connections application crashes with following coredumps.
1)
0x0000000000af90b6 in v8::Exception::Error(v8::Localv8::String) ()
#6 0x00007f793b4b1912 in zmq::Socket::Unmonitor() () from /home/oracle/git2/Iris5/Core/node_modules/zeromq/build/Release/zmq.node
#7 0x00007f793b4b1cff in zmq::Socket::~Socket() () from /home/oracle/git2/Iris5/Core/node_modules/zeromq/build/Release/zmq.node
#8 0x00007f793b4b1d71 in zmq::Socket::~Socket() () from /home/oracle/git2/Iris5/Core/node_modules/zeromq/build/Release/zmq.node
#9 0x0000000000e4941e in v8::internal::GlobalHandles::DispatchPendingPhantomCallbacks(bool) ()
#10 0x0000000000e4968a in v8::internal::GlobalHandles::PostGarbageCollectionProcessing(v8::internal::GarbageCollector, v8::GCCallbackFlags) ()
#11 0x0000000000e78767 in v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) ()
#12 0x0000000000e795be in v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) ()
#13 0x0000000000e1d502 in v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) ()
#14 0x00000000010962c0 in v8::internal::Runtime_AllocateInNewSpace(int, v8::internal::Object**, v8::internal::Isolate*) ()
#6 0x00007f6ea0c8195e in zmq_close (s_=0x4e223a22646d6322) at src/zmq.cpp:263
#7 0x00007f6ea0eb389e in zmq::Socket::Unmonitor() () from /home/oracle/git2/Iris5/Core/node_modules/zeromq/build/Release/zmq.node
#8 0x00007f6ea0eb3cff in zmq::Socket::~Socket() () from /home/oracle/git2/Iris5/Core/node_modules/zeromq/build/Release/zmq.node
#9 0x00007f6ea0eb3d71 in zmq::Socket::~Socket() () from /home/oracle/git2/Iris5/Core/node_modules/zeromq/build/Release/zmq.node
#10 0x0000000000e4941e in v8::internal::GlobalHandles::DispatchPendingPhantomCallbacks(bool) ()
#11 0x0000000000e4968a in v8::internal::GlobalHandles::PostGarbageCollectionProcessing(v8::internal::GarbageCollector, v8::GCCallbackFlags) ()
#12 0x0000000000e78767 in v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) ()
#13 0x0000000000e795be in v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) ()
#14 0x0000000000e1d84e in v8::internal::Factory::NewFixedArray(int, v8::internal::PretenureFlag) ()
#15 0x00000000010ab96b in v8::internal::Object* v8::internal::(anonymous namespace)::SearchRegExpMultiple(v8::internal::Isolate*, v8::internal::Handlev8::internal::String, v8::internal::Handlev8::internal::JSRegExp, v8::internal::Handlev8::internal::RegExpMatchInfo, v8::internal::Handlev8::internal::JSArray) ()
Below is my code
The text was updated successfully, but these errors were encountered: