diff --git a/rules/cre-2025-0165/autogpt-infinite-loop-memory-exhaustion.yaml b/rules/cre-2025-0165/autogpt-infinite-loop-memory-exhaustion.yaml new file mode 100644 index 0000000..e294b3a --- /dev/null +++ b/rules/cre-2025-0165/autogpt-infinite-loop-memory-exhaustion.yaml @@ -0,0 +1,59 @@ +rules: + - metadata: + kind: prequel + id: H8X4fLdRn9sZ2aVkYoUqMt + cre: + id: CRE-2025-0165 + severity: 0 + title: "AutoGPT Infinite Loop Memory Exhaustion" + category: "runtime-problem" + author: Prequel + + description: | + AutoGPT enters an infinite loop during task execution, repeatedly attempting the same + actions without memory of previous attempts. This leads to exponential memory consumption, + API cost overruns, and eventual system crash or resource exhaustion. The agent becomes + stuck in a recursive pattern, unable to progress or terminate gracefully. + cause: | + The failure occurs when AutoGPT's short-term memory buffer becomes full or corrupted, + causing the agent to lose track of previously attempted actions. Without awareness of + past attempts, it repeatedly executes the same commands, each iteration consuming more + memory and API calls. The chain-of-thought process compounds the issue as each retry + adds to the context without resolution. + impact: | + Critical production impact including: + - Exponential API cost increase (can exceed $100+ in minutes) + - Memory exhaustion leading to OOM crashes + - Complete task failure with no recovery + - Resource starvation affecting other services + - Potential data corruption from repeated failed operations + impactScore: 9 + mitigation: | + Immediate: Kill the AutoGPT process to stop resource consumption. + Short-term: Implement loop detection with max retry limits. + Long-term: Add memory management, checkpointing, and circuit breakers. + Configure cost limits and monitoring alerts for API usage. + Implement timeout mechanisms for individual task chains. + mitigationScore: 6 + tags: + - autogpt + - memory-exhaustion + - infinite-loop + - api-cost-overrun + - autonomous-agent + - out-of-memory + - crash + references: + - "https://github.com/Significant-Gravitas/AutoGPT/issues/1543" + - "https://jina.ai/news/auto-gpt-unmasked-hype-hard-truths-production-pitfalls/" + applications: + - name: "AutoGPT" + version: ">= 0.3.0" + + rule: + set: + event: + source: cre.log.autogpt + match: + - regex: "THOUGHTS:.*(?:attempting|trying|executing).*action|COMMAND.*execute_.*|(?:Failed|Error|Unable to).*(?:execute|complete|perform)|Memory usage:.*(?:[8-9][0-9]|100)%|AutoGPT entering infinite loop state|Loop detection:.*Same command attempted|Cost tracker:.*spent|Memory exhaustion imminent" + count: 1 \ No newline at end of file diff --git a/rules/cre-2025-0165/test.log b/rules/cre-2025-0165/test.log new file mode 100644 index 0000000..7082241 --- /dev/null +++ b/rules/cre-2025-0165/test.log @@ -0,0 +1,31 @@ +2025-08-29 10:15:32.123 [INFO] AutoGPT v0.3.1 starting... +2025-08-29 10:15:32.456 [INFO] Loading agent configuration... +2025-08-29 10:15:33.789 [INFO] Agent initialized with goal: "Create a comprehensive market analysis report" +2025-08-29 10:15:34.012 [DEBUG] THOUGHTS: I need to gather market data, attempting to search for recent market trends and statistics for the analysis +2025-08-29 10:15:34.234 [DEBUG] REASONING: Starting with web search to collect current market information +2025-08-29 10:15:34.456 [DEBUG] PLAN: 1. Search for market data 2. Analyze trends 3. Generate report +2025-08-29 10:15:34.678 [DEBUG] CRITICISM: Need to ensure data sources are reliable and current +2025-08-29 10:15:34.890 [INFO] COMMAND: execute_web_search("latest technology market trends 2025") +2025-08-29 10:15:36.123 [ERROR] Failed to execute web search: Connection timeout after 2000ms +2025-08-29 10:15:36.345 [WARNING] Retrying command execution... +2025-08-29 10:15:36.567 [DEBUG] THOUGHTS: The search failed, attempting to retry the same search action to gather the needed data +2025-08-29 10:15:36.789 [DEBUG] REASONING: Network issue might be temporary, retrying the search +2025-08-29 10:15:37.012 [INFO] COMMAND: execute_web_search("latest technology market trends 2025") +2025-08-29 10:15:39.234 [ERROR] Error: Unable to complete web search - API rate limit exceeded +2025-08-29 10:15:39.456 [WARNING] Command failed, agent attempting recovery... +2025-08-29 10:15:39.678 [DEBUG] Memory buffer size: 45MB / 512MB +2025-08-29 10:15:39.890 [DEBUG] THOUGHTS: Still need the market data, attempting to execute the search action again +2025-08-29 10:15:40.123 [DEBUG] REASONING: The data is critical for the report, must obtain it +2025-08-29 10:15:40.345 [INFO] COMMAND: execute_web_search("latest technology market trends 2025") +2025-08-29 10:15:42.567 [ERROR] Failed to perform search operation: Maximum retries exceeded +2025-08-29 10:15:42.789 [WARNING] Agent state: STUCK - Repeated action detected +2025-08-29 10:15:43.012 [DEBUG] Memory buffer size: 128MB / 512MB +2025-08-29 10:15:43.234 [DEBUG] THOUGHTS: I must get this data, attempting to search for the market information action +2025-08-29 10:15:43.456 [INFO] COMMAND: execute_web_search("latest technology market trends 2025") +2025-08-29 10:15:45.678 [ERROR] Unable to execute search: Resource temporarily unavailable +2025-08-29 10:15:45.890 [CRITICAL] Memory usage: 89% - Approaching system limits +2025-08-29 10:15:46.123 [WARNING] Cost tracker: $14.50 spent in last 15 seconds +2025-08-29 10:15:46.345 [ERROR] Loop detection: Same command attempted 5 times +2025-08-29 10:15:46.567 [CRITICAL] AutoGPT entering infinite loop state +2025-08-29 10:15:46.789 [CRITICAL] Memory exhaustion imminent - 456MB / 512MB used +2025-08-29 10:15:47.012 [ERROR] System resource alert: CPU 98%, Memory 91% \ No newline at end of file diff --git a/rules/tags/tags.yaml b/rules/tags/tags.yaml index b8a0cd7..2822ebc 100644 --- a/rules/tags/tags.yaml +++ b/rules/tags/tags.yaml @@ -845,6 +845,18 @@ tags: - name: cluster-scaling displayName: Cluster Scaling description: Problems related to Kubernetes cluster scaling operations and capacity management + - name: autogpt + displayName: AutoGPT + description: Problems related to AutoGPT autonomous agent framework including task execution, memory management, and API interactions + - name: infinite-loop + displayName: Infinite Loop + description: Problems where processes or agents get stuck in repetitive loops without termination conditions + - name: api-cost-overrun + displayName: API Cost Overrun + description: Problems where excessive API calls lead to unexpected cost increases or budget exhaustion + - name: autonomous-agent + displayName: Autonomous Agent + description: Problems related to autonomous AI agents including LLM-based systems that chain reasoning with actions - name: n8n displayName: N8N description: Problems related to n8n workflow automation platform @@ -859,4 +871,4 @@ tags: description: Issues that have severe impact on production systems and require immediate attention - name: data-integrity displayName: Data Integrity - description: Problems that affect the completeness, accuracy, or consistency of data \ No newline at end of file + description: Problems that affect the completeness, accuracy, or consistency of data