What killed my process and why?

后端 未结 14 947
误落风尘
误落风尘 2020-11-22 09:34

My application runs as a background process on Linux. It is currently started at the command line in a Terminal window.

Recently a user was executing the application

14条回答
  •  隐瞒了意图╮
    2020-11-22 10:05

    A tool like systemtap (or a tracer) can monitor kernel signal-transmission logic and report. e.g., https://sourceware.org/systemtap/examples/process/sigmon.stp

    # stap .../sigmon.stp -x 31994 SIGKILL
       SPID     SNAME            RPID  RNAME            SIGNUM SIGNAME
       5609     bash             31994 find             9      SIGKILL
    

    The filtering if block in that script can be adjusted to taste, or eliminated to trace systemwide signal traffic. Causes can be further isolated by collecting backtraces (add a print_backtrace() and/or print_ubacktrace() to the probe, for kernel- and userspace- respectively).

提交回复
热议问题