Repository navigation
ci: [DO-NOT-MERGE] capture spindump/lsappinfo/AE-debug for #51462 hung esm fixture - #51483
Closed
MarshallOfSound wants to merge 2 commits into
Closed
MarshallOfSound wants to merge 2 commits into
MarshallOfSound wants to merge 2 commits into
Conversation
DO-NOT-MERGE debug branch. - Disable Linux, Windows, and macOS-arm64 builds (failure is macOS-x64 only) - Instrument spec/esm-spec.ts runFixture to, on a 20s child hang: - capture lsappinfo list / visibleProcessList / info pid= - capture launchctl print for launchservicesd / appleeventsd - capture ps -Af and Electron-only process list - sample the hung child for 3s - sudo spindump the hung child for 5s - log show last-5m for launchservices/appleevents subsystems - then SIGKILL the child so the suite continues - Spawn fixtures with AEDebugSends/Receives/Verbose so the child's stderr shows every Apple Event it receives (or doesn't) - Persist every fixture's stderr to spec/artifacts/esm-diag/ so passing fixtures' AE logs can be diffed against the hung one - Capture baseline lsappinfo/ps before any esm fixture runs - Add WILL/DID stderr markers to the import-meta fixture Refs #51462
…oreState A/B for #51462 Spindump from the previous run shows the child blocked in a nested modal event loop inside AppKit's _handleAEOpen* handler — not idle. This adds: - Saved Application State dir listing + restorecount/windows.plist dump (baseline + at-hang) to test the persistent-UI / 'reopen windows' theory - screencapture of the full screen at hang time so any modal alert is visible - CGWindowListCopyWindowInfo for the hung pid and for all on-screen windows - atos symbolication of the unsymbolicated AppKit frames parsed out of the spindump we just wrote (load address + addrs extracted dynamically) - defaults read com.github.Electron - talagentd / com.apple.PersistentUI added to the unified-log predicate A/B inside the single import-meta test (kept as one it-block so split-tests.js shard assignment is unchanged): A: stock (expected to hang) B: with -ApplePersistenceIgnoreState YES -NSQuitAlwaysKeepsWindows NO C: after rm -rf ~/Library/Saved Application State/com.github.Electron.savedState Result written to spec/artifacts/esm-diag/ab-summary.txt. Refs #51462
3 tasks done
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.
DO NOT MERGE — debug instrumentation only.
What this does
Per investigation in #51462, the
import-metaesm fixture child reachesapplicationWillFinishLaunching:but AppKit never postsapplicationDidFinishLaunching:on macOS-x64 shard 2, soapp.whenReady()never resolves. This branch captures the system state at the moment of hang.Changes
spec/esm-spec.ts: when a fixture child is still alive at 20s, capture tospec/artifacts/esm-diag/(uploaded astest_artifacts_darwin_x64_2):lsappinfo list/visibleProcessList/info pid=<child>— LaunchServices registrations (look for stale Electron entries from earlier specs)launchctl printforlaunchservicesd/appleeventsdps -Afand Electron-only process listsample <pid> 3sudo spindump <pid> 5 10log show --last 5mforcom.apple.launchservices/com.apple.appleeventsSIGKILLthe child so the suite continues instead of leakingAEDebugSends=1 AEDebugReceives=1 AEDebugVerbose=1so the child's stderr shows whetherkAEOpenApplicationever arrives. Every fixture's stderr is saved so the hung one can be diffed against passing ones.lsappinfo listandpsare captured before any esm fixture runs.import-meta/main.mjslogsTOP/WILL/DIDto stderr.What to look at when this runs
*-child-stderr.txtfor the hung fixture — doesAEDebugReceivesshow aoapp/kAEOpenApplicationevent? Compare to a passing fixture's stderr.*-lsappinfo-list.txtvsbaseline-lsappinfo-list.txt— extra/stale Electron ASNs?*-ps-electron.txt— leaked children fromapi-utility-process-spec.ts?*-spindump.txt— main thread should be idle in__CFRunLoopRun; checkappleeventsd/launchservicesdstacks in the same dump.*-log-ls.txt— any errors fromlaunchservicesdaround the child's launch time.Refs #51462
Notes: none