Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open /dev/pts/0: permission denied in some cases #2912

Closed
flokli opened this issue Jul 31, 2024 · 3 comments
Closed

open /dev/pts/0: permission denied in some cases #2912

flokli opened this issue Jul 31, 2024 · 3 comments

Comments

@flokli
Copy link

flokli commented Jul 31, 2024

Is your feature request related to a problem? Please describe.
In some cases, we're getting a failure running the global environment hook, as /dev/pts/0 is not (yet?) evailable.

We see an error like the following in the buildkite web interface:

Running global environment hook
$ /nix/store/q296piq39zqzrvka23wpvdqdj8pns2nq-buildkite-agent-hooks/environment
🚨 Error: Error setting up job executor: error running "/tmp/buildkite-agent-bootstrap-hook-runner-31860448": open /dev/pts/0: permission denied

This is buildkite-agent-3.59.0.

It might be happening only on high load, so smells like some race condition inside buildkite-agent, before any of our actual code for this step is run.

The hook itself is fairly unsuspicious:

$ cat /nix/store/q296piq39zqzrvka23wpvdqdj8pns2nq-buildkite-agent-hooks/environment
#!/nix/store/5jw69mbaj5dg4l2bj58acg3gxywfszpj-bash-5.2p26/bin/bash
set -o errexit
set -o nounset
set -o pipefail

# shellcheck source=/dev/null
source /nix/store/321j126r7238qvckl7x536c0d2kshsz6-buildkite-env-hook

$ cat /nix/store/321j126r7238qvckl7x536c0d2kshsz6-buildkite-env-hook

# (empty file)

Additional context
Add any other context or screenshots about the feature request here.

@flokli
Copy link
Author

flokli commented Jul 31, 2024

This might be related to creack/pty#196.

@flokli flokli mentioned this issue Jul 31, 2024
2 tasks
@flokli
Copy link
Author

flokli commented Jul 31, 2024

Hold on, my buildkite-agent version still uses pty v1.1.20. I'll try with 3.76.1, your latest release tomorrow, which does use pty 1.1.19 and report back.

@flokli
Copy link
Author

flokli commented Aug 1, 2024

This doesn't seem to occur with 3.76.1 anymore, closing.

@flokli flokli closed this as completed Aug 1, 2024
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

No branches or pull requests

1 participant