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
hammer: mon: fix memory leak in prepare_beacon #10238
Conversation
@@ -501,6 +502,7 @@ bool MDSMonitor::prepare_beacon(MMDSBeacon *m) | |||
dout(0) << "got beacon for MDS in STATE_STOPPING, ignoring requested state change" | |||
<< dendl; | |||
_note_beacon(m); | |||
m->put(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this put should be here when return 'true', because we can go into propose_pending() from dispatch() in mon/PaxosService.cc. I'm not so familiar with MDS monitor code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prepare_update()
is responsible to free the message before returns. so this change is correct.
Memory leaks every time when you see in monitor log: |
Adding DNM just to keep this very new PR out of the next hammer integration testing round. Will remove it afterwards. |
@aiicore Is this bug present in infernalis, jewel? Do you know which commit fixed it? When backporting, we prefer to cherry-pick existing fixes. |
@smithfarm This code lasts until v10.0.5. There was big MDSMonitor reorganization in 4e9b953, and above code was removed. |
@aiicore OK - is there an existing tracker issue? Or can you make a new one? |
@smithfarm I think there is no related tracker issue. I'll make one soon. |
@smithfarm I've created bug report http://tracker.ceph.com/issues/17285 and assigned to myself, but I can't edit it anymore (wanted to change it to FIX and clear a typo). Am I missing permissions? |
@aiicore Don't know about your tracker permissions, but I fixed up the issue so it will work with our backporting scripts and saved queries. |
@smithfarm Thanks! |
@aiicore Could you please rebase. |
@aiicore Also, please add a |
prepare_beacon() case of prepare_update() should put() message in two more cases, because is the last step of dispatch() Fixes: http://tracker.ceph.com/issues/17285 Signed-off-by: Igor Podoski <igor.podoski@ts.fujitsu.com>
@smithfarm rebased + additional line in commit |
…acon Reviewed-by: Nathan Cutler <ncutler@suse.com>
…acon Reviewed-by: Nathan Cutler <ncutler@suse.com>
@jcsp @tchaikov This hammer-only fix passed a rados suite at http://tracker.ceph.com/issues/17151#note-7 with failures that I believe have been addressed (except for http://tracker.ceph.com/issues/15139 which is caused by the build system no longer providing dumpling-era packages). I have rebuilt the integration branch to include the two fixes and scheduled a new run at http://tracker.ceph.com/issues/17151#note-14 Do you think it's OK to merge provided the second run succeeds? |
…acon Reviewed-by: Nathan Cutler <ncutler@suse.com>
…acon Reviewed-by: Nathan Cutler <ncutler@suse.com>
Second run succeeded; third run here: http://pulpito.front.sepia.ceph.com/smithfarm-2016-11-21_11:52:41-rados-hammer-backports---basic-smithi/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
lgtm. |
Looks sensible to me |
http://tracker.ceph.com/issues/17285
prepare_beacon() case of prepare_update() should put()
message in two more cases, because is the last step
of dispatch()
Signed-off-by: Igor Podoski igor.podoski@ts.fujitsu.com