Repository navigation
fix: keep navd enabled with --except widgets so the Maps widget does not flood the log - #61
Merged
Conversation
…not flood the log --except widgets keeps chronod, which launches the stock Maps widget (GeneralMapsWidget). The widget connects to the mach service com.apple.navigationService, owned by com.apple.navd, which stays disabled in the connectivity category. The lookup fails and the widget retries in a tight loop: about 26,000 unified-log lines per second, about 26 MB per minute under data/var/db/diagnostics, and roughly 2.3 CPU cores between the widget and diagnosticd on iOS 27.0. Add navd to the widgets category as a shared label and to the widgets doctor feature, so `doctor --requires widgets` reports the broken state and `verify` flags simulators slimmed by an older version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
lgtm. Thanks! |
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.
With
--except widgets, the stock Maps widget (GeneralMapsWidget) spins in a tight loop and floods the unified log, becausecom.apple.navdstays disabled in theconnectivitycategory. This addsnavdto thewidgetscategory as a shared label, the same way #22 and #26 shared the AMS and Wallet daemons withstore, and to thewidgetsdoctor feature.Cause
--except widgetskeepschronod, which launches the widget extension. The widget opens the mach servicecom.apple.navigationService. In the iOS 27.0 runtime that service is declared bySystem/Library/LaunchDaemons/com.apple.navd.plist, so withnavddisabled the lookup fails and the widget retries without a pause:Evidence
One iPhone simulator on iOS 27.0, simslim 0.11.0, Xcode 27.0 (27A266a), macOS 27.2 on an M5 Pro. Profile:
--except photos,store,icloud,web,widgets. Nothing ran in the simulator except the system. Each row is two 60 s windows: a quiet one for disk growth and CPU, then one withsimctl spawn <udid> log stream --level debugfor the line count.data/var/db/diagnosticsgrowth in 60 s--except …,widgets,navddisabledGeneralMapsWidgetpaused with SIGSTOPnavdstarted as a session-only launchd job--keep com.apple.navd, fresh bootGeneralMapsWidget. The CPU isdiagnosticdat about 125% and the widget at about 100%, with no log stream attached.navdjob brought the loop back within seconds (10,187 lines/s over the next 10 s), so the dependency holds in both directions.navdhad aphys_footprintof 8 MB.Workaround on released versions: add
--keep com.apple.navd(or"keep": ["com.apple.navd"]in a profile) wheneverwidgetsis excepted.Changes
profiles.go: addcom.apple.navdtowidgets.Labels. It stays inconnectivitytoo, so a profile without--except widgetsstill disables it.features.go: addcom.apple.navdto thewidgetsfeature, sodoctor --requires widgetsfails on a simulator in the looping state.verifyneeds no change: withwidgetsexcepted it now reportsnavdas drift on simulators slimmed by an older version, and a normalonrepairs them.Validation
make checkpasses.doctor --requires widgetsreportsBROKEN widgets — com.apple.navd disabledon the 0.11.0 state (0.11.0 itself reportsok) andokafter the re-slim;verify --except photos,store,icloud,web,widgetsflagscom.apple.navdon the 0.11.0 state.onfrom this branch was not run on a device. The last table row used 0.11.0 with--keep com.apple.navd, which leavesnavdin the same state. Only iOS 27.0 was measured, and there was no stock-simulator control run.🤖 Generated with Claude Code