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

gtest: set death_test_style=threadsafe #17709

Merged
merged 2 commits into from
Apr 10, 2024

Conversation

ztlpn
Copy link
Contributor

@ztlpn ztlpn commented Apr 9, 2024

Default death test style (fast) forks the test process and runs the test immediately after forking. This does not play well with the seastar environment, leading to hangs and weird errors. Switch to 'threadsafe' style instead that runs the test binary from the beginning in the child process.

Fixes (latest incarnation of) #14425

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v23.3.x
  • v23.2.x

Release Notes

  • none

rockwotj
rockwotj previously approved these changes Apr 9, 2024
@rockwotj
Copy link
Contributor

rockwotj commented Apr 9, 2024

Looks like the test fails, there is probably something wrong with the signal handling that seastar has.

"Aborting" matched subprocess dying of unrelated reasons (and not
actually because of the assertion).
Default death test style (fast) forks the test process and runs the test
immediately after forking. This does not play well with the seastar
environment, leading to hangs and weird errors. Switch to 'threadsafe'
style instead that runs the test binary from the beginning in the child
process.

Fixes (latest incarnation of) redpanda-data#14425
@ztlpn
Copy link
Contributor Author

ztlpn commented Apr 9, 2024

there is probably something wrong with the signal handling that seastar has.

No, it started failing because it actually started working :) (previously it "passed" because the subprocess crashed due to unrelated reasons).

One caveat is that the child process thinks that it has only one cpu core available (I guess because it inherits thread affinity?) and therefore can fail to start if -c8 is set. But we run with --overprovisioned so it is not a problem.

@ztlpn ztlpn requested a review from rockwotj April 9, 2024 20:52
Copy link
Contributor

@rockwotj rockwotj left a comment

Choose a reason for hiding this comment

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

Nice find. I am glad they are working now!

@ztlpn ztlpn merged commit 91f8cd4 into redpanda-data:dev Apr 10, 2024
20 checks passed
@ztlpn ztlpn deleted the gtest-threadsafe-death-tests branch April 10, 2024 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants