Skip to content

Wi-Fi late, part 2: configd holds en0 89 s with IOKit quiet; hosted 0061 (oneios-ubt-count) to sample configd and wifid; next boot's lines and ioslog searches - #10

Merged
akshaynexus merged 3 commits into
mainfrom
fix-wifi-late-2
Nov 13, 2026
Merged

akshaynexus merged 3 commits into
mainfrom
fix-wifi-late-2

Conversation

@akshaynexus

@akshaynexus akshaynexus commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

The phone's result for #8 (2026-11-13, main c1223f8)

The reserved unit did not make Wi-Fi earlier. On the phone:

  • configd named en0 89 s after launchd, and IOKit's busy count was already 0, so the quiet wait was not the hold in this boot.
  • configd's IPConfiguration set IFF_UP 20 s later.
  • wifid's first scan came 70 s after that.

The PC boot shows the same steps in the same order, only slower. What holds configd before it names en0 is still unknown.

This PR

  • Hosted 0061 (hosted_machine.c, under XNU_HOSTED): two additions to 0026's user backtraces.
    • oneios-ubt-count=N stops the reports after N (the default 0 keeps the old behaviour: no end).
    • Each report now starts with oneios-ubt: report K at +S s.
    • For the next boot, set these in the image's xnuhost.conf: oneios-ubt=configd,wifid,logd oneios-ubt-at=20 oneios-ubt-every=10 oneios-ubt-count=18 oneios-sysfail=configd. Then run oneios-tool sym on the addresses.
  • Docs, docs/hardware.md 3, "en0 late":
    • The phone's timeline.
    • Read in configd's open source: the plugin load order, and the InterfaceNamer thread and PreferencesMonitor's upgrade, which share the SCPreferences locks.
    • Who sets IFF_UP: configd, not wifid.
    • What starts a join: only wifid's auto-join, to a known network that is in the scan.
    • wifid's sets 25 -> 102: request 25 is APPLE80211_IOC_HOST_AP_MODE, refused on purpose with EOPNOTSUPP (kRefusedSets). wifid goes on with its attach and scans after it.
    • The exact oneios-tool ioslog show ... --proc configd, --proc wifid and --proc airportd searches, and how to copy the known-networks store out of the Data volume.
  • net/README.md: the reserved unit's phone result. Hosted README: the 0061 section. series, building.md 5.

Tests

  • Kernel built (HOSTED_OUT=fixwifi).
  • Prelink: audit 0 failures (kernel.kc 84d3304c). kernel/prelink/stubs-check.py: 666 good, 0 bad. I ran this existing Python script because oneios-tool has no stub check.
  • PC boot (oneios-ubt=configd oneios-ubt-at=850 oneios-ubt-every=45 oneios-ubt-count=6): six reports from +850 s to +1075 s, then 6 reports, the last. Named with oneios-tool sym:
    • Reports 1 and 2: configd's main thread is in _firehose_send_register, waiting for logd.
    • Reports 3 to 6: it is loading the plugin bundles (CFBundleLoadExecutable -> dyld dlopen -> objc map_images_nolock, mostly in an uninterruptible wait). While that runs, configd's MIG server thread waits for the objc runtime lock.
    • configd named en0 at +1568 s, about 940 s after it was spawned.
    • [I] Whether the phone's 89 s are the same two waits is not known: the next boot's reports, now with logd sampled too, will say.
  • Not on the phone.

🤖 Generated with Claude Code

akshaynexus and others added 3 commits November 13, 2026 09:49
… 89 s after launchd with IOKit quiet); hosted 0061, oneios-ubt-count, to sample configd and wifid in a boot's first minutes; the next boot's lines and iOS log searches

The phone (main c1223f8, kernel.kc 4b9a91ae, the reserved unit of #8): first naming by configd at +111 s after the
driver's start (launchd + 89 s) with IOKit busy 0, IFF_UP by configd at +131 s, wifid's first scan at +201 s: as late
as before. So in that boot InterfaceNamer did not wait for driverkitd; something else holds configd before it names
en0. Read in configd's open source (plugin_support.c, ifnamer.c, prefsmon.c, main branch): the plugin thread
dlopen()s the bundles that are not built in, then calls load() in its allow-list order, InterfaceNamer's first; its
thread reads NetworkInterfaces.plist, opens IONetworkStack and names, while PreferencesMonitor's load() runs
__SCNetworkConfigurationUpgrade; they share the SCPreferences locks. Which of these holds the phone's configd is
not known yet.

Hosted 0061 (osfmk/arm64/hosted/hosted_machine.c, under XNU_HOSTED like 0026): oneios-ubt-count=N stops 0026's
reports after N (default 0: no end, as before); each report starts with "oneios-ubt: report K at +S s". For the next
boot: oneios-ubt=configd,wifid oneios-ubt-at=20 oneios-ubt-every=10 oneios-ubt-count=18, and oneios-sysfail=configd;
the threads' addresses go to oneios-tool sym.

wifid's "sets 25 -> 102" is APPLE80211_IOC_HOST_AP_MODE refused with EOPNOTSUPP on purpose (kRefusedSets: the access
point modes); wifid goes on (PC and phone). configd's IPConfiguration, not wifid, sets IFF_UP. wifid joins only by
auto-join to a network of its known-networks store that the scan has: the searches that tell "none known in range"
from a fault are in docs/hardware.md 3, "en0 late".

Built: kernel HOSTED_OUT=fixwifi (1188 s, under other agents' load), prelink audit 0 failures (kernel.kc 84d3304c),
kernel/prelink/stubs-check.py 666 good, 0 bad (the existing Python script: oneios-tool has no stub check). Not booted
yet: the PC boot is in the box's qemu queue. Not on the phone.

Docs: hardware.md 3 (the phone's result, who sets IFF_UP, the join rule, request 25, the next boot's boot arguments
and lines, the ioslog searches), net/README.md (the reserved unit did not make Wi-Fi earlier), hosted README 0061,
series, building.md 5 (oneios-ubt-count).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…amed en0 (logd's registration, then the plugin bundles' load with configd's server blocked)

PC boot (qemu-aarch64, wifi=sim, kernel.kc 84d3304c with 0061, oneios-ubt=configd oneios-ubt-at=850
oneios-ubt-every=45 oneios-ubt-count=6, fresh Data store): six "oneios-ubt: report K at +S s" reports at +850 to
+1075 s, then "oneios-ubt: 6 reports, the last (oneios-ubt-count)". configd was spawned about +625 s and named en0 at
+1568 s. Named with oneios-tool sym (slide 0xbb54000): reports 1-2, the main thread in _os_state_add_handler ->
__os_trace_init_slow -> _firehose_send_register -> mach_msg (waiting for logd); reports 3-6, the main thread in
CFBundleLoadExecutableAndReturnError -> dyld dlopen_from -> notifyLoad -> libobjc map_images_nolock, mostly in an
uninterruptible wait, while configd's MIG server thread waits in objc_lookUpImpOrForward for the runtime lock. That
the phone's 89 s are the same two waits is a guess; the next boot's reports (now with logd sampled too:
oneios-ubt=configd,wifid,logd) say.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, 0062 in number order; each touches its own files)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@akshaynexus
akshaynexus merged commit d23a735 into main Nov 13, 2026
1 check passed
akshaynexus added a commit that referenced this pull request Nov 16, 2026
…neios-tool in the app, one serve per flow as root, pause/resume and net as the tool's README has them); newtodo, TODO: the merge day finished, #49 and #61 merged, CI-test #63 proved fork #10
denis0001-dev pushed a commit to denis0001-dev/OneiOS-S25-Ultra that referenced this pull request Nov 16, 2026
…ections, give_up_s and the state file (README first; the code follows)

The owner's request of 2026-11-15: downloads on a phone's mobile network. This commit is the protocol only, so that
the app (OneOS PR akshaynexus#10) can be written against it; the code and the tests come on this branch.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.

1 participant