Skip to content

fix: macOS IPC hang, zombie processes and worker crashes#135

Open
prathamtomar99 wants to merge 2 commits intometacall:masterfrom
prathamtomar99:fix/macos-ipc-worker-restart
Open

fix: macOS IPC hang, zombie processes and worker crashes#135
prathamtomar99 wants to merge 2 commits intometacall:masterfrom
prathamtomar99:fix/macos-ipc-worker-restart

Conversation

@prathamtomar99
Copy link
Copy Markdown

Closes #134

Summary

On macOS, metacall is a bash wrapper that breaks Node.js IPC silently —
every function call hangs forever. Found this while setting up locally for GSoC.

Fixed by spawning metacallcli directly with env vars replicated from the
wrapper. Also fixed the TODO in deploy.ts — worker now auto-restarts on crash
and orphaned calls get rejected immediately instead of hanging.

Type of change

  • Bug fix
  • Chore / CI

How to test

npm ci && npm test   # 26 passing, 4 pending (Linux/Windows skip on macOS)
npm start            # deploy a function, call it multiple times — no hanging

Notes for reviewers

  • macOS code isolated in if (isMacOS) — Linux/Windows untouched
  • Prefix derived dynamically from Cellar, no hardcoded paths/versions
  • Matrix CI added for ubuntu/windows/macos

Release notes

Fixed function calls hanging forever on macOS Homebrew installs.

On macOS, metacall is a bash wrapper that silently breaks Node.js IPC,
causing all function calls to hang forever after deploy.

Changes:
- Spawn metacallcli directly on macOS, detect via process.platform
- Derive install prefix dynamically from Cellar (no hardcoded paths)
- Auto-restart worker on crash, reject orphaned calls immediately
- Kill zombie processes on failed startup reload
- Add matrix tests for macOS/Linux/Windows (26 passing, 4 pending)
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.

fix: IPC broken on macOS Homebrew causing all function calls to hang forever

1 participant