Project

General

Profile

Actions

Bug #18356

closed

MonClient member variables can leak if init called more than once

Added by Brad Hubbard over 7 years ago. Updated over 7 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
Category:
MonClient
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

ceph_test_rados_api_misc calls rados_connect twice which in turn calls MonClient::init() twice and exposes the following valgrind errors.

48 (24 direct, 24 indirect) bytes in 1 blocks are definitely lost in loss record 57 of 166                                                                                                                                                   
   at 0x98741FC: operator new(unsigned long) (vg_replace_malloc.c:334)
   by 0x43AEBA: MonClient::init() (MonClient.cc:369)
   by 0x3488D6: librados::RadosClient::connect() (RadosClient.cc:280)
   by 0x2FD6BE: rados_connect (librados.cc:2767)
   by 0x2E9189: LibRadosMiscConnectFailure_ConnectFailure_Test::TestBody() (misc.cc:69)
   by 0x38B163: HandleSehExceptionsInMethodIfSupported<testing::Test, void> (gtest.cc:2402)
   by 0x38B163: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (gtest.cc:2438)
   by 0x381E49: testing::Test::Run() (gtest.cc:2475)
   by 0x381F97: testing::TestInfo::Run() (gtest.cc:2656)
   by 0x382074: testing::TestCase::Run() (gtest.cc:2774)
   by 0x382356: testing::internal::UnitTestImpl::RunAllTests() (gtest.cc:4649)
   by 0x38B613: HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (gtest.cc:2402)
   by 0x38B613: bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (gtest.cc:2438)
   by 0x382673: testing::UnitTest::Run() (gtest.cc:4257)
   by 0x2D4228: RUN_ALL_TESTS (gtest.h:2233)
   by 0x2D4228: main (unit.cc:51)

18,568 (200 direct, 18,368 indirect) bytes in 1 blocks are definitely lost in loss record 164 of 166                                                                                                                                         
   at 0x98741FC: operator new(unsigned long) (vg_replace_malloc.c:334)
   by 0x43B0CA: MonClient::init() (MonClient.cc:392)
   by 0x3488D6: librados::RadosClient::connect() (RadosClient.cc:280)
   by 0x2FD6BE: rados_connect (librados.cc:2767)
   by 0x2E9189: LibRadosMiscConnectFailure_ConnectFailure_Test::TestBody() (misc.cc:69)
   by 0x38B163: HandleSehExceptionsInMethodIfSupported<testing::Test, void> (gtest.cc:2402)
   by 0x38B163: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (gtest.cc:2438)
   by 0x381E49: testing::Test::Run() (gtest.cc:2475)
   by 0x381F97: testing::TestInfo::Run() (gtest.cc:2656)
   by 0x382074: testing::TestCase::Run() (gtest.cc:2774)
   by 0x382356: testing::internal::UnitTestImpl::RunAllTests() (gtest.cc:4649)
   by 0x38B613: HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (gtest.cc:2402)
   by 0x38B613: bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (gtest.cc:2438)
   by 0x382673: testing::UnitTest::Run() (gtest.cc:4257)
   by 0x2D4228: RUN_ALL_TESTS (gtest.h:2233)
   by 0x2D4228: main (unit.cc:51)

18,346 (56 direct, 18,290 indirect) bytes in 1 blocks are definitely lost in loss record 162 of 164                                                                                                                                          
   at 0x98741FC: operator new(unsigned long) (vg_replace_malloc.c:334)
   by 0x43B064: MonClient::init() (MonClient.cc:373)
   by 0x3488D6: librados::RadosClient::connect() (RadosClient.cc:280)
   by 0x2FD6BE: rados_connect (librados.cc:2767)
   by 0x2E9189: LibRadosMiscConnectFailure_ConnectFailure_Test::TestBody() (misc.cc:69)
   by 0x38B163: HandleSehExceptionsInMethodIfSupported<testing::Test, void> (gtest.cc:2402)
   by 0x38B163: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (gtest.cc:2438)
   by 0x381E49: testing::Test::Run() (gtest.cc:2475)
   by 0x381F97: testing::TestInfo::Run() (gtest.cc:2656)
   by 0x382074: testing::TestCase::Run() (gtest.cc:2774)
   by 0x382356: testing::internal::UnitTestImpl::RunAllTests() (gtest.cc:4649)
   by 0x38B613: HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (gtest.cc:2402)
   by 0x38B613: bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (gtest.cc:2438)
   by 0x382673: testing::UnitTest::Run() (gtest.cc:4257)
   by 0x2D4228: RUN_ALL_TESTS (gtest.h:2233)
   by 0x2D4228: main (unit.cc:51)
Actions #1

Updated by Brad Hubbard over 7 years ago

  • Subject changed from MonClient meber variables can leak if init called more than once to MonClient member variables can leak if init called more than once
Actions #3

Updated by Brad Hubbard over 7 years ago

  • Status changed from In Progress to Duplicate

Dup of 14115

Actions

Also available in: Atom PDF