Project

General

Profile

Bug #20783

osd: leak from do_extent_cmp

Added by Sage Weil 25 days ago. Updated 23 days ago.

Status:
Resolved
Priority:
Immediate
Category:
-
Target version:
-
Start date:
07/26/2017
Due date:
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Release:
Needs Doc:
No
Component(RADOS):

Description

  <kind>Leak_DefinitelyLost</kind>
  <xwhat>
    <text>16 bytes in 1 blocks are definitely lost in loss record 2 of 37</text>
    <leakedbytes>16</leakedbytes>
    <leakedblocks>1</leakedblocks>
  </xwhat>
  <stack>
    <frame>
      <ip>0xA353203</ip>
      <obj>/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so</obj>
      <fn>operator new(unsigned long)</fn>
      <dir>/builddir/build/BUILD/valgrind-3.11.0/coregrind/m_replacemalloc</dir>
      <file>vg_replace_malloc.c</file>
      <line>334</line>
    </frame>
    <frame>
      <ip>0x7D2CBE</ip>
      <obj>/usr/bin/ceph-osd</obj>
      <fn>PrimaryLogPG::do_extent_cmp(PrimaryLogPG::OpContext*, OSDOp&amp;)</fn>
      <dir>/usr/src/debug/ceph-12.1.1-609-g392d888/src/osd</dir>
      <file>PrimaryLogPG.cc</file>
      <line>4736</line>
    </frame>
    <frame>
      <ip>0x7C9711</ip>
      <obj>/usr/bin/ceph-osd</obj>
      <fn>PrimaryLogPG::do_osd_ops(PrimaryLogPG::OpContext*, std::vector&lt;OSDOp, std::allocator&lt;OSDOp&gt; &gt;&amp;)</fn>
      <dir>/usr/src/debug/ceph-12.1.1-609-g392d888/src/osd</dir>
      <file>PrimaryLogPG.cc</file>
      <line>5078</line>
    </frame>
    <frame>
      <ip>0x7D3DAE</ip>
      <obj>/usr/bin/ceph-osd</obj>
      <fn>PrimaryLogPG::prepare_transaction(PrimaryLogPG::OpContext*)</fn>
      <dir>/usr/src/debug/ceph-12.1.1-609-g392d888/src/osd</dir>
      <file>PrimaryLogPG.cc</file>
      <line>7417</line>
    </frame>
    <frame>
      <ip>0x7D4B32</ip>
      <obj>/usr/bin/ceph-osd</obj>
      <fn>PrimaryLogPG::execute_ctx(PrimaryLogPG::OpContext*)</fn>
      <dir>/usr/src/debug/ceph-12.1.1-609-g392d888/src/osd</dir>
      <file>PrimaryLogPG.cc</file>
      <line>3238</line>
    </frame>
    <frame>
      <ip>0x7D943E</ip>
      <obj>/usr/bin/ceph-osd</obj>
      <fn>PrimaryLogPG::do_op(boost::intrusive_ptr&lt;OpRequest&gt;&amp;)</fn>
      <dir>/usr/src/debug/ceph-12.1.1-609-g392d888/src/osd</dir>
      <file>PrimaryLogPG.cc</file>
      <line>2338</line>
    </frame>
    <frame>
      <ip>0x796DC9</ip>
      <obj>/usr/bin/ceph-osd</obj>
      <fn>PrimaryLogPG::do_request(boost::intrusive_ptr&lt;OpRequest&gt;&amp;, ThreadPool::TPHandle&amp;)</fn>
      <dir>/usr/src/debug/ceph-12.1.1-609-g392d888/src/osd</dir>
      <file>PrimaryLogPG.cc</file>

/a/sage-2017-07-26_14:40:34-rados-wip-sage-testing-distro-basic-smithi/1447207

History

#1 Updated by Jason Dillaman 25 days ago

  • Status changed from Verified to In Progress
  • Assignee set to Jason Dillaman

#2 Updated by Jason Dillaman 25 days ago

  • Status changed from In Progress to Need Review

#3 Updated by Sage Weil 24 days ago

coverity sez

________________________________________________________________________________
________________________
*** CID 1415740:  Resource leaks  (CTOR_DTOR_LEAK)
/home/brad/working/src/ceph/src/osd/PrimaryLogPG.cc: 4697 in
C_ExtentCmpRead::C_ExtentCmpRead(PrimaryLogPG *, OSDOp &,
boost::optional<unsigned int>, unsigned long, OSDService *, hobject_t, unsigned
int)()
4691       Context *fill_extent_ctx;
4692     
4693       C_ExtentCmpRead(PrimaryLogPG *primary_log_pg, OSDOp &osd_op,
4694                      boost::optional<uint32_t> maybe_crc, uint64_t size,
4695                      OSDService *osd, hobject_t soid, __le32 flags)
4696         : primary_log_pg(primary_log_pg), osd_op(osd_op),
>>>     CID 1415740:  Resource leaks  (CTOR_DTOR_LEAK)
>>>     The constructor allocates field "fill_extent_ctx" of "C_ExtentCmpRead" 
but there is no destructor.
4697           fill_extent_ctx(new FillInVerifyExtent(&read_length,
&osd_op.rval,
4698                                                 &read_bl, maybe_crc, size,
4699                                                 osd, soid, flags)) {
4700       }
4701     
4702       void finish(int r) override {

** CID 1415741:    (UNCAUGHT_EXCEPT)
/home/brad/working/src/ceph/src/test/test_cors.cc: 882 in main()
/home/brad/working/src/ceph/src/test/test_cors.cc: 882 in main()

#4 Updated by Yuri Weinstein 23 days ago

Jason Dillaman wrote:

PR: https://github.com/ceph/ceph/pull/16617

merged

#5 Updated by Jason Dillaman 23 days ago

  • Status changed from Need Review to Resolved

Also available in: Atom PDF