question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

machines appear to have pseudo-TTY issues

See original GitHub issue

Describe the bug

A Go test that makes use of pseudo-TTYs works fine on both Linux and Mac locally, and on Linux on Actions. However, on Mac on Actions, it fails pretty regularly, about a quarter of the time.

To Reproduce

  1. Install Go 1.14.x
  2. Clone https://github.com/mvdan/sh
  3. Revert https://github.com/mvdan/sh/commit/ab43dfa8ae84bf3e4c10176a4bd4d837aa97ba9a to re-enable the flaky test
  4. Run the test a bunch of times, via go test -run TestRunnerTerminalExec/Pseudo ./interp

You can hammer the test much harder by using stress. For example, to run 64 parallel processes until you hit a failure:

go test -vet=off -c -o test && stress -p=64 ./test -test.run TestRunnerTerminalExec/Pseudo

Expected behavior

No failures, ever. @theclapp was nice enough to run the stress line above, and he got zero failures even after 200k runs in over fifteen minutes. Likewise, I can’t reprodue any issue on Linux.

Runner Version and Platform

From a recent failed job on macos-latest today, Current runner version: '2.165.2'. Links below.

What’s not working?

The test fails with a weird signal: hangup error:

--- FAIL: TestRunnerTerminalExec (0.00s)
    --- FAIL: TestRunnerTerminalExec/Pseudo (0.04s)
##[error]        terminal_test.go:129: signal: hangup
FAIL
FAIL	mvdan.cc/sh/v3/interp	3.529s

Below is a list of such failures in the past few weeks:

I really don’t know what else to try. Given that physical Mac machines of ours can’t reproduce the issue, and that the error seems to come from a OS signal, I don’t know how else to proceed but to raise a bug here.

/cc @myitcv @leitzler

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
myitcvcommented, Mar 27, 2020

We’re also seeing issues with the Mac builders for the https://github.com/govim/govim project, to the extent that we had to disable the Mac tests:

https://github.com/govim/govim/commit/2d6e2fb03301c6c5f512f18b17aa0a5b00a9d575

Our tests are considerably more involved than @mvdan’s so I suspect using the repro above will be simpler. But in case you need the repro steps, the linked commit gives the steps our mac builds used to follow before we disabled them.

Very happy to provide more info/help diagnose - we’re just out of ideas on our side 😃

0reactions
nikola-jokiccommented, Mar 1, 2022

@mvdan, thank you for notifying us!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using pseudo tty with ssh results in warning
The man page for ssh says: -t Force pseudo-tty allocation. This can be used to execute arbitrary screen-based programs on a remote machine, ......
Read more >
Using pseudo tty with ssh and control master results in ...
Based on some quick tests, it seems that the manual connection opened from B to A is the one that needs the -q....
Read more >
Terminal not working in 10.12? | Apple Developer Forums
What appears to be happening is that the driver is stuck in a loop causing it to open persistent tty sessions until all...
Read more >
Unable to open pseudo-tty with 2.6 kernel / Kernel & Hardware ...
I put the 2.6 kernel in on a few boxes for fun. One box at home, with Arch, has no problem, nor does...
Read more >
devices/pseudo/md - detecting problems?
Hi , I have searched wiki for pseudo tty devices but it was very complex for me to understand. Can any one help...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found