Recently added prefix_limit_trigger_ trigger is set as part of the BgpPeer::BgpPeer() constructor. Hence it necessary to make sure that in BgpPeer::~BgpPeer() in any of the mock peer code, we wait until the task is run and not set any more.
#0 0x00002b95be6b2c37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00002b95be6b6028 in __GI_abort () at abort.c:89
#2 0x00002b95be6abbf6 in __assert_fail_base (fmt=0x2b95be7fc3b8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x201cf7c "!trigger_", file=file@entry=0x201cf58 "controller/src/base/task_trigger.cc", line=line@entry=42, function=function@entry=0x201cff0 <TaskTrigger::~TaskTrigger()::__PRETTY_FUNCTION__> "TaskTrigger::~TaskTrigger()") at assert.c:92
#3 0x00002b95be6abca2 in __GI___assert_fail (assertion=0x201cf7c "!trigger_", file=0x201cf58 "controller/src/base/task_trigger.cc", line=42, function=0x201cff0 <TaskTrigger::~TaskTrigger()::__PRETTY_FUNCTION__> "TaskTrigger::~TaskTrigger()") at assert.c:101
#4 0x0000000001315b94 in TaskTrigger::~TaskTrigger (this=0x391dcd8, __in_chrg=<optimized out>) at controller/src/base/task_trigger.cc:42
#5 0x0000000001402f78 in BgpPeer::~BgpPeer (this=0x391dc00, __in_chrg=<optimized out>) at controller/src/bgp/bgp_peer.cc:584
#6 0x0000000001367719 in BgpPeerMock::~BgpPeerMock (this=0x391dc00, __in_chrg=<optimized out>) at controller/src/bgp/test/bgp_peer_test.cc:45
#7 0x0000000001367748 in BgpPeerMock::~BgpPeerMock (this=0x391dc00, __in_chrg=<optimized out>) at controller/src/bgp/test/bgp_peer_test.cc:45
#8 0x0000000001367780 in boost::checked_delete<BgpPeerMock> (x=0x391dc00) at /usr/include/boost/checked_delete.hpp:34
#9 0x0000000001366741 in boost::scoped_ptr<BgpPeerMock>::~scoped_ptr (this=0x7ffcd4966310, __in_chrg=<optimized out>) at /usr/include/boost/smart_ptr/scoped_ptr.hpp:82
#10 0x0000000001366825 in boost::scoped_ptr<BgpPeerMock>::reset (this=0x39370f0, p=0x3926b70) at /usr/include/boost/smart_ptr/scoped_ptr.hpp:88
#11 0x0000000001365554 in BgpPeerTest::Reset (this=0x3936c00, config=0x7ffcd49666c0) at controller/src/bgp/test/bgp_peer_test.cc:119
#12 0x000000000134d882 in BgpPeerTest_BufferCapacity7_Test::TestBody (this=0x3936c00) at controller/src/bgp/test/bgp_peer_test.cc:278
#13 0x0000000001e3b516 in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void> (object=0x3936c00, method=&virtual testing::Test::TestBody(), location=0x2173453 "the test body") at /usr/src/gmock/gtest/src/gtest.cc:2078
#14 0x0000000001e36dc8 in testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void> (object=0x3936c00, method=&virtual testing::Test::TestBody(), location=0x2173453 "the test body") at /usr/src/gmock/gtest/src/gtest.cc:2114
#15 0x0000000001e1f05b in testing::Test::Run (this=0x3936c00) at /usr/src/gmock/gtest/src/gtest.cc:2151
#16 0x0000000001e1f836 in testing::TestInfo::Run (this=0x3833770) at /usr/src/gmock/gtest/src/gtest.cc:2326
#17 0x0000000001e1fec6 in testing::TestCase::Run (this=0x3832de0) at /usr/src/gmock/gtest/src/gtest.cc:2444
#18 0x0000000001e26510 in testing::internal::UnitTestImpl::RunAllTests (this=0x3832a80) at /usr/src/gmock/gtest/src/gtest.cc:4261
#19 0x0000000001e3c4ca in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (object=0x3832a80, method=(bool (testing::internal::UnitTestImpl::*)(testing::internal::UnitTestImpl * const)) 0x1e26292 <testing::internal::UnitTestImpl::RunAllTests()>, location=0x2173d10 "auxiliary test code (environments or event listeners)") at /usr/src/gmock/gtest/src/gtest.cc:2078
#20 0x0000000001e37a74 in testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (object=0x3832a80, method=(bool (testing::internal::UnitTestImpl::*)(testing::internal::UnitTestImpl * const)) 0x1e26292 <testing::internal::UnitTestImpl::RunAllTests()>, location=0x2173d10 "auxiliary test code (environments or event listeners)") at /usr/src/gmock/gtest/src/gtest.cc:2114
#21 0x0000000001e251cf in testing::UnitTest::Run (this=0x28c93c0 <testing::UnitTest::GetInstance()::instance>) at /usr/src/gmock/gtest/src/gtest.cc:3875
#22 0x000000000136445c in RUN_ALL_TESTS () at build/include/gtest/gtest.h:2288
#23 0x000000000136364e in main (argc=1, argv=0x7ffcd4966c68) at controller/src/bgp/test/bgp_peer_test.cc:600
(gdb)
Review in progress for https:/ /review. opencontrail. org/34039
Submitter: Ananth Suryanarayana (<email address hidden>)