Skip to content

fix(firecracker): intercept SIGTERM and SIGINT to terminate VMM process immediately - #870

Open
Nachiket-Roy wants to merge 1 commit into
urunc-dev:mainfrom
Nachiket-Roy:fix-firecracker-sigterm
Open

fix(firecracker): intercept SIGTERM and SIGINT to terminate VMM process immediately#870
Nachiket-Roy wants to merge 1 commit into
urunc-dev:mainfrom
Nachiket-Roy:fix-firecracker-sigterm

Conversation

@Nachiket-Roy

Copy link
Copy Markdown

Description

Intercepts SIGTERM and SIGINT signals in the Firecracker hypervisor driver's Signal method and redirects them to Stop(pid). Since Firecracker ignores SIGTERM, this avoids waiting for the 30-second containerd grace period and makes container stops/deletions instant.

Related issues

How was this tested?

  • Unit Tests: Ran go test ./pkg/... (all passed).
  • Manual Verification: Deployed the modified binaries to a Kind/KVM Kubernetes control plane node, scaled nginx-urunc deployment to 5 replicas, and deleted them. All pods stopped and were destroyed instantly (in 0.816s total) instead of blocking for 30 seconds.

LLM usage

N/A

Checklist

  • I have read the contribution guide.
  • The linter passes locally (make lint).
  • The e2e tests of at least one tool pass locally (make test_ctr, make test_nerdctl, make test_docker, make test_crictl).
  • If LLMs were used: I have read the llm policy.

…ss immediately

Firecracker does not handle SIGTERM/SIGINT, causing the signals to be ignored
and leaving the VMM process running. When containerd/kubelet sends SIGTERM during
container stop, the process stays alive for the entire 30-second grace period
until containerd finally escalates to SIGKILL.

We now intercept SIGTERM and SIGINT in Firecracker's Signal method and redirect
them to Stop(), which terminates the VMM process immediately. This makes
Firecracker container deletion instant (less than a second) rather than blocking
for 30 seconds on every stop/delete cycle.

Also added Nachiket Roy to the contributors list.

Fixes urunc-dev#789

Signed-off-by: Nachiket Roy <nachiket.roy.2@gmail.com>
@netlify

netlify Bot commented Jul 31, 2026

Copy link
Copy Markdown

Deploy Preview for urunc canceled.

Name Link
🔨 Latest commit 3c37cad
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/6a6ca00e3f8ba30008f0cf8a

@Nachiket-Roy
Nachiket-Roy marked this pull request as ready for review July 31, 2026 13:17
@Nachiket-Roy

Copy link
Copy Markdown
Author

cc : @cmainas

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 this pull request may close these issues.

Bug: Firecracker VMM process deadlocks/hangs on SIGTERM during graceful shutdown

1 participant