[Security Solution] Memory leak during prebuilt rule installation and upgrade #204800
Labels
8.18 candidate
bug
Fixes for quality problems that affect the customer experience
Feature:Prebuilt Detection Rules
Security Solution Prebuilt Detection Rules area
impact:high
Addressing this issue will have a high level of impact on the quality/strength of our product.
performance
Team:Detection Rule Management
Security Detection Rule Management Team
Team:Detections and Resp
Security Detection Response Team
Team: SecuritySolution
Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.
v8.18.0
Summary
While testing the prebuilt rule installation workflow locally, I encountered an Out of Memory (OOM) error. The script I was running fetched Fleet packages containing prebuilt rules one by one, installed the rules from the packages, and then upgraded them to the latest version.
script.mjs
After running for a couple of hours, the script failed with an OOM error. Below is the script output at the moment of failure:
Error Details
The error message itself was:
Findings
I reran the script, monitoring memory consumption over time, and confirmed a steady increase in memory usage—from ~2.5GB at the start to ~6GB within a couple of hours. Additionally, even after stopping the package test script, Kibana's memory consumption remained at a stable, elevated level.
This strongly indicates a memory leak in Kibana.
Additional Notes
The error occurred during the upgrade perform step, but this does not necessarily mean that the memory leak exists in that specific API handler. It could be in any of the following API handlers used by the script:
POST /api/fleet/epm/packages/security_detection_engine/${version}
POST /internal/detection_engine/prebuilt_rules/installation/_perform
POST /internal/detection_engine/prebuilt_rules/upgrade/_review
POST /internal/detection_engine/prebuilt_rules/upgrade/_perform
POST /api/detection_engine/rules/_bulk_action?dry_run=false
Further investigation is required to pinpoint the exact source of the memory leak.
The text was updated successfully, but these errors were encountered: