root icon indicating copy to clipboard operation
root copied to clipboard

[Do not merge][PyROOT] Don't call `ClearProxiedObjects()` in hard shutdown mode

Open guitargeek opened this issue 1 year ago • 3 comments

The old PyROOT (pre 2019) had a slightly different atexit handler than the new one. The hard shutdown mode is different: ClearProxiedObjects() is called before the final gROOT->EndOfProcessCleanups().

I had the impresstion that this is redundant, and indeed the old PyROOT didn't do it. This commit suggests to only call ClearProxiedObjects() in soft shutdown mode, in an attempt to avoid the frequent crashes seen at the end of PyROOT tutorials, especially on Ubuntu 24.10.

See also the original PRs where this functionality was introduced:

  • https://github.com/root-project/root/pull/4687
  • https://github.com/root-project/root/pull/4753

guitargeek avatar Oct 14 '24 05:10 guitargeek

Just for extra context, note that there was a similar (albeit not equal) set of changes which spawned quite some discussion a while back https://github.com/root-project/root/pull/10753. Also, I would try to understand why we need all that extra bookeeping in the tutorials, I don't believe we should introduce those.

vepadulano avatar Oct 14 '24 08:10 vepadulano

You are right, extra boilerplate in the tutorials is not good. But This PR is not meant to me merged as is, I did it to explore why ClearProxiedObjects() is needed also for hard shutdown.

And the set of code that I needed to add to the tutorials made to reason more or less clear: there is some issue with TH1 specifically.

guitargeek avatar Oct 14 '24 08:10 guitargeek

Test Results

    15 files      15 suites   3d 9h 49m 53s :stopwatch:  2 713 tests  2 712 :white_check_mark: 0 :zzz: 1 :x: 38 341 runs  38 340 :white_check_mark: 0 :zzz: 1 :x:

For more details on these failures, see this check.

Results for commit 8b960f75.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Oct 14 '24 12:10 github-actions[bot]

Superseded by #16837.

guitargeek avatar Nov 07 '24 11:11 guitargeek