-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Description
Description of the bug:
While debugging dzbarsky/rules_rs#14, I wanted to capture a Starlark profile and see where the Rust aspect is getting stuck. Unfortunately, since Bazel hangs, the CPU profile is never fully stopped and no profile is written.
The profile is started in BlazeCommandDispatcher.execExclusively. The current code stops the profile later in the same method, but I assume the interruption is causing an earlier exit.
Bazel should trap that exception and stop the profile (writing out in-progress data).
Which category does this issue belong to?
Starlark Integration
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Follow the repro from dzbarsky/rules_rs#14, adding --starlark_cpu_profile=/tmp//tmp/rs_aspect.pprof, and then hit ctrl-c three times once bazel reaches the "no actions running" state and hangs.
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 ?
If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
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