-
Notifications
You must be signed in to change notification settings - Fork 11
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
bug in asio_rpc_session #233
Comments
@shengofsun yes, our new network failure model will close the socket when other threads is read/writing on the socket. I assume this will only trigger some error code to the read/write ops, but will not lead to crash. I will look into it once I reproduce this scenario. |
Another way is to refine the net failure model by not closing the socket, but using setsockopt to block the incoming/outgoing traffic instead. |
I'd prefer closing the socket, because I think it is closer to the real world's tcp failure model. Besides, closing the tcp socket helps to test some corner case of the rpc_session. |
Of course. The question is whether closing the socket in asio is a valid operation in terms of thread safety. We want to mimic the real world's failure but we don't want to violate the programming constraints. |
@shengofsun I cannot reproduce this on my machine. Is it because the async-read/write ops may throw exceptions when the other threads call socket::close() concurrently, which leads to the coredump as we don't have C++ catch around the two apis there? If that is the case, I think adding C++ exception handling may fix the issue. |
OK, let me try to locate the root cause later. |
@imzhenyu, you may want to run perf-test when the fault injector(for tcp model) is enabled with native run. I encountered core dump several times.
Here is the stack trace:
I suspect this is due to the socket is closed by fault injector but other threads is reading/writng on the socket.
The text was updated successfully, but these errors were encountered: