Project

General

Profile

Actions

Bug #8741

open

osd: ec plugin leak

Added by Sage Weil almost 10 years ago. Updated over 4 years ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
% Done:

30%

Source:
Development
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

<error>
  <unique>0xd</unique>
  <tid>1</tid>
  <kind>Leak_DefinitelyLost</kind>
  <xwhat>
    <text>680 (48 direct, 632 indirect) bytes in 1 blocks are definitely lost in loss record 12 of 15</text>
    <leakedbytes>680</leakedbytes>
    <leakedblocks>1</leakedblocks>
  </xwhat>
  <stack>
    <frame>
      <ip>0x4C2B6CD</ip>
      <obj>/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so</obj>
      <fn>malloc</fn>
    </frame>
    <frame>
      <ip>0x2E26A179</ip>
    </frame>
    <frame>
      <ip>0x2E28AC22</ip>
    </frame>
    <frame>
      <ip>0x186643E</ip>
      <obj>/usr/bin/ceph-osd</obj>
      <fn>ceph::ErasureCodePluginRegistry::load(std::string const&amp;, std::map&lt;std::string, std::string, std::less&lt;std::string&gt;, std::allocator&lt;std::pair&lt;std::string const, std::string&gt; &gt; &gt; const&amp;, ceph::ErasureCodePlugin**, std::ostream&amp;)</fn>
      <dir>/home/sage/src/ceph/src/erasure-code</dir>
      <file>ErasureCodePlugin.cc</file>
      <line>108</line>
    </frame>
    <frame>
      <ip>0x186617F</ip>
      <obj>/usr/bin/ceph-osd</obj>
      <fn>ceph::ErasureCodePluginRegistry::factory(std::string const&amp;, std::map&lt;std::string, std::string, std::less&lt;std::string&gt;, std::allocator&lt;std::pair&lt;std::string const, std::string&gt; &gt; &gt; const&amp;, std::tr1::shared_ptr&lt;ceph::ErasureCodeInterface&gt;*, std::ostream&amp;)</fn>
      <dir>/home/sage/src/ceph/src/erasure-code</dir>
      <file>ErasureCodePlugin.cc</file>
      <line>79</line>
    </frame>
    <frame>
      <ip>0x2DFFD275</ip>
      <obj>/usr/lib/ceph/erasure-code/libec_jerasure.so.2.0.0</obj>
      <fn>ErasureCodePluginSelectJerasure::factory(std::map&lt;std::string, std::string, std::less&lt;std::string&gt;, std::allocator&lt;std::pair&lt;std::string const, std::string&gt; &gt; &gt; const&amp;, std::tr1::shared_ptr&lt;ceph::ErasureCodeInterface&gt;*)</fn>
      <dir>/srv/autobuild-ceph/gitbuilder.git/build/out~/ceph-0.82-371-g09203f9/src/erasure-code/jerasure</dir>
      <file>ErasureCodePluginSelectJerasure.cc</file>
      <line>49</line>
    </frame>
    <frame>
      <ip>0x18661D6</ip>
      <obj>/usr/bin/ceph-osd</obj>
      <fn>ceph::ErasureCodePluginRegistry::factory(std::string const&amp;, std::map&lt;std::string, std::string, std::less&lt;std::string&gt;, std::allocator&lt;std::pair&lt;std::string const, std::string&gt; &gt; &gt; const&amp;, std::tr1::shared_ptr&lt;ceph::ErasureCodeInterface&gt;*, std::ostream&amp;)</fn>
      <dir>/home/sage/src/ceph/src/erasure-code</dir>
      <file>ErasureCodePlugin.cc</file>
      <line>86</line>
    </frame>
    <frame>
      <ip>0x16E5D8F</ip>
      <obj>/usr/bin/ceph-osd</obj>
      <fn>PGBackend::build_pg_backend(pg_pool_t const&amp;, std::tr1::shared_ptr&lt;OSDMap const&gt;, PGBackend::Listener*, coll_t, coll_t, ObjectStore*, CephContext*)</fn>
      <dir>/home/sage/src/ceph/src/osd</dir>
      <file>PGBackend.cc</file>
      <line>290</line>
    </frame>

Actions #1

Updated by Loïc Dachary almost 10 years ago

The object is allocated once per process the first time the jerasure plugin is loaded . This is the last trace in the traceback, probably because valgrind gets confused by the fact that the plugin is dlopened. It calls the galois_init_default_field .

When the plugin is dlclosed the destructor of the jerasure plugin is called but it is not defined.

To get rid of this problem a function should be added to jerasure, galois_uninit_default_field symetric to galois_init_default_field and be called from the jerasure plugin destructor.

Actions #2

Updated by Loïc Dachary almost 10 years ago

  • Status changed from New to 12
  • Priority changed from Urgent to Normal
Actions #3

Updated by Sage Weil almost 10 years ago

  • Priority changed from Normal to High
Actions #4

Updated by Sage Weil over 9 years ago

  • Priority changed from High to Normal
Actions #5

Updated by Loïc Dachary over 9 years ago

  • Status changed from 12 to In Progress
  • Assignee set to Loïc Dachary
  • % Done changed from 0 to 30
Actions #6

Updated by Loïc Dachary over 9 years ago

  • Status changed from In Progress to 12
Actions #7

Updated by Loïc Dachary over 9 years ago

  • Priority changed from Normal to Low
Actions #8

Updated by Loïc Dachary over 8 years ago

  • Assignee deleted (Loïc Dachary)
Actions #9

Updated by Patrick Donnelly over 4 years ago

  • Status changed from 12 to New
Actions

Also available in: Atom PDF