Skip to content
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

memory leak fixes #2221

Merged
merged 1 commit into from
Feb 13, 2014
Merged

memory leak fixes #2221

merged 1 commit into from
Feb 13, 2014

Conversation

ptraczyk
Copy link
Contributor

fixes requested in slava77#22

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @ptraczyk (Piotr Traczyk) for CMSSW_7_0_X.

memory leak fixes

It involves the following packages:

RecoLocalMuon/DTSegment

@nclopezo, @cmsbuild, @anton-a, @thspeer, @slava77, @Degano can you please review it and eventually sign? Thanks.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.
@ktf you are the release manager for this.
You can merge this pull request by typing 'merge' in the first line of your comment.

@@ -77,6 +77,9 @@
delete *(cand++); // delete the candidate!
}

for (vector<DTHitPairForFit*>::iterator it = hitsForFit.begin(), ed = hitsForFit.end();
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not just use a std::vector<std::shared_ptr<DTHitPairForFit>> and then you never have to think about memory management?

Copy link
Contributor

Choose a reason for hiding this comment

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

Chris, I agree, this is a better choice.
I'd stick with what we have in this PR.
Piotr, please make changes to use the smart pointers in the 71X PR with new DT features.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, I need to make (simple) changes in a few places for this to work. I'll
leave this as it is here and change the 71X code

On Wed, Feb 5, 2014 at 5:01 PM, slava77 [email protected] wrote:

In RecoLocalMuon/DTSegment/src/DTMeantimerPatternReco.cc:

@@ -77,6 +77,9 @@
delete *(cand++); // delete the candidate!
}

  • for (vector<DTHitPairForFit*>::iterator it = hitsForFit.begin(), ed = hitsForFit.end();

Chris, I agree, this is a better choice.
I'd stick with what we have in this PR.
Piotr, please make changes to use the smart pointers in the 71X PR with
new DT features.

Reply to this email directly or view it on GitHubhttps://github.com//pull/2221/files#r9465354
.

@cmsbuild
Copy link
Contributor

@slava77
Copy link
Contributor

slava77 commented Feb 5, 2014

@Degano @nclopezo
Alessandro and David, could you please rerun the jenkins tests, hoping this time they will be reproducible. The last run had unexpected changes, e.g. in tracking plots in 25.0

@nclopezo
Copy link
Contributor

nclopezo commented Feb 5, 2014

Hi Slava,

I just started them again.

@nclopezo
Copy link
Contributor

nclopezo commented Feb 5, 2014

@slava77
Hi Slava,

you should be able to see them now

@slava77
Copy link
Contributor

slava77 commented Feb 5, 2014

These are due to problems with SET_GLOBAL monitoring
@deguio Federico, could you please follow up.
There are some NaNs in the plots, which breaks the comparison/diff logic.

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 5, 2014

@slava77
Copy link
Contributor

slava77 commented Feb 6, 2014

+1
tested #2221 492a05f
in CMSSW_7_0_X_2014-02-03-0200/sign303

no differences in the outputs, running the short matrix and few K events in 10 GeV and 1 TeV gun samples.

Valgrind shows that the leaks in DTRecSegment4DProducer::produce are gone

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 6, 2014

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_0_X IBs unless changes (tests are also fine). @nclopezo, @ktf can you please take care of it?

@slava77
Copy link
Contributor

slava77 commented Feb 6, 2014

@ktf @davidlange6
Giulio and David: what should I expect to happen here?
One option is that this gets merged to 71X and shows up happily in at least one IB there and then gets merged to 70X.
Thoughts?

One observation here is that I don't see changes in the total memory footprint of the job based on RSS or VSIZE reported in the end of the path by the memory check.
Here, I checked a fastsim 5.2 (10 GeV muons) modified to generate 40 muons and running 1K events.
So, while the leak is clearly there, that change in memory probably never gets visible to the memory checker.

@ktf
Copy link
Contributor

ktf commented Feb 6, 2014

I like your idea. Since 71X is based on 70X, this should merge by simply opening a different pull request, using the same branch.

@slava77
Copy link
Contributor

slava77 commented Feb 6, 2014

Giulio, would you like me to make it, or would you rather do it yourself? Please let me know

@ktf
Copy link
Contributor

ktf commented Feb 6, 2014

#2340.

@davidlange6
Copy link
Contributor

+1

@slava77 slava77 mentioned this pull request Feb 7, 2014
@nclopezo
Copy link
Contributor

Hi all,

Given that #2340 was merged last Friday I would like to confirm if it is ok to merge this pull request now.

@davidlange6
Copy link
Contributor

David -
I will go through this and any other 70x items tomorrow as input to the ORP.

david

On Feb 10, 2014, at 1:42 PM, David Mendez [email protected]
wrote:

Hi all,

Given that #2340 was merged last Friday I would like to confirm if it is ok to merge this pull request now.


Reply to this email directly or view it on GitHub.

nclopezo added a commit that referenced this pull request Feb 13, 2014
@nclopezo nclopezo merged commit 3041535 into cms-sw:CMSSW_7_0_X Feb 13, 2014
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.

7 participants