-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Fix memory leak in auto_ptr read rule test
#49621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
cms-bot internal usage |
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49621/47159 |
|
@cmsbuild, please test Just to demonstrate it technically works. |
|
Its look good. |
|
Ok. This version just seems to leak at similar rate as the version in |
|
Are you able to tell where the leaked memory is allocated? |
|
Not presently :( |
|
+1 Size: This PR adds an extra 24KB to repository Comparison SummarySummary:
|
|
Ok, mystery understood (thanks @Dr15Jones). The memory leak of the present code in I made a simple test program on bare ROOT #include "TFile.h"
#include "TTree.h"
int main() {
auto* file = TFile::Open(".../IOPool/Input/data/SchemaEvolutionTestOLD15_1_0_pre5_splitLevel99.root");
auto* events = (TTree*)file->Get("Events");
for (int j=0; j<1000; ++j) {
for (int i=0; i<10; ++i) {
events->GetEntry(i);
}
}
return 0;
}and with that the MaxMemoryPreload shows a clear increase in the memory (and outstanding memory allocations) when increasing the iteration limit of the outer loop in the present code. With this PR the memory increase is gone. |
|
A new Pull Request was created by @makortel for master. It involves the following packages:
@Dr15Jones, @makortel, @smuzaffar can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
|
Comparison differences are related to #47071 |
|
+core |
|
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @sextonkennedy, @mandrenguyen, @ftenchini (and backports should be raised in the release meeting by the corresponding L2) |
|
+1 |
PR description:
ROOT team informed us that the
auto_ptrread rule recipe applied to a test in #48817 contains a memory leak. The memory leak occurs when the objects are reused when reading, which is not howPoolSourceworks. This PR fixes the memory leak.(I opened it as a draft because presently it seems to have a leak).Related to #43422, #43923
Resolves cms-sw/framework-team#1718
PR validation:
The test runs.
I modified the test to repeat the the 10-event file for 1000 times, and ran it through the MaxMemoryPreload. The code inSee #49621 (comment).masterseems to have a ~42 B/event leak, but so seems to have the present version of this PR. Adding back the direct schema evolution fromauto_ptr->unique_ptrdoes not leak.