The operation was canceled.
See original GitHub issueDescribe the bug Since last week actions in our different repositories started to fail with similar error:
#[error]The runner has received a shutdown signal. This can happen when the runner service is stopped, or a manually started runner is canceled.
To Reproduce Steps to reproduce the behavior:
- Go to Actions
- Run or re-run any job
- See error mentioned above
Expected behavior Workflow should be running without cancellations.
Runner Version and Platform
Image: ubuntu-22.04 Version: 20230219.1 Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20230219.1/images/linux/Ubuntu2204-Readme.md Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20230219.1
OS of the machine running the runner? Linux
What’s not working?
Workflow is failing without any reason stated in the logs, apart from it has been cancelled.
Job Log Output
2023-03-01T06:49:56.3959504Z > @mgnation/mgdata@1.4.212 _bundle
2023-03-01T06:49:56.3960408Z > node build/bundle.js
2023-03-01T06:49:56.3960710Z
2023-03-01T06:49:56.8884234Z [32mBundling has started[0m
2023-03-01T06:49:56.9282005Z [34mCopy results completed[0m
2023-03-01T06:49:56.9290747Z [34mAllow publish completed[0m
2023-03-01T06:49:56.9295155Z build: 39.141ms
2023-03-01T06:49:56.9302039Z [32mBundling has finished[0m
2023-03-01T06:49:57.2702808Z
2023-03-01T06:49:57.2708891Z > @mgnation/mgdata@1.4.212 test
2023-03-01T06:49:57.2709823Z > node ./node_modules/nyc/bin/nyc.js node ./tmp/spec/runner.js
2023-03-01T06:49:57.2710190Z
2023-03-01T06:50:56.1865343Z ##[error]The runner has received a shutdown signal. This can happen when the runner service is stopped, or a manually started runner is canceled.
2023-03-01T06:50:56.2969758Z ##[debug]Re-evaluate condition on job cancellation for step: ‘npm install, build, and test’.
2023-03-01T06:50:56.2973354Z ##[debug]Skip Re-evaluate condition on runner shutdown.
2023-03-01T06:50:56.5597757Z ----------|---------|----------|---------|---------|-------------------
2023-03-01T06:50:56.5612354Z File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
2023-03-01T06:50:56.5616821Z ----------|---------|----------|---------|---------|-------------------
2023-03-01T06:50:56.5618821Z All files | 0 | 0 | 0 | 0 |
2023-03-01T06:50:56.5620688Z ----------|---------|----------|---------|---------|-------------------
2023-03-01T06:50:56.6038836Z ##[error]The operation was canceled.
2023-03-01T06:50:56.6052060Z ##[debug]System.OperationCanceledException: The operation was canceled.
2023-03-01T06:50:56.6060563Z ##[debug] at System.Threading.CancellationToken.ThrowOperationCanceledException()
2023-03-01T06:50:56.6063113Z ##[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)
2023-03-01T06:50:56.6065859Z ##[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)
2023-03-01T06:50:56.6069900Z ##[debug] at GitHub.Runner.Worker.Handlers.DefaultStepHost.ExecuteAsync(IExecutionContext context, String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Boolean inheritConsoleHandler, String standardInInput, CancellationToken cancellationToken)
2023-03-01T06:50:56.6078953Z ##[debug] at GitHub.Runner.Worker.Handlers.ScriptHandler.RunAsync(ActionRunStage stage)
2023-03-01T06:50:56.6079410Z ##[debug] at GitHub.Runner.Worker.ActionRunner.RunAsync()
2023-03-01T06:50:56.6086736Z ##[debug] at GitHub.Runner.Worker.StepsRunner.RunStepAsync(IStep step, CancellationToken jobCancellationToken)
2023-03-01T06:50:56.6102555Z ##[debug]Finishing: npm install, build, and test
2023-03-01T06:50:56.6376954Z ##[debug]Evaluating condition for step: ‘Post Use Node.js 16.x’
2023-03-01T06:50:56.6379186Z ##[debug]Skip evaluate condition on runner shutdown.
2023-03-01T06:50:56.6392406Z ##[debug]Evaluating condition for step: ‘Post Run actions/checkout@v3’
2023-03-01T06:50:56.6392834Z ##[debug]Skip evaluate condition on runner shutdown.
2023-03-01T06:50:56.6821240Z ##[debug]Starting: Complete job
2023-03-01T06:50:56.6833228Z Uploading runner diagnostic logs
2023-03-01T06:50:56.7043348Z ##[debug]Starting diagnostic file upload.
2023-03-01T06:50:56.7046324Z ##[debug]Setting up diagnostic log folders.
2023-03-01T06:50:56.7306655Z ##[debug]Creating diagnostic log files folder.
2023-03-01T06:50:56.7419356Z ##[debug]Copying 1 worker diagnostic logs.
2023-03-01T06:50:56.7470424Z ##[debug]Copying 1 runner diagnostic logs.
2023-03-01T06:50:56.7539403Z ##[debug]Zipping diagnostic files.
2023-03-01T06:50:56.8067735Z ##[debug]Uploading diagnostic metadata file.
2023-03-01T06:50:56.8441811Z ##[debug]Diagnostic file upload complete.
2023-03-01T06:50:56.8445882Z Completed runner diagnostic log upload
2023-03-01T06:50:56.8450728Z Cleaning up orphan processes
2023-03-01T06:50:56.9100720Z ##[debug]Finishing: Complete job
2023-03-01T06:50:56.9301578Z ##[debug]Finishing: build (16.x)
Issue Analytics
- State:
- Created 7 months ago
- Reactions:30
- Comments:25
Top GitHub Comments
We were able to fix it on our side, we had a mistake in our codebase that caused enormous amount of unnecessary allocations. We no longer have any issues after the mistake has been fixed. It looks like the “The operation was cancelled” error was definitely an OOM error, but getting a better error message would be nicer.
@nuhkoca Well, we refactored our code such that it allocated and used less memory. Nothing specific to the Github actions runner.