Repository navigation
fix(appstate): pass explicit 0.9s simax timeout on info query - #18
Merged
Merged
Conversation
Previously ui_state() sent {"op": "info"} without a "timeout" field while
asking with a 1200ms host socket timeout. Because simax defaults "timeout" to
5.0s (simax.m:2413), any hung main thread timed out on the host socket at 1.2s
before simax could return {"error": "busy: ..."}, causing appstate.rs to
misclassify main-thread hangs as "suspended".
Pass "timeout": 0.9 (strictly below 1200ms) so simax replies "busy" in time
and app-state accurately distinguishes busy main threads from RunningBoard
suspension. Add unit test covering info_query() and classify_info_reply().
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.
Root Cause
In
tools/launcher/core/src/appstate.rs,ui_state()queried{"op": "info"}with a1200mshost socket timeout and no"timeout"field. Becausehost/simax/simax.m:2413defaultstimeoutto5.0s, a hung main thread always timed out the host socket at1.2sbeforesimaxcould reply{"error": "busy: ..."}, causingapp-stateto misclassify main-thread hangs as"suspended"and making thebusymatch arm unreachable.Fix
info_query()({"op": "info", "timeout": 0.9}) andclassify_info_reply()inappstate.rs.info_query_distinguishes_busy_from_suspendedverifyingsimax_timeout < 1200msand classification ofbusy,active,inactive,background, and socketErr.Verification
ci.yml(rust-launcher-tests,rust-mtlvk-tests,web,build / appimage) on this PR.