Skip to content

fix: keep navd enabled with --except widgets so the Maps widget does not flood the log - #61

Merged
Interlap01 merged 1 commit into
MobAI-App:mainfrom
yadaniyil:fix/widgets-keep-navd
Oct 9, 2026
Merged

Interlap01 merged 1 commit into
MobAI-App:mainfrom
yadaniyil:fix/widgets-keep-navd

Conversation

@yadaniyil

Copy link
Copy Markdown
Contributor

With --except widgets, the stock Maps widget (GeneralMapsWidget) spins in a tight loop and floods the unified log, because com.apple.navd stays disabled in the connectivity category. This adds navd to the widgets category as a shared label, the same way #22 and #26 shared the AMS and Wallet daemons with store, and to the widgets doctor feature.

Cause

--except widgets keeps chronod, which launches the widget extension. The widget opens the mach service com.apple.navigationService. In the iOS 27.0 runtime that service is declared by System/Library/LaunchDaemons/com.apple.navd.plist, so with navd disabled the lookup fails and the widget retries without a pause:

GeneralMapsWidget [com.apple.xpc:connection] activating connection: mach=true listener=false peer=false name=com.apple.navigationService
GeneralMapsWidget [com.apple.xpc:connection] failed to do a bootstrap look-up: xpc_error=[3: No such process]
GeneralMapsWidget [com.apple.Navigation:MNNavigationXPC] navd connection invalidated while in state 'Stopped'.
GeneralMapsWidget [com.apple.Navigation:MNNavigationXPC] Attempting to restore idle connection after interruption (0 interruptions overall)
GeneralMapsWidget [com.apple.Navigation:MNAssert] *** Assertion failure in -[MNNavigationServiceRemoteProxy _remoteObjectProxy]

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 with simctl spawn <udid> log stream --level debug for the line count.

Condition Log lines/s data/var/db/diagnostics growth in 60 s Simulator CPU
--except …,widgets, navd disabled 26,235 +25.9 MB 230%
Same boot, GeneralMapsWidget paused with SIGSTOP 211 -2.4 MB 1%
Same boot, navd started as a session-only launchd job 29 +3.1 MB 0%
Re-slimmed with --keep com.apple.navd, fresh boot 72 0 MB 0%
  • In the first row 99.7% of the lines come from GeneralMapsWidget. The CPU is diagnosticd at about 125% and the widget at about 100%, with no log stream attached.
  • Removing the session-only navd job brought the loop back within seconds (10,187 lines/s over the next 10 s), so the dependency holds in both directions.
  • The other stock widget extensions that were running (Music, Photos, Batteries, Screen Time, Calendar) stayed at 0% CPU in every measured window. Only the Maps widget loops.
  • On the re-slimmed boot navd had a phys_footprint of 8 MB.

Workaround on released versions: add --keep com.apple.navd (or "keep": ["com.apple.navd"] in a profile) whenever widgets is excepted.

Changes

  • profiles.go: add com.apple.navd to widgets.Labels. It stays in connectivity too, so a profile without --except widgets still disables it.
  • features.go: add com.apple.navd to the widgets feature, so doctor --requires widgets fails on a simulator in the looping state.
  • Tests for both.

verify needs no change: with widgets excepted it now reports navd as drift on simulators slimmed by an older version, and a normal on repairs them.

Validation

  • make check passes.
  • A build of this branch, run read-only against the simulator: doctor --requires widgets reports BROKEN widgets — com.apple.navd disabled on the 0.11.0 state (0.11.0 itself reports ok) and ok after the re-slim; verify --except photos,store,icloud,web,widgets flags com.apple.navd on the 0.11.0 state.
  • Not checked: on from this branch was not run on a device. The last table row used 0.11.0 with --keep com.apple.navd, which leaves navd in the same state. Only iOS 27.0 was measured, and there was no stock-simulator control run.

🤖 Generated with Claude Code

…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>
@Interlap01
Interlap01 merged commit 6518ba7 into MobAI-App:main Oct 9, 2026
@Interlap01

Copy link
Copy Markdown
Contributor

lgtm. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants