Skip to content

repro: re-enable portable_pty backend to reproduce SIGCHLD crash#71

Closed
gmpassos wants to merge 1 commit into
masterfrom
repro/portable-pty-sigchld-crash
Closed

repro: re-enable portable_pty backend to reproduce SIGCHLD crash#71
gmpassos wants to merge 1 commit into
masterfrom
repro/portable-pty-sigchld-crash

Conversation

@gmpassos

Copy link
Copy Markdown
Contributor

Purpose

Do not merge. This branch exists solely to let the portable_pty maintainer reproduce the intermittent native SIGCHLD-handler crash using the real OmnyShell app.

portable_pty installs a process-global SIGCHLD handler that races the Dart VM's child reaper. Under the session churn of opening/closing interactive PTY sessions, the node process intermittently segfaults (EXC_BAD_ACCESS / "Code Signature Invalid" on macOS) in/around portable_pty_open. It's a race, so it doesn't reproduce in a minimal example — hence this harness over the real app.

Upstream: https://github.com/kingwill101/dart_terminal/issues

Changes

  • pubspec.yaml: re-enable portable_pty: ^0.0.5.
  • Un-park the FFI backend/session from .txt.dart (archived on master precisely because of this crash); add the ShellSession.shellFamily getter that landed on the interface while they were parked.
  • Export them from the omnyshell_node barrel.
  • bin/omnyshell.dart: wire node start --pty-backend native back in and make it the default, so a normal node start uses portable_pty.
  • REPRODUCE.md: step-by-step Hub + Node + Client crash-reproduction guide.

--pty-backend script (the master default) and none remain available and do not crash — useful as a control proving the fault is in the native lib.

Verification

  • dart pub get resolves portable_pty 0.0.5
  • dart analyze lib bin → No issues found
  • node start --help shows [script, native (default), none]

See REPRODUCE.md for the full reproduction steps.

🤖 Generated with Claude Code

… crash

This branch exists solely to let the portable_pty maintainer reproduce the
intermittent native SIGCHLD-handler crash using the real OmnyShell app.

- pubspec.yaml: re-enable portable_pty: ^0.0.5
- un-park the FFI backend/session from .txt -> .dart (archived on master
  precisely because of this crash); add the missing ShellSession.shellFamily
  getter that landed on the interface while they were parked
- export them from the omnyshell_node barrel
- bin/omnyshell.dart: wire `node start --pty-backend native` back in and make
  it the default so a normal node start uses portable_pty
- REPRODUCE.md: step-by-step hub+node+client crash-reproduction guide

Not for merge or publish; master's default stays `script`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gmpassos gmpassos closed this Jun 28, 2026
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