Repository navigation
fix(app): make every hang leave a sample or the reason there is none, and stop ending an app that came back - #385
Merged
Merged
Conversation
…f akou The release wrapper unpacks the app on its first open, opens it again and then waits on an "Installation complete" panel for a click on Close. While it waits it is a launcher with no app below it, and open, the Dock and Finder take it for the running app and start nothing. When the watchdog ended a hung app and ran open -a, that is what happened, and akou stayed down until someone noticed. - The build writes ELECTROBUN_INSTALLER_UI_AUTOCLOSE=1 into the wrapper's LSEnvironment, so the wrapper exits once it has opened the unpacked app. - The watchdog's reopen is a process of its own: it stops the bundle's launchers left with nothing below them, opens with open -n -a, waits for the new app to answer, tries once more, and writes the outcome to app.log. - The app stops such launchers of its own bundle when it starts. - A child that exited and was never reaped is not a process below a launcher. The real wrapper always has one, the open it ran, so the cleanup akou start had never stopped a real wrapper. - The release job opens the built zip for the first time and fails when a launcher is left behind.
…e thread came back Four hangs on a daily-use Mac left nothing in hangs/ and no word about it. The watchdog gave the sample 5 s and waited on it; under a load average of 60 to 97 that was never enough, a cut sample said nothing, and an app whose thread answered again during the wait was ended anyway. - The sample runs beside the watchdog for at most 20 s. The log gets where it is and the main thread's innermost named frames, or why there is no sample. - A second line gives the load average and how late the watchdog's own ticks ran, which tells a starved machine from a stuck thread. - A thread that answers before the sample is done is not ended. What held the thread those four times is not known.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 47 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…s no process list to read
# Conflicts: # docs/TRAPS.md # docs/ux/DESKTOP.md # src/main/watchdog.ts # tests/fixtures/watchdog-app.ts # tests/watchdog.test.ts
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.
The app stopped answering four times in three days on my Mac, and the watchdog ended it each time without leaving a sample. The hangs folder held nothing, and the log did not say why.
The watchdog gave
sample5 s and waited on it. Under load that was never enough, and a sample that was cut short said nothing. Twice the app's thread wrote to the log again while the watchdog waited, and it was ended anyway.What changes:
The cause of the four hangs is not found. What the logs show: three came within about a minute of a load average of 60 to 97 on that Mac, and the fourth three and a half minutes before one. A scratch app idle for 13 minutes on a generated library of 5,000 calls never answered slower than 10 ms, so a library scan is not it as far as measured. The next hang will carry the evidence.
Stacked on #384, which changes the same file. Merge that one first; this diff then shrinks to its own commit.