-
Notifications
You must be signed in to change notification settings - Fork 648
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
API node crash #1287
Comments
I am sorry that happened to you, but it is great you caught the trace. I hope that takes us a long way into figuring out the cause. At first glance, it looks like the connection cleanup code is trying to do its job when another thread got there first. I'll dig in and report back what I find. |
The code is in a separate thread, attempting to clean up old connections. It creates an exception to be passed as a parameter to the disconnect function, and is in the process of adding details to the exception message. But it attempts to do a find on _active_connections, which is a member variable and an unordered list. Another thread is probably working with that list, and causing an issue. unordered_list is not thread safe (it can handle some threading situations safely, but not all). Here is the section of code that I believe is segfaulting bitshares-core/libraries/net/node.cpp Lines 983 to 990 in d382ac8
I need to review all processes that write to _active_connections to see if there is an instance of more than 1 thread writing to this collection. |
What happens when you use a std::unordered_list in a threaded environment: https://gist.github.com/jmjatlanta/63cf7a13b9c88d47c9eb63deee5e5118 |
My api node segfaulted today, i am running it inside gdb to get a backtrace.
Here is the info i was able to get from the crash:
The text was updated successfully, but these errors were encountered: