Project

General

Profile

Bug #3446

Objecter: leaks ObjectOperation::C_ObjectOperation_stat

Added by Josh Durgin over 11 years ago. Updated over 11 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Target version:
-
% Done:

0%

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

Description

I'm guessing this is just leaked from the error path. Found via valgrind in test_librbd_fsx:

All operations completed A-OK!
==6357== 
==6357== HEAP SUMMARY:
==6357==     in use at exit: 1,232 bytes in 11 blocks
==6357==   total heap usage: 47,249 allocs, 47,238 frees, 22,764,751 bytes allocated
==6357== 
==6357== 224 bytes in 2 blocks are definitely lost in loss record 1 of 2
==6357==    at 0x4C24DFA: operator new(unsigned long) (vg_replace_malloc.c:261)
==6357==    by 0x571BAF9: ObjectOperation::stat(unsigned long*, utime_t*, int*) (Objecter.h:206)
==6357==    by 0x5711120: librados::ObjectOperation::assert_exists() (librados.cc:115)
==6357==    by 0x4EADCEF: librbd::AbstractWrite::guard_write() (AioRequest.cc:144)
==6357==    by 0x4EE063B: librbd::AioZero::AioZero(librbd::ImageCtx*, std::string const&, unsigned long, unsigned long, unsigned long, std::vector<std::pair<unsigned long, unsigned long>, std::allocator<std::pair<unsigned long, unsigned long> > >&, unsigned long, SnapContext const&, unsigned long, Context*) (AioRequest.h:235)
==6357==    by 0x4EDDECB: librbd::aio_discard(librbd::ImageCtx*, unsigned long, unsigned long, librbd::AioCompletion*) (internal.cc:2541)
==6357==    by 0x4EDBBD2: librbd::discard(librbd::ImageCtx*, unsigned long, unsigned long) (internal.cc:2253)
==6357==    by 0x4EA7226: rbd_discard (librbd.cc:992)
==6357==    by 0x4048FD: do_punch_hole (fsx.c:764)
==6357==    by 0x4056D7: test (fsx.c:1044)
==6357==    by 0x40637E: main (fsx.c:1523)
==6357== 
==6357== 1,008 bytes in 9 blocks are definitely lost in loss record 2 of 2
==6357==    at 0x4C24DFA: operator new(unsigned long) (vg_replace_malloc.c:261)
==6357==    by 0x571BAF9: ObjectOperation::stat(unsigned long*, utime_t*, int*) (Objecter.h:206)
==6357==    by 0x5711120: librados::ObjectOperation::assert_exists() (librados.cc:115)
==6357==    by 0x4EADCEF: librbd::AbstractWrite::guard_write() (AioRequest.cc:144)
==6357==    by 0x4EE00C6: librbd::AioWrite::AioWrite(librbd::ImageCtx*, std::string const&, unsigned long, unsigned long, std::vector<std::pair<unsigned long, unsigned long>, std::allocator<std::pair<unsigned long, unsigned long> > >&, unsigned long, ceph::buffer::list const&, SnapContext const&, unsigned long, Context*) (AioRequest.h:160)
==6357==    by 0x4EDD3E7: librbd::aio_write(librbd::ImageCtx*, unsigned long, unsigned long, char const*, librbd::AioCompletion*) (internal.cc:2463)
==6357==    by 0x4EDB7D6: librbd::write(librbd::ImageCtx*, unsigned long, unsigned long, char const*) (internal.cc:2216)
==6357==    by 0x4EA71EC: rbd_write (librbd.cc:986)
==6357==    by 0x4044ED: dowrite (fsx.c:679)
==6357==    by 0x40557A: test (fsx.c:1023)
==6357==    by 0x40637E: main (fsx.c:1523)
==6357== 
==6357== LEAK SUMMARY:
==6357==    definitely lost: 1,232 bytes in 11 blocks
==6357==    indirectly lost: 0 bytes in 0 blocks
==6357==      possibly lost: 0 bytes in 0 blocks
==6357==    still reachable: 0 bytes in 0 blocks
==6357==         suppressed: 0 bytes in 0 blocks

Associated revisions

Revision 4a7a81bb (diff)
Added by Sage Weil over 11 years ago

objecter: fix leak of out_handlers

The error paths don't use the handlers. Make sure they get cleaned up.

Fixes: #3446
Signed-off-by: Sage Weil <>

History

#1 Updated by Sage Weil over 11 years ago

  • Status changed from 12 to Fix Under Review

#2 Updated by Sage Weil over 11 years ago

  • Status changed from Fix Under Review to Resolved

Also available in: Atom PDF