Repository navigation
fix(ax/simax): prevent 80ms st.stuck spiral on live cold-launching apps and bind simax socket before .fg - #12
Merged
Conversation
…ps and bind simax socket before .fg
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.
Fixes a deterministic cold-launch AX timeout death spiral identified during KiraBot UITA investigation ( and 4 prior occurrences):
Keep live non-wallpaper foreground apps out of the 80 ms
st.stuckfast-fail set (ax.rs):.fgrace) persisted the app's PID intost.stuck, slashing every subsequent snapshot timeout from 6000 ms to 80 ms while still sending a 200 ms guest timeout ((0.08 - 0.3).max(0.2)). Since first-launch Compose AX tree walks take ~2.6s (and subsequent walks ~100ms), a live app that enteredst.stuckonce could never answer within 80 ms and stayed permanently masked behindcom.apple.springboard.R/S/D) non-wallpaper foreground apps out ofst.stuck, and ensureguest_timeout_secs()always stays strictly below the host socketSO_RCVTIMEO.ax::tests::live_slow_foreground_app_recovers_after_timeout.Eliminate
simax.mstartup.fg-before-listen()race and main-queue overdue request pileup (host/simax/simax.m):bind(), andlisten()the Unix socket synchronously instart()before spawninglisten_threadand writing<pid>.fg, removing theENOENTwindow during app launch.serve()(not onlyinsert_bound) so timed-outtree/infopolls cannot accumulate stale walks on a busy cold-launching app's main thread.