Memory leak in exploration_node causes severe slowdown during full HM3D v2 benchmark (~14 GB RSS, 30+ min/episode after ~400 eps)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Ít trao đổi
- Lĩnh vực
- performance, robotics
Hướng nghiên cứu
Start with exploration_fsm.cpp lines 14-20 and trace the episode-reset calls from exploration_node. Reproduce the HM3D v2 val run with habitat_evaluation.py and monitor RSS plus the per-episode times in videos/test_hm3dv2_val/record.txt. Done means memory remains bounded across episodes without restarting the planner and slowdown no longer accumulates.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
While running the full HM3D v2 val benchmark (1000 episodes) with habitat_evaluation.py, I observed severe slowdown over time caused by what appears to be a memory leak in the C++ exploration_node. After ~420 episodes the planner's RSS grew to ~14 GB and per-episode time went from ~37s (episode 0) to 30+ minutes (episode ~420). Restarting only the ROS 2 planner (while keeping VLM servers and habitat_evaluation.py's continue.txt checkpoint) brought per-episode time back to ~60s and RSS down to ~500 MB.
Environment
- OS: Ubuntu 22.04 (jammy) — note: ROS 2 Jazzy is Tier 3 here, source-built per official docs
- ROS 2: Jazzy (built from source against the conda env's Python)
- conda env:
apexnav(Python 3.9, perapexnav_environment.yaml) - Branch:
ros2-jazzy - GPU: NVIDIA RTX 4090, CUDA 12.8, PyTorch 2.8.0+cu128
- VLM servers (default ports 12181-12184): all running fresh, never restarted during the run
- Command:
python habitat_evaluation.py --dataset hm3dv2 \ habitat.dataset.split=val \ need_video=true \ test_epi_num=-1
Symptoms
| Episode # | Per-episode time | exploration_node RSS |
|---|---|---|
| 1 | 37 s | ~500 MB (fresh) |
| 100 | ~70 s | ~2 GB |
| 300 | ~150 s | ~6 GB |
| 420 | ~30 min | ~13.9 GB |
After episode ~420 the system began swapping (60 GB total RAM, planner alone holding ~14 GB), turning the 60-second exploration loops into 30+ minutes due to OS-level page thrashing.
Reproduction
- Run the full HM3D v2 val split with
test_epi_num=-1(1000 episodes) andneed_video=true. - Periodically observe
RSSofexploration_nodevia:ps -o pid,rss,etime,cmd -p $(pgrep -f exploration_node) - Check the cumulative
seconds spend in this taskfield invideos/test_hm3dv2_val/record.txt— the per-episode delta grows roughly monotonically from ~40s to thousands of seconds.
Workaround (works, but obviously not ideal)
I wrote a tmux watchdog that restarts only the ROS 2 planner every 200 episodes (or whenever its RSS exceeds 5 GB), while keeping the 4 VLM servers and habitat_evaluation.py running. Because continue.txt checkpoints per-episode, evaluation resumes seamlessly from where it left off, and per-episode time returns to ~30-60s after each restart.
Possible Causes
In exploration_fsm.cpp lines 14-20 the FSM code does fp_.reset(...), fd_.reset(...), expl_manager_.reset(...) etc. on each episode reset, which suggests inter-episode reset was intended. But something downstream — possibly:
- a
shared_ptrto point clouds / occupancy grids / SDF map is held by another component (visualization? mapping? planner cache?) and never released - PCL / Octomap-style data structures that grow but never shrink
- accumulated frontiers / TF buffer / parameter listeners
—keeps the previous episode's allocations alive across resets.
Thanks for the great work.
- Ngôn ngữ chính
- C
- Star
- 456
- Fork
- 38
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Robotics-STAR-Lab/ApexNav
-
实机部署RGB-D数据频率Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 15/100
Robotics-STAR-Lab/ApexNav#49 ·
-
请问支持三个数据集在一张卡上并行推理吗?Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Robotics-STAR-Lab/ApexNav#48 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Robotics-STAR-Lab/ApexNav#47 · 3 bình luận ·
-
实机建图问题Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
Robotics-STAR-Lab/ApexNav#45 ·
-
ROS2环境配置问题Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Robotics-STAR-Lab/ApexNav#36 · 2 bình luận ·
Tất cả issue của Robotics-STAR-Lab/ApexNav
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
johnsonjh/emu2-cpm86#68 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Zenmap CrashĐang mởZenmap
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
BasedHardware/omi#19306 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
fastfetch-cli/fastfetch#2619 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100