Skip to content

kicad: invalidate exited IPC servers and bound BeginCommit / snapguard hangs - #1625

Merged
i2cjak merged 1 commit into
mainfrom
fix/1588-kicad-ipc
Nov 22, 2026
Merged

i2cjak merged 1 commit into
mainfrom
fix/1588-kicad-ipc

Conversation

@i2cjak

@i2cjak i2cjak commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

Clear stale server socket/PID and readiness on process exit or connection drop, gate server events by launch generation, bound pipe draining and pre-write snapguard snapshots, and probe/invalidate stalled BeginCommit calls.

Fixes #1588

…d hangs

Clear stale server socket/PID and readiness on process exit or connection drop, gate server events by launch generation, bound pipe draining and pre-write snapguard snapshots, and probe/invalidate stalled BeginCommit calls.

Fixes #1588
@i2cjak
i2cjak merged commit 59ecebd into main Nov 22, 2026
3 checks passed
i2cjak pushed a commit that referenced this pull request Nov 23, 2026
…paths

Issue #1630 reported KiCad writes hanging for 300s while reads succeeded on
macOS v0.16.4 (primarily caused by GCD worker threads blocking SIGCHLD before
#1456/#1607 and unbounded snapguard/kipc waits fixed in #1625). This hardens
the remaining write-path edge cases on HEAD:

- Remove `fallback: true` from embedded GUI timeout replies (`send_gui_raw`
  and expired-deadline `Msg::Raw`) and check `BeginCommit` timeouts before
  `fallback` in `ipc::run_on`, so embedded `BeginCommit` timeouts reach
  `explain_begin_commit_timeout_gui` (and other GUI timeouts surface real
  errors instead of bogus file-fallback activity entries).
- Bound synchronous `design_record_note` / `commit_design` calls (`30s`
  timeout) via a detached task that still finishes telemetry/STEP warm-up and
  posts completion or failure in the thread, while distinguishing task drop
  from timeout.
- Use `git::push` (which sets `GIT_TERMINAL_PROMPT=0`) in `canonical::push_upstream`.
- Canonicalize `snapshot::repo_lock` keys via `canonical::same_file` (handling
  macOS `/var` -> `/private/var` symlinks) and preserve `TurnGuard.person` when
  recomputing an empty-`top` guard in `snapguard::write_guard_within`.
- Guard headless `kicad-cli api-server` socket directories against macOS's
  104-byte `SUN_LEN` limit with a per-UID `bp-ks-<uid>` fallback and strict
  `0o700` / non-symlink / UID ownership checks.

Fixes #1630
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.

Kicad could not write

1 participant