Repository navigation
background_hang_monitor: ensure workers run until monitored components do - #38322
Merged
jdm merged 14 commits intoJul 30, 2025
Merged
Conversation
Signed-off-by: gterzian <[email protected]>
Signed-off-by: gterzian <[email protected]>
Signed-off-by: gterzian <[email protected]>
Signed-off-by: gterzian <[email protected]>
Signed-off-by: gterzian <[email protected]>
Signed-off-by: gterzian <[email protected]>
… port of the bhm worker Signed-off-by: gterzian <[email protected]>
Signed-off-by: gterzian <[email protected]>
add doc on returning of join handle in `init` Signed-off-by: gterzian <[email protected]>
Signed-off-by: gterzian <[email protected]>
Signed-off-by: gterzian <[email protected]>
gterzian
force-pushed
the
ensure_bhm_runs_until_monitored_components_do
branch
from
July 29, 2025 02:36
a44bce1 to
0dbaccd
Compare
gterzian
marked this pull request as ready for review
July 29, 2025 02:41
|
🔨 Triggering try run (#16585284326) for Linux (WPT) |
Signed-off-by: gterzian <[email protected]>
gterzian
force-pushed
the
ensure_bhm_runs_until_monitored_components_do
branch
from
July 29, 2025 03:03
9b33da2 to
396ef79
Compare
|
🔨 Triggering try run (#16585624634) for Linux (WPT) |
|
Test results for linux-wpt from try job (#16585624634): Flaky unexpected result (14)
Stable unexpected results that are known to be intermittent (21)
|
|
✨ Try run (#16585624634) succeeded. |
Signed-off-by: gterzian <[email protected]>
Member
|
Nit: This is missing the PR template testing section. |
Signed-off-by: gterzian <[email protected]>
gterzian
force-pushed
the
ensure_bhm_runs_until_monitored_components_do
branch
from
July 29, 2025 15:14
79c288e to
6455a19
Compare
jdm
approved these changes
Jul 30, 2025
jdm
left a comment
Member
There was a problem hiding this comment.
I forgot about how complicated this was. This is a big improvement!
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.
Shut-down of the background hang monitor(bhm) is currently problematic:
All of the above is fixed by the changes in this PR, which ensure the bhm does not shut-down before script, and also maintains the invariant that it must shut-down before the constellation(in single-process mode) or before the main thread(in multi-process mode), but using a mechanism which allows it to keep running until script shuts-down.
An unnecessary option around the exit signal is also removed.
As a positive side-effect, it also ensures that any script-thread is shut-down before the constellation(because for the bhm worker to exit, the monitored script must have exited first), so this should also fix a host of other problems noted in #30849, but each should be confirmed independently(and various other improvements seem possible in their specific contexts, such as joining on script threads, and removing the
ScriptThreadMessage::ExitScriptThread).Fixes: #24850 and part of #34158
Testing: Unit tests in
component/background_hang_monitor/tests. Also manually tested loading "about-blank" in single- and multi-process mode.