{
  "id": "go/os-exec-command-killed",
  "signature": "error: signal: killed",
  "signature_zh": "错误：信号：被杀死",
  "regex": "error:\\ signal:\\ killed",
  "domain": "go",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "The executed command was terminated by an operating system signal, typically SIGKILL, due to resource limits or manual intervention.",
  "root_cause_type": "generic",
  "root_cause_zh": "执行的命令被操作系统信号终止，通常为SIGKILL，由于资源限制或手动干预。",
  "versions": [
    {
      "version": "1.20",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.21",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Restarting the command without investigating",
      "why_fails": "May be killed again due to same resource issue; check OOM killer or ulimit.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use exec.Cmd with SysProcAttr to set process group and handle signals",
      "success_rate": 0.85,
      "how": "cmd := exec.Command(\"command\")\ncmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}\nif err := cmd.Run(); err != nil {\n    if exitErr, ok := err.(*exec.ExitError); ok {\n        if status, ok := exitErr.Sys().(syscall.WaitStatus); ok {\n            if status.Signaled() { /* handle signal */ }\n        }\n    }\n}",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.84,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-03-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}