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

Stack dumps not produced from timed out go-tests #40

Open
azdagron opened this issue Jan 8, 2025 · 0 comments
Open

Stack dumps not produced from timed out go-tests #40

azdagron opened this issue Jan 8, 2025 · 0 comments

Comments

@azdagron
Copy link

azdagron commented Jan 8, 2025

When a service_test wrapping a go_test times out, it kills the go test indirectly via a context cancellation on CommandContext, inhibiting the go test from dumping useful stack traces to stderr.

It would be really nice to have those stack traces available.

Off the cuff solutions:

  1. Override the TEST_TIMEOUT envvar set by bazel by some reduced margin so that the go test hits its own natural timeout and exits with stack traces
  2. kill the go test process via SIGQUIT (e.g. override the Cancel func on the exec.Command to send a different signal), which also produces stack traces

(1) would work with any test written for bazel test (i.e. those that honor TEST_TIMEOUT)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant