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

Allow customizing slow JVM shutdown thread dump for Java test runner #24854

Open
donce opened this issue Jan 8, 2025 · 1 comment
Open

Allow customizing slow JVM shutdown thread dump for Java test runner #24854

donce opened this issue Jan 8, 2025 · 1 comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Rules-Java Issues for Java rules type: feature request

Comments

@donce
Copy link

donce commented Jan 8, 2025

Description of the feature request:

Currently, BazelTestRunner dumps all threads if JVM exit takes longer than 5 seconds (printStackTracesIfJvmExitHangs in BazelTestRunner.java). This duration is hard-coded and this cannot be changed.

In theory, this sounds reasonable, though we do have some long-running E2Es, which also execute real shutdown hooks and it can take longer than 5 seconds, resulting in thread dumps in a happy-path.

If there's an issue with a shutdown and it actually hangs, these logs are not really useful as well, because they are emitted after 5s since shutdown, but by the time test timeout happens - some (or even most) of the threads might have already been shutdown, and the emitted thread dump is actually misleading.

Can this duration be configurable?

Which category does this issue belong to?

Java Rules

What underlying problem are you trying to solve with this feature?

Redundant and misleading thread dumps for long-running E2E tests.

Which operating system are you running Bazel on?

No response

What is the output of bazel info release?

No response

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

@hvadehra
Copy link
Member

hvadehra commented Jan 9, 2025

This sounds reasonable to me. A PR would be welcome. Following the same pattern as for the test suite name is probably the simplest.

@hvadehra hvadehra added P3 We're not considering working on this, but happy to review a PR. (No assignee) and removed untriaged labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Rules-Java Issues for Java rules type: feature request
Projects
None yet
Development

No branches or pull requests

5 participants