Skip to content

[Test] Additional logging for RemoteClusterClientTests #44124

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

Merged
merged 3 commits into from
Jul 10, 2019

Conversation

cbuescher
Copy link
Member

Use RemoteClusterConnectionTests#startTransport instead of
MockTransportService.createNewService to start the local node transport service.
This implicitely calls newService.start() and newService.acceptIncomingRequests()
but potentially doesn't run into the same kind of deadlock situation that we occasionally saw
on recent test runs.

Closes #41745

Use RemoteClusterConnectionTests#startTransport instead of
MockTransportService.createNewService to start the local node transport service,
which implicitely calls "newService.start()" and
"newService.acceptIncomingRequests()".
@cbuescher cbuescher added :Search/Search Search-related issues that do not fall into other categories >test-failure Triaged test failures from CI labels Jul 9, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

@cbuescher
Copy link
Member Author

@original-brownbear would you mind taking a look at this since we already talked about the problem on the issue? If not let me know if I should ask somebody else to review. I'm not sure this fixed things but it looks like it should do the same as before, maybe the order of execution is somewhat safer than in the existing test.

@original-brownbear
Copy link
Contributor

@cbuescher hmm, but the stacktrace we have suggests that the latch was never counted down?
Looking at the code here:

                service.start();
                service.acceptIncomingRequests();
                RemoteClusterService remoteClusterService = service.getRemoteClusterService();
                assertTrue(remoteClusterService.isRemoteNodeConnected("test", remoteNode));

this currently fails on the last line (the assertTrue). So acceptIncomingRequests was called for sure?
=> I'm not sure how this solves issue. Maybe instead add some info level logging before and after the explicit service.acceptIncomingRequests(); in the existing code so we can see the timing of when that is called relative to the failure stack traces? (maybe we're hanging before that, that seems like a likely explanation?)

@original-brownbear
Copy link
Contributor

I'm also wondering if this might be explained by some port collision, now resolved in #43983 (I can't immediately see how, but I think if we added the suggested info level logging and waited for the next failure then we can rule out it was a port collision ... because the next failure shouldn't come)

@cbuescher
Copy link
Member Author

So acceptIncomingRequests was called for sure?

My guess was that this might happen after the test timeout though. But I will revert and add the logging you suggested to get more information on this question. If this doesn't fail again soon we can also maybe close and blame it on #43983? But I'll add the logging instead of the changes I made earlier.

@original-brownbear
Copy link
Contributor

@cbuescher

If this doesn't fail again soon we can also maybe close and blame it on #43983? But I'll add the logging instead of the changes I made earlier.

Thanks, I like that plan :)

@cbuescher cbuescher changed the title [Test] Fix potential deadlock in test setup [Test] Additional logging for RemoteClusterClientTests Jul 10, 2019
Copy link
Contributor

@original-brownbear original-brownbear left a comment

Choose a reason for hiding this comment

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

LGTM

@cbuescher
Copy link
Member Author

@elasticmachine run elasticsearch-ci/packaging-sample

@cbuescher
Copy link
Member Author

@elasticmachine run elasticsearch-ci/bwc

@cbuescher
Copy link
Member Author

@elasticmachine update branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Search/Search Search-related issues that do not fall into other categories >test-failure Triaged test failures from CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI] RemoteClusterClientTests#testConnectAndExecuteRequest fails
3 participants