Skip to content

Conversation

@vepadulano
Copy link
Member

This commit introduces two enhancements to the Snapshot with variations implementation:

  • Snapshot with variations must call RLoopManager::Jit before trying to request varied filters from upstream nodes. This is necessary because the upstream node could be a jitted node itself.
  • Snapshot with variations must deal with the possibility of having a different nominal upstream node type than the other varied upstream node types.

This aligns the implementation witht the one of RVariedAction for what concerns dealing with jitted nodes.

Fixes #20320

@github-actions
Copy link

github-actions bot commented Nov 8, 2025

Test Results

    21 files      21 suites   3d 16h 4m 10s ⏱️
 3 745 tests  3 745 ✅ 0 💤 0 ❌
76 781 runs  76 781 ✅ 0 💤 0 ❌

Results for commit 42a43ad.

♻️ This comment has been updated with latest results.

Copy link
Member

@hageboeck hageboeck left a comment

Choose a reason for hiding this comment

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

Nice, thanks!

I had started condensing a reproducer, too, but this change fixed my test. 🙂

This commit introduces two enhancements to the Snapshot with variations
implementation:

- Snapshot with variations must call RLoopManager::Jit before trying to
  request varied filters from upstream nodes. This is necessary because
  the upstream node could be a jitted node itself.
- Snapshot with variations must deal with the possibility of having a
  different nominal upstream node type than the other varied upstream
  node types.

This aligns the implementation witht the one of RVariedAction for what
concerns dealing with jitted nodes.

Fixes root-project#20320
@vepadulano vepadulano merged commit f19a7c2 into root-project:master Nov 10, 2025
29 of 30 checks passed
hageboeck added a commit to hageboeck/root that referenced this pull request Nov 24, 2025
This is a followup of the fix root-project#20352 for issue root-project#20320:
When snapshot with variations is run with JIT-ted filters, the
computation graph first needs to be JIT-ted before reading Defines
or Filters. In the fix for that case, an iterator invalidation on
push_back caused crashes, because vector.reserve() had been called
with the wrong size.

Here, the size is corrected, but more importantly, instead of saving the
iterator, the shared_ptr it points to is saved. This makes the code
independent of the underlying storage.
hageboeck added a commit that referenced this pull request Nov 25, 2025
This is a followup of the fix #20352 for issue #20320:
When snapshot with variations is run with JIT-ted filters, the
computation graph first needs to be JIT-ted before reading Defines
or Filters. In the fix for that case, an iterator invalidation on
push_back caused crashes, because vector.reserve() had been called
with the wrong size.

Here, the size is corrected, but more importantly, instead of saving the
iterator, the shared_ptr it points to is saved. This makes the code
independent of the underlying storage.
hageboeck added a commit to hageboeck/root that referenced this pull request Nov 25, 2025
This is a followup of the fix root-project#20352 for issue root-project#20320:
When snapshot with variations is run with JIT-ted filters, the
computation graph first needs to be JIT-ted before reading Defines
or Filters. In the fix for that case, an iterator invalidation on
push_back caused crashes, because vector.reserve() had been called
with the wrong size.

Here, the size is corrected, but more importantly, instead of saving the
iterator, the shared_ptr it points to is saved. This makes the code
independent of the underlying storage.

(cherry picked from commit 886abae)
hageboeck added a commit to hageboeck/root that referenced this pull request Nov 25, 2025
This is a followup of the fix root-project#20352 for issue root-project#20320:
When snapshot with variations is run with JIT-ted filters, the
computation graph first needs to be JIT-ted before reading Defines
or Filters. In the fix for that case, an iterator invalidation on
push_back caused crashes, because vector.reserve() had been called
with the wrong size.

Here, the size is corrected, but more importantly, instead of saving the
iterator, the shared_ptr it points to is saved. This makes the code
independent of the underlying storage.

(cherry picked from commit 886abae)
dpiparo pushed a commit that referenced this pull request Nov 25, 2025
This is a followup of the fix #20352 for issue #20320:
When snapshot with variations is run with JIT-ted filters, the
computation graph first needs to be JIT-ted before reading Defines
or Filters. In the fix for that case, an iterator invalidation on
push_back caused crashes, because vector.reserve() had been called
with the wrong size.

Here, the size is corrected, but more importantly, instead of saving the
iterator, the shared_ptr it points to is saved. This makes the code
independent of the underlying storage.

(cherry picked from commit 886abae)
KoljaFrahm pushed a commit to KoljaFrahm/root that referenced this pull request Nov 29, 2025
This is a followup of the fix root-project#20352 for issue root-project#20320:
When snapshot with variations is run with JIT-ted filters, the
computation graph first needs to be JIT-ted before reading Defines
or Filters. In the fix for that case, an iterator invalidation on
push_back caused crashes, because vector.reserve() had been called
with the wrong size.

Here, the size is corrected, but more importantly, instead of saving the
iterator, the shared_ptr it points to is saved. This makes the code
independent of the underlying storage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DF] Crash when applying Filter on Snapshot written with Vary'ed quantities

2 participants