round 16: log authd child.wait exit status + dnsd send_to failures
Round 16 audit follow-up. Three small fixes: 1. local/recipes/system/redbear-authd/source/src/main.rs:328 — the validation-mode spawn-reaper thread did 'let _ = child.wait();' silently dropping the session child's exit status. Replaced with 'match' that eprintln-logs both successful exit status and wait failure (with errno). Operators can now see when the session child exits abnormally in validation mode. 2. local/recipes/system/redbear-dnsd/source/src/main.rs:111 — the loopback DNS responder did 'let _ = socket.send_to(&reply, &src);' silently. Replaced with 'if let Err(e) = socket.send_to(...)' that eprintln-logs the failure with the source peer address. Previously DNS clients could fail to receive a valid reply with no visible error. 3. local/docs/SUPERSEDED-DOC-LOG.md — appended Round 16 entries documenting the authd/dnsd fixes plus the Round-16 audit findings that did not require code changes (acpi-rs AML 41 panics classified as internal-invariant, pcid panics already have messages, all stale CONFIG refs already retired, USB-daemon let _ = is in host-only test paths, sessiond can_* for sleep is honest stub, Mesa CS ioctl numbers verified no drift). 3 files changed, +27/-2.
This commit is contained in:
@@ -202,3 +202,23 @@ stubbing. The first two are addressed by rounds 9–14. Mesa DRM and
|
||||
Wayland null-guard work remains (EGL platform, PRIME/dma-buf, sync objects,
|
||||
single-context CS, libwayland null safety) and is tracked in
|
||||
`local/docs/3D-DESKTOP-COMPREHENSIVE-PLAN.md` § current state.
|
||||
|
||||
## Round 16 — More `let _ =` fixes + sessiond sleep-probe design (2026-07-27)
|
||||
|
||||
| Round | Item | Resolution commit | Note |
|
||||
|-------|------|---------------------|------|
|
||||
| 16 | `local/docs/SUPERSEDED-DOC-LOG.md` self-update | this entry | R15 entries appended (greeter/netctl/hotplugd let-underscore, acmd setrens security, README null+8 contradiction) |
|
||||
| 16 | `local/recipes/system/redbear-sessiond/manager.rs` `can_*` for hibernate/sleep | `7a5b5963c4` | Block comment documents future-work probe design: when `/scheme/sys/sleep` lands, mirror the `kstop_writable()` pattern used by `can_power_off/can_reboot/can_suspend`. No code change yet — kernel support doesn't exist. |
|
||||
| 16 | `local/recipes/system/redbear-authd/main.rs:328` child.wait | (this commit) | Replaced `let _ = child.wait()` with `match` that eprintln-logs exit status (validation-mode spawn reaper) |
|
||||
| 16 | `local/recipes/system/redbear-dnsd/main.rs:111` socket.send_to | (this commit) | Replaced `let _ = socket.send_to(...)` with `if let Err(e) = ...` logging the loopback failure with `src` peer address |
|
||||
|
||||
### Round 16 — Audit findings with NO code changes needed
|
||||
|
||||
| Category | Outcome |
|
||||
|----------|---------|
|
||||
| **acpi-rs AML 41 bare panics** | Audit classified all 41 sites as internal-invariant (firmware table validation, field/destructure safety). Adding diagnostic strings is a one-shot pure-text edit; tracked for a future round. |
|
||||
| **pcid IRQ/MSI-X panics** | All already carry diagnostic messages (`panic!("{driver}: failed to open IRQ file: {err}")`, etc.). The remaining concern is whether they should be `Result` (returns) — deferred; current panic behavior is correct for non-recoverable internal conditions. |
|
||||
| **Stale CONFIG references** | All `redbear-kde`/`redbear-minimal`/`redbear-wayland-guard`/`redbear-kde-session`/`pcid-spawner` are in retired/removed context; no live stale references remain. |
|
||||
| **USB daemon `let _ =` in ecmd/ftdi/usbaudiod** | All `#[cfg(not(target_os = "redox"))]` host-test paths only; never executed on Redox target. |
|
||||
| **`redbear-sessiond` can_hibernate/can_hybrid_sleep/can_suspend_then_hibernate/can_sleep hardcoded `"na"`** | Honest stub — correct D-Bus signal for missing kernel capability. Documented in module comment for future maintenance. |
|
||||
| **Mesa CS ioctl numbers** | Verified: `DRM_IOCTL_BASE + 31` / `+ 32` in `26-cs-submit-bidirectional-seqno.patch` match `redox-drm/scheme.rs` constants exactly. No drift. |
|
||||
|
||||
@@ -325,7 +325,10 @@ fn launch_session(account: &Account, session: &str, vt: u32) -> Result<Option<i3
|
||||
|
||||
if Path::new(VALIDATION_REQUEST_PATH).exists() {
|
||||
std::thread::spawn(move || {
|
||||
let _ = child.wait();
|
||||
match child.wait() {
|
||||
Ok(status) => eprintln!("redbear-authd: validation session child exited with {status}"),
|
||||
Err(e) => eprintln!("redbear-authd: validation session child wait failed: {e}"),
|
||||
}
|
||||
send_sessiond_update(&SessiondUpdate::ResetSession { vt });
|
||||
});
|
||||
return Ok(None);
|
||||
|
||||
@@ -108,7 +108,9 @@ fn start_loopback_listener() -> thread::JoinHandle<()> {
|
||||
let config = UpstreamConfig::default();
|
||||
if let Ok(response) = transport::send_query(&config, &query) {
|
||||
let reply = response.compile();
|
||||
let _ = socket.send_to(&reply, &src);
|
||||
if let Err(e) = socket.send_to(&reply, &src) {
|
||||
eprintln!("dnsd: loopback send_to({}) failed: {e}", src);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user