hermes - 💡(How to fix) Fix Bug: uv venv venv --python 3.11 causes severe memory spike during installation [1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#17897Fetched 2026-05-01 05:55:18
View on GitHub
Comments
1
Participants
1
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
labeled ×3closed ×1commented ×1reopened ×1

During the installation of hermes-agent, the system runs out of memory when creating the Python virtual environment with uv.

The problematic command is:

cd /opt/hermes-agent && uv venv venv --python 3.11 2>&1

This step rapidly consumes available RAM until the Linux OOM killer starts terminating processes.

Error Message

When the command above is executed, memory usage increases very quickly. The system eventually enters an OOM condition and starts killing unrelated processes.

Root Cause

The installation cannot reliably proceed because this step can consume all available RAM and trigger the OOM killer.

Code Example

cd /opt/hermes-agent && uv venv venv --python 3.11 2>&1

---

Out of memory: Killed process ... (systemd)
Out of memory: Killed process ... ((sd-pam))
Out of memory: Killed process ... (.opencode) total-vm:74764388kB
Out of memory: Killed process ... (unattended-upgr)
Out of memory: Killed process ... (uv)
Out of memory: Killed process ... (rsyslogd)

---

(.opencode) total-vm:74764388kB

---

uv venv venv --python 3.11

---

cd /opt/hermes-agent && uv venv venv --python 3.11 2>&1

---

uv venv venv --python 3.11

---

uv venv venv --python /usr/bin/python3.11
RAW_BUFFERClick to expand / collapse

Bug: uv venv venv --python 3.11 causes severe memory spike during installation

Summary

During the installation of hermes-agent, the system runs out of memory when creating the Python virtual environment with uv.

The problematic command is:

cd /opt/hermes-agent && uv venv venv --python 3.11 2>&1

This step rapidly consumes available RAM until the Linux OOM killer starts terminating processes.

Observed behavior

When the command above is executed, memory usage increases very quickly. The system eventually enters an OOM condition and starts killing unrelated processes.

Example OOM output:

Out of memory: Killed process ... (systemd)
Out of memory: Killed process ... ((sd-pam))
Out of memory: Killed process ... (.opencode) total-vm:74764388kB
Out of memory: Killed process ... (unattended-upgr)
Out of memory: Killed process ... (uv)
Out of memory: Killed process ... (rsyslogd)

The most notable part is that .opencode shows extremely high virtual memory usage:

(.opencode) total-vm:74764388kB

This suggests that uv may not be the only process involved, or that another process is triggered or active during this installation step.

Expected behavior

Creating the virtual environment should complete without exhausting system memory:

uv venv venv --python 3.11

Expected result:

  • virtual environment created successfully
  • no OOM condition
  • no unrelated processes killed

Actual behavior

The system rapidly consumes available RAM during the uv venv step and then becomes unstable due to OOM killer activity.

Reproduction step

Run the following during installation:

cd /opt/hermes-agent && uv venv venv --python 3.11 2>&1

Why this looks suspicious

Creating a Python virtual environment should normally be a lightweight operation. It should not consume massive amounts of memory or cause the OOM killer to terminate unrelated system services.

The issue may be related to one of the following:

  • uv resolving or downloading Python 3.11 unexpectedly
  • a parallel or background process being triggered during this step
  • .opencode interacting with the installation process
  • recursive or uncontrolled process spawning
  • an installation script starting additional processes while the venv is being created

Suggested investigation

Please check whether the installation flow can accidentally trigger or interact with other processes while this command is running:

uv venv venv --python 3.11

It may also be worth documenting or recommending the explicit Python path variant:

uv venv venv --python /usr/bin/python3.11

to avoid unexpected Python resolution behavior.

Impact

The installation cannot reliably proceed because this step can consume all available RAM and trigger the OOM killer.

extent analysis

TL;DR

The most likely fix is to specify the explicit Python path when creating the virtual environment to avoid unexpected Python resolution behavior.

Guidance

  • Investigate if the installation flow triggers or interacts with other processes while the uv venv venv --python 3.11 command is running.
  • Try using the explicit Python path variant: uv venv venv --python /usr/bin/python3.11 to avoid unexpected Python resolution behavior.
  • Monitor system resource usage during the installation process to identify potential memory leaks or excessive resource consumption.
  • Consider adding logging or debugging statements to the installation script to gain more insight into the interactions between processes during the virtual environment creation step.

Example

cd /opt/hermes-agent && uv venv venv --python /usr/bin/python3.11 2>&1

Notes

The root cause of the issue is unclear, but specifying the explicit Python path may help mitigate the problem. Further investigation is needed to determine the exact cause of the memory spike and OOM killer activity.

Recommendation

Apply workaround: Specify the explicit Python path when creating the virtual environment, as it may help avoid unexpected Python resolution behavior and reduce the risk of memory exhaustion.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Creating the virtual environment should complete without exhausting system memory:

uv venv venv --python 3.11

Expected result:

  • virtual environment created successfully
  • no OOM condition
  • no unrelated processes killed

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING