CI Deadlock: No Output Then Killed
A step emits nothing and never finishes until the timeout kills it. Silent hangs are usually a real deadlock or a command blocking on input, which is a deterministic code/config issue, not a blip.
What this error means
The log shows the step starting, then no further output, until it is cancelled for timing out. A deterministic deadlock reproduces every run regardless of runner.
Run ./build.sh
(no output)
##[error] The operation was canceled.Common causes
A lock-ordering or thread deadlock
Two paths waiting on each others locks never proceed; the process sits idle until killed.
A command blocking on stdin
An interactive prompt with no TTY in CI blocks forever waiting for input that never comes.
How to fix it
Make commands non-interactive and dump stacks
Avoid input waits and capture where it is stuck.
export DEBIAN_FRONTEND=noninteractive
apt-get install -y <pkg> # no prompts
# for a hung JVM/Go process, capture a stack dump on the runner
jstack <pid> 2>/dev/null || kill -QUIT <pid>Find and fix the deadlock
- Reproduce locally with the same inputs and capture a thread/goroutine dump.
- Add timeouts to blocking calls so they fail with context.
- Remove any reliance on interactive input in CI.
How to prevent it
- Always run CI commands non-interactively.
- Add timeouts to blocking operations.
- A retry will not fix a deterministic deadlock; it must be fixed in your code/config. A larger runner does not help here.