Merged
Conversation
gterzian
approved these changes
Jan 13, 2026
Member
gterzian
left a comment
There was a problem hiding this comment.
LGTM with one change; thank you
| // have finished. Instead of exiting immediately, we signal | ||
| // all components to exit and continue running until they all | ||
| // unregister (indicated by `self.port` disconnecting). | ||
| if !self.shutting_down { |
Member
There was a problem hiding this comment.
If this is true we should log an error because it means the port was dropped outside of the normal clean-shut down flow(the constellation panicked).
jschwe
reviewed
Jan 13, 2026
| recv(self.port) -> event => { | ||
| if let Ok(event) = event { | ||
| Some(event) | ||
| // Helper enum to collect messages from different ports depeneding |
Member
There was a problem hiding this comment.
Suggested change
| // Helper enum to collect messages from different ports depeneding | |
| // Helper enum to collect messages from different ports depending |
Instead of exiting immediately when control_port disconnects, the BHM now: 1. Signals all registered components to exit 2. Enter shut down state by turning off the control_port 3. Runs untils self.port disconnects Fixes servo#41437 Signed-off-by: webbeef <me@webbeef.org>
792d021 to
e8bf917
Compare
yezhizhen
reviewed
Jan 14, 2026
| }, | ||
| BhmMessage::ToggleSampler(rate, max_duration) => { | ||
| if self.sampling_duration.is_some() { | ||
| println!("Enabling profiler."); |
Member
There was a problem hiding this comment.
I was thinking if we should change this println. But should be fine as users want to have response when toggle.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instead of exiting immediately when control_port disconnects, the BHM now:
Testing: Manual testing with
./mach run -Mand checking the lack of shutdown crash.Fixes: #41437
cc @gterzian