Skip to content

Fix the default log file path of OVRTX renderer - #5749

Merged
pbarejko merged 4 commits into
isaac-sim:developfrom
huidongc:ovrtx-renderer-logging
May 22, 2026
Merged

pbarejko merged 4 commits into
isaac-sim:developfrom
huidongc:ovrtx-renderer-logging

Conversation

@huidongc

@huidongc huidongc commented May 22, 2026 •

Copy link
Copy Markdown
Collaborator

Description

2026-05-22T12:41:09Z [376,470ms] [Info] [omni.rtx] Waiting for compilation of ray tracing shaders for RTX renderer main raytracing pipeline by GPU driver: 30 seconds so far
2026-05-22T12:41:39Z [406,471ms] [Info] [omni.rtx] Waiting for compilation of ray tracing shaders for RTX renderer main raytracing pipeline by GPU driver: 60 seconds so far
2026-05-22T12:42:09Z [436,471ms] [Info] [omni.rtx] Waiting for compilation of ray tracing shaders for RTX renderer main raytracing pipeline by GPU driver: 90 seconds so far
2026-05-22T12:42:39Z [466,471ms] [Info] [omni.rtx] Waiting for compilation of ray tracing shaders for RTX renderer main raytracing pipeline by GPU driver: 120 seconds so far
2026-05-22T12:43:09Z [496,471ms] [Info] [omni.rtx] Waiting for compilation of ray tracing shaders for RTX renderer main raytracing pipeline by GPU driver: 150 seconds so far
2026-05-22T12:43:39Z [526,471ms] [Info] [omni.rtx] Waiting for compilation of ray tracing shaders for RTX renderer main raytracing pipeline by GPU driver: 180 seconds so far
2026-05-22T12:44:09Z [556,471ms] [Info] [omni.rtx] Waiting for compilation of ray tracing shaders for RTX renderer main raytracing pipeline by GPU driver: 210 seconds so far
2026-05-22T12:44:16Z [563,300ms] [Info] [omni.rtx] Ray tracing shader compilation for RTX renderer main raytracing pipeline finished after 216 seconds

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label May 22, 2026
@huidongc
huidongc requested a review from pbarejko May 22, 2026 12:33

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Isaac Lab Review Bot

Summary

This PR fixes a cross-platform compatibility issue with the OVRTX renderer log file path. The fix replaces the hardcoded Linux-specific /tmp/ovrtx_renderer.log with a cross-platform solution using Python's tempfile.gettempdir(). Additionally, it redirects OVRTX renderer logs to stdout during CI tests for better visibility.


🏗️ Architecture & Design Review

Cross-platform temp directory (✅ Excellent)

  • Using tempfile.gettempdir() is the correct cross-platform approach
  • This returns C:\\Users\\<user>\\AppData\\Local\\Temp on Windows and /tmp on Linux/macOS
  • The import statements are properly organized at module level

Stdout redirection for tests (✅ Well-designed)

  • The _redirect_ovrtx_renderer_log_to_stdout() helper is well-structured
  • Uses /dev/stdout on Unix and CON on Windows - both are valid approaches for platform-specific stdout redirection
  • The function properly walks both direct env (tiled_camera) and manager-based env (scene.base_camera, scene.wrist_camera) patterns

🔇 Silent Failure Analysis

Potential edge cases:

  1. Renderer type check (Lines 304-305 in rendering_test_utils.py): The check getattr(renderer_cfg, "renderer_type", None) == "ovrtx" is safe and will silently skip non-OVRTX renderers as intended.

  2. Missing attributes: The code uses getattr(..., None) defensively throughout, which prevents AttributeError exceptions. This is appropriate for config inspection.

  3. Windows CON device: Using CON as a pseudo-file for stdout on Windows is a valid special device name. However, note that some environments (like certain CI runners) may have restrictions on console device access. If this becomes an issue, an alternative would be NUL for discarding logs or a real temp file.


🧪 Test Coverage Assessment

What's covered:

  • The PR adds OVRTX log redirection to all three rendering test functions: rendering_test_shadow_hand, rendering_test_cartpole, and rendering_test_dexsuite_kuka
  • The redirect is conditionally applied only when renderer == "ovrtx_renderer"

What could be improved:

  • No explicit unit test for _redirect_ovrtx_renderer_log_to_stdout() itself, but this is acceptable given it's an internal test utility function
  • The existing rendering tests will exercise this code path when run with OVRTX renderer

📋 Minor Observations

  1. Docstring clarity (Line 283-287): The docstring clearly explains the purpose and the platform-specific behavior. Well documented!

  2. Changelog fragment: Present and correctly describes the fix.

  3. Skip file for isaaclab_tasks: The .skip file is present as expected when changes don't require a changelog entry for that package.


✅ Verdict

This is a clean, well-thought-out fix for a genuine cross-platform compatibility issue. The implementation follows Python best practices and the test infrastructure changes improve CI observability.

CI Status: Several checks are still pending. Recommend waiting for CI to complete before merging.


🤖 Review generated by Isaac Lab Review Bot | Commit: 0add0a0

@greptile-apps

greptile-apps Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes the OVRTX renderer's default log file path to use tempfile.gettempdir() instead of the Linux-specific /tmp, and adds a helper to redirect those logs to stdout during rendering tests for CI visibility.

  • ovrtx_renderer_cfg.py: Default log_file_path now uses os.path.join(tempfile.gettempdir(), "ovrtx_renderer.log"), making the config portable across Windows, Linux, and macOS.
  • rendering_test_utils.py: Adds _redirect_ovrtx_renderer_log_to_stdout, which is called at the start of the three rendering test functions (shadow_hand, cartpole, dexsuite_kuka) to point the OVRTX log file at /dev/stdout (Linux) or CON (Windows), surfacing shader compilation timing and other renderer output in CI logs.

Confidence Score: 4/5

Safe to merge; changes are narrowly scoped to the log file path default and a test-only stdout redirect helper.

The config fix is correct and strictly improves portability. The new _redirect_ovrtx_renderer_log_to_stdout helper works for the three test functions it is wired into, but it walks a fixed list of camera attribute names, so any future test that uses a differently-named camera will silently miss the redirect without a clear signal. The docstring also slightly overstates what pytest captures vs. what becomes visible in CI logs. Neither issue affects current functionality.

source/isaaclab_tasks/test/rendering_test_utils.py — the hardcoded camera attribute list in _redirect_ovrtx_renderer_log_to_stdout is worth revisiting when new rendering tests are added.

Important Files Changed

Filename Overview
source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer_cfg.py Replaces hardcoded /tmp/ovrtx_renderer.log with os.path.join(tempfile.gettempdir(), "ovrtx_renderer.log") for cross-platform compatibility; default is evaluated at import time rather than lazily at instance creation.
source/isaaclab_tasks/test/rendering_test_utils.py Adds _redirect_ovrtx_renderer_log_to_stdout to pipe OVRTX renderer output to stdout in CI; walks a fixed set of camera attribute names, which may not cover future test camera configs.
source/isaaclab_ov/changelog.d/huidongc-ovrtx-renderer-logging.rst Changelog entry documenting the cross-platform temp directory fix.
source/isaaclab_tasks/changelog.d/huidongc-ovrtx-renderer-logging.skip Empty skip marker indicating no changelog entry is required for the isaaclab_tasks package.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[rendering_test_shadow_hand / cartpole / dexsuite_kuka] --> B{renderer == ovrtx_renderer?}
    B -- Yes --> C[_redirect_ovrtx_renderer_log_to_stdout]
    B -- No --> E[Continue with default log_file_path]
    C --> D{Walk camera cfgs\ntiled_camera / base_camera / wrist_camera}
    D --> F{renderer_cfg.renderer_type == 'ovrtx'?}
    F -- Yes --> G[Set log_file_path = /dev/stdout or CON]
    F -- No --> H[Skip]
    G --> I[OVRTX renderer writes logs to stdout]
    I --> J[Logs visible in CI output]
    E --> K[OVRTXRendererCfg default\nos.path.join tempfile.gettempdir, ovrtx_renderer.log]
Loading

Reviews (1): Last reviewed commit: "changelog fragment" | Re-trigger Greptile

@pbarejko
pbarejko merged commit 0a9bb26 into isaac-sim:develop May 22, 2026
114 of 117 checks passed
@huidongc
huidongc deleted the ovrtx-renderer-logging branch May 23, 2026 03:55
huidongc added a commit that referenced this pull request May 25, 2026
# Description

Cherry-picked PR #5749 from `develop`.

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
mataylor-nvidia added a commit that referenced this pull request Aug 13, 2026
# Description

Fixes large blocks of NUL bytes being written to CI logs during kitless
rendering tests, at the source.

The kitless rendering tests overrode `OVRTXRendererCfg.log_file_path` to
`/dev/stdout` (`CON` on Windows), added in #5749 so the RTX
shader-compilation timeline would be visible while a test appeared to
hang.

OVRTX opens that path natively and, running with
`keep_system_alive=True`, retains the handle for the lifetime of the
process. Under pytest's file-descriptor capture, fd 1 is a temporary
file that pytest rewinds and truncates between tests, so the retained
handle keeps writing at a stale offset and the resulting sparse gap is
read back as a block of NUL bytes.

This drops the override entirely rather than working around it.
`log_file_path` already defaults to `<system temp>/ovrtx_renderer.log`,
so `_redirect_ovrtx_renderer_log_to_stdout()` only ever moved the log
somewhere less safe — and its hardcoded camera-name list
(`tiled_camera`, `base_camera`, `wrist_camera`) silently missed any
camera named otherwise.

To keep the log visible, an autouse fixture in
`source/isaaclab_tasks/test/conftest.py` replays the bytes each test
appends. It is a no-op for tests that never build an OVRTX renderer,
records only the byte range written during the test, and replays from
the beginning when the 64 bytes in front of that range changed — the log
was truncated and rewritten, by OVRTX opening one an earlier pytest
process left behind, say.

Net effect: 48 lines deleted, 36 added, and no test-owned file
descriptor competing with pytest for stdout.

## Alternative considered

Running the child pytest with `--capture=sys` (#7031) avoids the
sparse-file mechanism, but breaks `SimulationApp.__init__`, which calls
`faulthandler.enable()` — that needs a real fd, and under `sys` capture
`sys.stderr` is a `CaptureIO` with no `fileno()`. It also sends every
native fd-1/fd-2 write and all subprocess output from passing tests
straight to the job log, reversing #6462.

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Screenshots

Failure output with the fixture in place:

```
--------------------------- Captured stdout teardown ---------------------------

----- OVRTX renderer log: test_failing_ovrtx_test -----
[omni.rtx] BOOM
```

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package (do **not** edit
`CHANGELOG.rst` or bump `extension.toml` — CI handles that)
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants