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

EventualsGrpcTest.ServerDeathTest is flaky #274

Closed
CodingCanuck opened this issue Mar 28, 2022 · 2 comments · Fixed by #338
Closed

EventualsGrpcTest.ServerDeathTest is flaky #274

CodingCanuck opened this issue Mar 28, 2022 · 2 comments · Fixed by #338
Assignees

Comments

@CodingCanuck
Copy link
Contributor

Sample flaky failure: https://github.com/3rdparty/eventuals/runs/5727035543?check_suite_focus=true

[ RUN      ] EventualsGrpcTest.ServerDeathTest

Warning:  external/com_github_google_googletest/googletest/src/gtest-death-test.cc:1121:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test detected 2 threads. See https://github.com/google/googletest/blob/master/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out.
W20220328 20:39:18.128109 328424960 terminal.h:282] WARNING: exception thrown while dereferencing eventual: Failed to write
unknown file: Failure
C++ exception with description "Failed to write" thrown in the test body.
[  FAILED  ] EventualsGrpcTest.ServerDeathTest (37 ms)

I'm not sure if the failed to write error is related to the warning about fork(), but I wonder:

  1. Do we need to use fork here? (Can we instead manually start a non-forked server subprocess, then kill that by e.g. sending it a SIGTERM?)
  2. What is this test testing? Does the server need to actually die in order to test the interesting logic?
@CodingCanuck
Copy link
Contributor Author

3rdparty/eventuals-grpc#51 might have some historical context (though it might also be a different issue with a similar symptom)

@CodingCanuck
Copy link
Contributor Author

CodingCanuck commented Mar 29, 2022

Anecdotally, this seems to be happening regularly on macos-latest, e.g.: https://github.com/3rdparty/eventuals/runs/5730033688?check_suite_focus=true

CodingCanuck added a commit that referenced this issue Apr 11, 2022
I'm hoping this should resolve the flaky failures seen in
#274. At the very least,
using subprocesses instead of threads, making process lifetime explicit
(rather than relying on gtest's death test infrastructure), and ensuring
that an RPC succeeds before terminating the server should make failures
easier to debug.

Should fix #274.
CodingCanuck added a commit that referenced this issue Apr 11, 2022
I'm hoping this should resolve the flaky failures seen in
#274. At the very least,
using subprocesses instead of threads, making process lifetime explicit
(rather than relying on gtest's death test infrastructure), and ensuring
that an RPC succeeds before terminating the server should make failures
easier to debug.

Should fix #274.
CodingCanuck added a commit that referenced this issue Apr 11, 2022
I'm hoping this should resolve the flaky failures seen in
#274. At the very least,
using subprocesses instead of threads, making process lifetime explicit
(rather than relying on gtest's death test infrastructure), and ensuring
that an RPC succeeds before terminating the server should make failures
easier to debug.

Should fix #274.
CodingCanuck added a commit that referenced this issue Apr 11, 2022
I'm hoping this should resolve the flaky failures seen in
#274. At the very least,
using subprocesses instead of threads, making process lifetime explicit
(rather than relying on gtest's death test infrastructure), and ensuring
that an RPC succeeds before terminating the server should make failures
easier to debug.

Should fix #274.
CodingCanuck added a commit that referenced this issue Apr 18, 2022
We think this fixes #274 which we think is caused by the client
attempting to write a request after the server has already exited.

This commit ensures that `call.Finish()` is called whether or not the
client's write succeeds.
aviator-app bot pushed a commit that referenced this issue Apr 18, 2022
We think this fixes #274 which we think is caused by the client
attempting to write a request after the server has already exited.

This commit ensures that `call.Finish()` is called whether or not the
client's write succeeds.
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