ITEP-84109 [Release 2025.2] Bugfix: Memory usage steadily increases over time#1005
Open
ltalarcz wants to merge 10 commits intorelease-2025.2from
Open
ITEP-84109 [Release 2025.2] Bugfix: Memory usage steadily increases over time#1005ltalarcz wants to merge 10 commits intorelease-2025.2from
ltalarcz wants to merge 10 commits intorelease-2025.2from
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request addresses a memory leak issue (Issue #845) in the SceneScape tracking system by implementing a configurable timeout mechanism for cleaning up suspended tracks. The suspended tracks were accumulating indefinitely in memory, causing unbounded memory growth over time. The solution adds a new suspended_track_timeout_secs parameter (default: 60 seconds) that automatically removes suspended tracks after they exceed the specified age.
Changes:
- Added configurable
suspended_track_timeout_secsparameter with a default value of 60.0 seconds across the tracking system - Implemented cleanup logic in C++ TrackManager that removes old suspended tracks during each prediction cycle
- Updated Python bindings and configuration flow to expose the new parameter throughout the stack
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| controller/src/robot_vision/include/rv/tracking/TrackManager.hpp | Added mSuspendedTrackMaxAgeSecs config field and mSuspensionTimes map to track suspension timestamps; added cleanupOldSuspendedTracks method declaration |
| controller/src/robot_vision/src/rv/tracking/TrackManager.cpp | Implemented cleanup logic to remove old suspended tracks; updated suspendTrack/reactivateTrack to maintain suspension times; calls cleanup at start of both predict() methods |
| controller/src/robot_vision/python/src/robot_vision/extensions/tracking.cpp | Exposed suspended_track_timeout_secs parameter in Python bindings for TrackManagerConfig |
| controller/src/controller/tracking.py | Added DEFAULT_SUSPENDED_TRACK_TIMEOUT_SECS constant (60.0 seconds) |
| controller/src/controller/ilabs_tracking.py | Updated IntelLabsTracking constructor to accept and configure suspended_track_timeout_secs parameter |
| controller/src/controller/time_chunking.py | Updated TimeChunkedIntelLabsTracking to propagate suspended_track_timeout_secs to child trackers |
| controller/src/controller/scene.py | Added suspended_track_timeout_secs parameter to Scene initialization and tracker setup |
| controller/src/controller/scene_controller.py | Updated extractTrackerConfigData to parse suspended_track_timeout_secs from config file with default fallback |
| controller/src/controller/cache_manager.py | Updated refreshScenes to include suspended_track_timeout_secs in tracker_config array |
| controller/config/tracker-config.json | Added suspended_track_timeout_secs: 60.0 to default tracker configuration |
| controller/config/tracker-config-time-chunking.json | Added suspended_track_timeout_secs: 60.0 to time-chunking tracker configuration |
| tests/system/metric/test_data/tracker-config.json | Added suspended_track_timeout_secs: 60.0 to test configuration |
| tests/system/metric/test_data/tracker-config-time-chunking.json | Added suspended_track_timeout_secs: 60.0 to time-chunking test configuration |
| tests/system/metric/tc_tracker_metric.py | Updated test to parse and pass suspended_track_timeout_secs parameter |
| controller/docs/user-guide/How-to-configure-tracker.md | Added documentation section explaining the new Suspended Track Timeout parameter |
saratpoluri
approved these changes
Feb 17, 2026
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
saratpoluri
approved these changes
Feb 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
This pull request addresses issue #845 by adding a configurable timeout for cleaning up suspended tracks in the tracking system, preventing unbounded memory usage. The suspended track timeout can now be set via an environment variable, and old suspended tracks are automatically removed after the specified duration. Key changes span both the Python and C++ components of the tracking code.
✨ Type of Change
Select the type of change your PR introduces:
🧪 Testing Scenarios
Describe how the changes were tested and how reviewers can test them too:
✅ Checklist
Before submitting the PR, ensure the following: