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

Checkout action randomly fails on self-hosted runner #333

Open
return-tosleep opened this issue Aug 17, 2020 · 7 comments
Open

Checkout action randomly fails on self-hosted runner #333

return-tosleep opened this issue Aug 17, 2020 · 7 comments

Comments

@return-tosleep
Copy link

return-tosleep commented Aug 17, 2020

Checkout action randomly fails on self-hosted runner with the following error message: ##[error]No such file or directory

My workflow:

on: push
name: ci
jobs:
  ci:
    name: Run CI
    runs-on: self-hosted
    steps:
    - uses: actions/checkout@v2

Error message on action run

Screenshot

Information about self-hosted runner:

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04 LTS
Release:	20.04
Codename:	focal
$ git --version
git version 2.28.0

This issue occurs randomly. Sometimes re-running the action fixes this.

Any steps to debug the issue and find the root cause? The error message is not very helpful, any way to verbosify it?

@berndvdveen
Copy link

@return-tosleep See this other issue #334 (comment)

@ericsciple
Copy link
Contributor

@return-tosleep can you turn on step debug logging.

If that doesn't provide enough details, may need to enable runner diagnostic logs

@return-tosleep
Copy link
Author

@ericsciple thanks for the debugging tip. I am enabling debugging, will get back to you here when I can get the logs on a failed job.

@return-tosleep
Copy link
Author

@ericsciple here are the logs from a failed job:

##[debug]Starting: Run actions/checkout@v2
##[debug]Register post job cleanup for action: actions/checkout@v2
##[debug]Loading inputs
##[debug]Evaluating: github.repository
##[debug]Evaluating Index:
##[debug]..Evaluating github:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'repository'
##[debug]=> 'return-tosleep/test'
##[debug]Result: 'return-tosleep/test'
##[debug]Evaluating: github.token
##[debug]Evaluating Index:
##[debug]..Evaluating github:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'token'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Loading env
##[group]Run actions/checkout@v2
with:
  repository: return-tosleep/test
  token: ***
  ssh-strict: true
  persist-credentials: true
  clean: true
  fetch-depth: 1
  lfs: false
  submodules: false
##[endgroup]
##[error]No such file or directory
##[debug]System.ComponentModel.Win32Exception (2): No such file or directory
##[debug]   at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
##[debug]   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
##[debug]   at System.Diagnostics.Process.Start()
##[debug]   at GitHub.Runner.Sdk.ProcessInvoker.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Channel`1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, CancellationToken cancellationToken)
##[debug]   at GitHub.Runner.Common.ProcessInvokerWrapper.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Channel`1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, CancellationToken cancellationToken)
##[debug]   at GitHub.Runner.Worker.Handlers.DefaultStepHost.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Boolean inheritConsoleHandler, CancellationToken cancellationToken)
##[debug]   at GitHub.Runner.Worker.Handlers.NodeScriptActionHandler.RunAsync(ActionRunStage stage)
##[debug]   at GitHub.Runner.Worker.ActionRunner.RunAsync()
##[debug]   at GitHub.Runner.Worker.StepsRunner.RunStepAsync(IStep step, CancellationToken jobCancellationToken)
##[debug]Finishing: Run actions/checkout@v2

@return-tosleep
Copy link
Author

@ericsciple any updates?

@ericsciple
Copy link
Contributor

I think something on your machine/workflow may be deleteing node.exe from the runner. When the error happens can you check whether <RUNNER_DIR>\externals\node12\bin\node.exe exists?

@ericsciple
Copy link
Contributor

That error is from the runner. The only process that NodeScriptActionHandler execs is node.exe.

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

3 participants