{"record":{"id":"182166398ed62298","repo":"oven-sh/bun","slug":"securityscannerterminated","errorCode":null,"errorMessage":"SecurityScannerTerminated","messagePattern":"SecurityScannerTerminated","errorType":"exception","errorClass":"bun_install::Error","httpStatus":null,"severity":"error","filePath":"src/install/error.rs","lineNumber":123,"sourceCode":"    #[error(\"InvalidErrorCode\")]\n    InvalidErrorCode,\n    #[error(\"UnknownErrorCode\")]\n    UnknownErrorCode,\n    #[error(\"SecurityScannerNotFound\")]\n    SecurityScannerNotFound,\n    #[error(\"SecurityScannerNotInDependencies\")]\n    SecurityScannerNotInDependencies,\n    #[error(\"InvalidScannerVersion\")]\n    InvalidScannerVersion,\n    #[error(\"ScannerFailed\")]\n    ScannerFailed,\n    #[error(\"UnknownMessageType\")]\n    UnknownMessageType,\n    #[error(\"MissingAdvisoriesField\")]\n    MissingAdvisoriesField,\n    #[error(\"SecurityScannerFailed\")]\n    SecurityScannerFailed,\n    #[error(\"SecurityScannerTerminated\")]\n    SecurityScannerTerminated,\n    #[error(\"InvalidAdvisoriesFormat\")]\n    InvalidAdvisoriesFormat,\n    #[error(\"InvalidAdvisoryFormat\")]\n    InvalidAdvisoryFormat,\n    #[error(\"MissingPackageField\")]\n    MissingPackageField,\n    #[error(\"InvalidPackageField\")]\n    InvalidPackageField,\n    #[error(\"EmptyPackageField\")]\n    EmptyPackageField,\n    #[error(\"InvalidDescriptionField\")]\n    InvalidDescriptionField,\n    #[error(\"InvalidUrlField\")]\n    InvalidUrlField,\n    #[error(\"MissingLevelField\")]\n    MissingLevelField,\n    #[error(\"InvalidLevelField\")]","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/src/install/error.rs#L105-L141","documentation":"The security scanner process was killed by an OS signal (SIGKILL, SIGTERM, OOM-killer, etc.) instead of exiting normally (security_scanner.rs:1770-1775). The signal name is printed. Common causes are memory pressure or an external supervisor terminating the child.","triggerScenarios":"Scanner child process exceeds container/CI memory limits and the OOM killer sends SIGKILL; a tooling wrapper (test runner, Docker stop) sends SIGTERM mid-scan; scanner spawns large analysis that triggers resource limits.","commonSituations":"CI containers with low memory ceilings scanning large dependency trees; Docker `timeout`/`stop_grace_period` terminating the install step; system-wide OOM during a scan of big monorepos.","solutions":["Raise the memory limit for the environment (CI container, Docker mem limit) so the scanner can finish","Reduce scan scope (fewer packages, exclude workspaces) if the scanner supports it","Re-run once to rule out a one-off external kill; if reproducible, capture which signal was printed and find its sender","If a wrapper enforces a timeout shorter than scan duration, increase it"],"exampleFix":"# before: container limit kills scanner (SIGKILL)\ndocker run --memory=512m bun-install\n\n# after\ndocker run --memory=2g bun-install","handlingStrategy":"retry","validationCode":"# pre-flight memory headroom in constrained CI/containers\navail=$(awk '/MemAvailable/ {print int($2/1024)}' /proc/meminfo)\n[ \"$avail\" -ge 1024 ] || echo \"low memory: scanner may be OOM-killed\" >&2","typeGuard":null,"tryCatchPattern":"# signals are usually environmental: retry the install once\nbun install || (echo \"retrying after scanner termination\" >&2 && bun install)","preventionTips":["Size container/CI memory limits above the scanner's peak RSS for your dependency count","Avoid tight process timeouts around the install step while a scan is in flight","Monitor for OOM kills (dmesg) when scans of large trees fail mysteriously"],"tags":["security-scanner","signal","oom","ci"],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}