Repository navigation
fix(app): stop a leftover install launcher from keeping akou down after the watchdog reopens it - #384
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.
|
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 18 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 |
GeiserX
added a commit
that referenced
this pull request
Oct 10, 2026
… and stop ending an app that came back (#385) 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 `sample` 5 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 sample runs beside the watchdog for up to 20 s. The log then says where the file is and where the main thread was, or why there is no sample. - A second line gives the load average and how late the watchdog's own ticks ran. Ticks seconds late mean the whole process was starved, not one thread stuck. - A thread that answers before the sample is done is not ended. 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.
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.
Last night the watchdog ended a hung 0.6.5 and opened akou again, and nothing came up. The app stayed down for eight hours. A launcher with no app under it had been alive since the install, and
open -aactivated that instead of starting the app. The same leftover launcher showed up after installing 0.6.2, 0.6.4 and 0.6.5.Where it comes from: the release wrapper unpacks the app, opens it, then shows an "Installation complete" panel and waits for a click on Close. Until someone clicks, it is that launcher. ElectroBun's wrapper exits by itself when
ELECTROBUN_INSTALLER_UI_AUTOCLOSE=1is set.What changes:
Info.plist, so the wrapper exits after the first open however it was opened.open -n -a, waits for the new app to answer, tries once more, and writes the outcome toapp.log.akou startgot in fix(cli): let akou start wait out a new bundle's slow first launch instead of failing at 3 s #360 never stopped a real wrapper. The wrapper keeps an exited, unreapedopenchild, and any child counted as "has an app". The test wrapper now has that child too.Measured on GitHub's macOS runner with the signed 0.6.5. Without the variable the wrapper stays and a second open starts nothing; with it the wrapper is gone within 10 s:
https://github.com/GeiserX/akou/actions/runs/38039278420
The new first-open check fails on 0.6.5, as it should:
https://github.com/GeiserX/akou/actions/runs/38041558121
Not covered:
akou startwith a leftover launcher and no app still waits 20 s and fails (akou-an0).