-
Notifications
You must be signed in to change notification settings - Fork 292
Description
Environment details
- OS: ubuntu-latest on GitHub Actions
- node-pty version: 1.0.0, 1.1.0-beta4
- Node.js version: 20
Summary of the below updates: If Node.js has io_uring enabled, the bugs occurs.
Update: It works with Node.js 18! https://github.com/lydell/node-pty-bug/actions/runs/6283383630/job/17063792075
And 19: https://github.com/lydell/node-pty-bug/actions/runs/6283390976/job/17063807172
And 20.0.0: https://github.com/lydell/node-pty-bug/actions/runs/6283396940/job/17063819451
So it must have been introduced in some 20.x release … the search continues.
Aha! It’s Node.js 20.3.0 that introduced it: https://github.com/lydell/node-pty-bug/actions/runs/6283409434
Switched the child process from node to bash and it got a bit flaky: https://github.com/lydell/node-pty-bug/actions/runs/6283443471/attempts/1 vs https://github.com/lydell/node-pty-bug/actions/runs/6283443471/attempts/2
Update: Can happen on Node.js 18.18.0 too: https://github.com/lydell/node-pty-bug/actions/runs/6415765977
Issue description
When running ptys in parallel, some of them unexpectedly receive “signal 1” (SIGHUP?) and exit early.
This happens in ubuntu-latest on GitHub Actions. But not in macOS-latest. And not my own Ubuntu machine (and not on my own macOS machine either).
I made a minimal repo to show it happening: https://github.com/lydell/node-pty-bug
Example failing output (ubuntu-latest): https://github.com/lydell/node-pty-bug/actions/runs/6283275300/job/17063579148
Example successful output (macOS-latest): https://github.com/lydell/node-pty-bug/actions/runs/6283275300/job/17063579184
This is so strange! I wonder what’s special about Linux on GitHub Actions that makes this happen. Any ideas?