nodejs / nodejs/node

Support printing backtrace also on SIGTERM

Open
#56,879 7 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
JavaScript
Stars
122k
Forks
37.3k
Avg merge
4d 2h
Merged PRs (30d)
283

Description

What is the problem this feature will solve?

PR #29207 added support for --trace-sigint. A similar feature can be very useful for SIGTERM as well. When running on k8s, if liveness probe doesn't respond, the pod is terminated using SIGTERM. It can be very useful to have a trace in case the application is stuck in an infinite loop.

What is the feature you are proposing to solve the problem?

Add --trace-sigterm to print a trace on SIGTERM.

What alternatives have you considered?

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing PR #29207 and the existing --trace-sigint implementation to identify the relevant signal-handling entry point. Done means Node accepts --trace-sigterm and prints a backtrace when SIGTERM is received, including termination from a liveness-probe failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
cli, operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.