Repository navigation
viewer-tests: add depth start/stop memory leak regression test - #15277
Merged
remibettan merged 3 commits intoJun 29, 2026
Merged
Conversation
3 tasks
sysrsbuild-gh-agentic
left a comment
Collaborator
There was a problem hiding this comment.
rs-agentic bot — automated review
Overall this is a well-structured regression test with a clear rationale. A few issues found below (see inline comments):
- 🐛 Bug:
get_private_bytes()returns 0 silently on Win32 API failure, poisoning baseline and slope - 🐛 Risk:
get_splash()dereferences_splash_texwith no null guard afterreset() ⚠️ Enhancement: OLS denominator not explicitly guarded against zero (onlyn>=2is checked)⚠️ Enhancement: Hard-coded CSV output path may be unwritable in some CI configurations⚠️ Enhancement:select_depth_onlydirectly mutates internal map — fragile coupling⚠️ Enhancement: Global watchdog bump affects all tests; risk of long hangs on future regressions- ℹ️ Guideline:
texture_bufferdestructor should document that a live GL context is required at teardown
remibettan
force-pushed
the
viewer-mem-leak-test
branch
2 times, most recently
from
June 28, 2026 20:01
8b0970b to
675ab0b
Compare
remibettan
force-pushed
the
viewer-mem-leak-test
branch
from
June 29, 2026 07:52
2bed94e to
ad7fb6f
Compare
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.
Tracked by: RSDEV-12247
Summary
Regression test for the GL texture leak fixed in #15275.
Drives the full viewer through 20 depth-only Start/Stop cycles (10s stream + 5s idle each, ≈5 min wall-clock), samples current process memory after each cycle, fits an OLS slope on iters 4–20 (first three are warmup), and fails if the slope exceeds 1 MB/iter.
Per-platform memory metric (all measure current — not peak — process memory, so the slope reflects per-cycle accumulation):
PROCESS_MEMORY_COUNTERS_EX.PrivateUsage(Task Manager's "Private Bytes")/proc/self/statusVmRSStask_info(TASK_VM_INFO).phys_footprintgetrusage().ru_maxrssis deliberately not used — it's peak RSS, monotonically non-decreasing, useless for slope-based leak detection.Measured slopes with the fix from #15275 (all well under the 1 MB/iter threshold):
Also bumps the ImGui-test-engine watchdog (warning 60s, kill 1200s) so this soak test isn't killed at the default 60s.
Notes
Test plan
Jenkins pipeline nightly gui run: https://rsjenkins.realsenseai.com/job/LRS_libci_pipeline/17005/