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.

The operation was canceled.

See original GitHub issue

Describe 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:

  1. Go to Actions
  2. Run or re-run any job
  3. 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 Bundling has started 2023-03-01T06:49:56.9282005Z Copy results completed 2023-03-01T06:49:56.9290747Z Allow publish completed 2023-03-01T06:49:56.9295155Z build: 39.141ms 2023-03-01T06:49:56.9302039Z Bundling has finished 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:open
  • Created 7 months ago
  • Reactions:30
  • Comments:25

github_iconTop GitHub Comments

2reactions
bvdmitricommented, Jun 2, 2023

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.

1reaction
bvdmitricommented, Jun 2, 2023

@nuhkoca Well, we refactored our code such that it allocated and used less memory. Nothing specific to the Github actions runner.

Read more comments on GitHub >

github_iconTop Results From Across the Web

C# : OperationCanceledException : The operation was ...
An OperationCanceledException exception typically means that an Event Hubs service operation timed out. In your stack trace, it appears that ...
Read more >
System.Threading.Tasks.TaskCanceledException: The ...
On Linux it timesout and throws the following. System.Threading.Tasks.TaskCanceledException The operation was canceled. System.Threading.
Read more >
System.OperationCanceledException: The operation was ...
i have the following code, that randomly throws the following error. System.OperationCanceledException: The operation was canceled.
Read more >
C# : System.OperationCanceledException: The operation ...
OperationCanceledException: The operation was canceled" exception in chunks. The function monitors a queue that sees ~190k messages per day.
Read more >
System.OperationCanceledException : The operation was ...
When the problem occurs, the problem is solved for a short time. STACK TRACE: System.OperationCanceledException : The operation was canceled.
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