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

Buildkite Agent PTY randomly failed with fork/exec... operation not permitted #2790

Closed
leakingtapan opened this issue May 23, 2024 · 0 comments · Fixed by #2791
Closed

Buildkite Agent PTY randomly failed with fork/exec... operation not permitted #2790

leakingtapan opened this issue May 23, 2024 · 0 comments · Fixed by #2791

Comments

@leakingtapan
Copy link

leakingtapan commented May 23, 2024

The problem

The buildkite agent could randomly fail the job with following error message:

2024-05-20 11:15:52 PDT $ git clone -v -- ssh...
...
...
2024-05-20 11:15:52 PDT 🚨 Error: Failed to checkout plugin docker: error running "/usr/bin/git checkout -f e9efccb": error starting pty: fork/exec /usr/bin/git: operation not permitted
2024-05-20 11:15:52 PDT Running global pre-exit hook
2024-05-21 09:28:12 PDT ⚠️ Warning: Checkout failed! cleaning repository post-checkout: error running "/usr/bin/git clean -ffxdq": error starting pty: fork/exec /usr/bin/git: operation not permitted (Attempt 1/3 Retrying in 2s)
2024-05-20 10:37:40 PDT 🚨 Error: error running "/bin/bash -e -c \"trap 'kill -- $$' INT TERM QUIT; if [ -n \\\"$(git diff HEAD~1 --exit-code 'cruise/ai_platform/search')\\\" ]; then\\n  cat <<- ...\"": error starting pty: fork/exec /bin/bash: operation not permitted

I worked with BK support on this issue for long time, and we are able to pin down the issue being the github.com/creack/pty PTY package that's used. Although v1.1.21 reverted a bug v1.1.20 that's mostly related to this bug. The issue is not fully resolved in v1.1.21.

I tested following BK agent version:

  • v3.59.0 uses pty v1.1.20
  • v3.63.1 uses pty v1.1.21
    all has the same issue, just v3.3.60 has a lower frequency.

I tested v3.63.1 with pty v1.1.19 and the problem no longer happens. So there should be something something wrong with pty v1.1.21 still.

Proposed solution

pin agent's pty package version to v1.1.19

cc @DrJosh9000 @steveh

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 a pull request may close this issue.

1 participant