Skip to content
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

PXC-4167: Node crashes with Transport endpoint is not connected #270

Merged

Conversation

kamil-holubicki
Copy link

https://jira.percona.com/browse/PXC-4167

Problem:
PXC-4167 was solved by the upstream commit
930c016, where catching of possible exception thrown by assign_address() (which calls
socket::remote_endpoint() where the actual call is done).

However, after that fix, it was reported several times that the issue rarely, but still occurs and the server fails with the following error:

terminate called after throwing an instance of 'std::system_error' what(): remote_endpoint: Transport endpoint is not connected

Cause:
Deeper analysis of the code shows, that such an exception can be thrown only from basic_socket::remote_endpoint(). The above-mentioned fix didn't consider the call of this method which is done just after assign_address() wrapped in try ... catch block.

Solution:
Extend the upstream fix to catch the uncaught exception.

Problem:
PXC-4167 was solved by the upstream commit
930c016, where catching of possible
exception thrown by assign_address() (which calls
socket::remote_endpoint() where the actual call is done).

However, after that fix, it was reported several times that the issue
rarely, but still occurs and the server fails with the following error:

terminate called after throwing an instance of 'std::system_error'
what():  remote_endpoint: Transport endpoint is not connected

Cause:
Deeper analysis of the code shows, that such an exception can be thrown
only from basic_socket::remote_endpoint(). The above-mentioned fix
didn't consider the call of this method which is done just after
assign_address() wrapped in try ... catch block.

Solution:
Extend the upstream fix to catch the uncaught exception.
Copy link

@venkatesh-prasad-v venkatesh-prasad-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kamil-holubicki kamil-holubicki merged commit ba58959 into percona:4.x-8.0 Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants