contrail-control crash in RoutePathReplicator::RouteListener

Bug #1578504 reported by vageesan
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.0
Fix Committed
Medium
Nischal Sheth
Trunk
Fix Committed
Medium
Nischal Sheth

Bug Description

contrail-control crashed with following backtrace.

core is in 10.84.5.112:/cs-shared/bugs/<bug-id>/

3.0.2.0-34~juno

(gdb) bt
#0 0x00007faf12de2cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007faf12de60d8 in __GI_abort () at abort.c:89
#2 0x00007faf12ddbb86 in __assert_fail_base (
    fmt=0x7faf12f2c830 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
    assertion=assertion@entry=0xc916fb "result.second",
    file=file@entry=0xcacbf0 "controller/src/bgp/routing-instance/routepath_replicator.cc",
    line=line@entry=637,
    function=function@entry=0xcacd60 <RoutePathReplicator::RouteListener(TableState*, DBTablePartBase*, DBEntryBase*)::__PRETTY_FUNCTION__> "bool RoutePathReplicator::RouteListener(TableState*, DBTablePartBase*, DBEntryBase*)") at assert.c:92
#3 0x00007faf12ddbc32 in __GI___assert_fail (assertion=0xc916fb "result.second",
    file=0xcacbf0 "controller/src/bgp/routing-instance/routepath_replicator.cc", line=637,
    function=0xcacd60 <RoutePathReplicator::RouteListener(TableState*, DBTablePartBase*, DBEntryBase*)::__PRETTY_FUNCTION__> "bool RoutePathReplicator::RouteListener(TableState*, DBTablePartBase*, DBEntryBase*)") at assert.c:101
#4 0x00000000005efd98 in RoutePathReplicator::RouteListener (this=0x1551280, ts=0x7faed412fdf0,
    root=<optimized out>, entry=0x7faed8317750)
    at controller/src/bgp/routing-instance/routepath_replicator.cc:637
#5 0x0000000000c19a9a in operator() (a1=0x7faed8317750, a0=0x7fae9401d3c0, this=0x7faf0b659aa0)
    at /usr/include/boost/function/function_template.hpp:767
#6 RunNotify (entry=0x7faed8317750, tpart=0x7fae9401d3c0, this=0x7fae9401e860)
    at controller/src/db/db_table.cc:114
#7 DBTableBase::RunNotify (this=<optimized out>, tpart=tpart@entry=0x7fae9401d3c0,
    entry=entry@entry=0x7faed8317750) at controller/src/db/db_table.cc:204
#8 0x0000000000c1c0c8 in DBTablePartBase::RunNotify (this=this@entry=0x7fae9401d3c0)
---Type <return> to continue, or q <return> to quit---
    at controller/src/db/db_table_partition.cc:47
#9 0x0000000000c18290 in DBPartition::QueueRunner::Run (this=0x7faef4305460)
    at controller/src/db/db_partition.cc:209
#10 0x000000000068901f in TaskImpl::execute (this=0x7faf159ae440) at controller/src/base/task.cc:261
#11 0x00007faf13bb9b3a in ?? () from /usr/lib/libtbb.so.2
#12 0x00007faf13bb5816 in ?? () from /usr/lib/libtbb.so.2
#13 0x00007faf13bb4f4b in ?? () from /usr/lib/libtbb.so.2
#14 0x00007faf13bb10ff in ?? () from /usr/lib/libtbb.so.2
#15 0x00007faf13bb12f9 in ?? () from /usr/lib/libtbb.so.2
#16 0x00007faf13dd5182 in start_thread (arg=0x7faf0b65a700) at pthread_create.c:312
#17 0x00007faf12ea647d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
(gdb)

Changed in juniperopenstack:
assignee: Hari Prasad Killi (haripk) → Prakash Bailkeri (prakashmb)
Revision history for this message
vageesan (vageesant) wrote :

core is in 10.84.5.112:/auto/cores/1578504

Revision history for this message
Prakash Bailkeri (prakashmb) wrote :
Download full text (24.1 KiB)

core file analysis:

# Path resolver sets the peer to NULL for Resolved path.
# Currently there multiple resolved path with NULL peer and same path id. This causes the replicator to assert.
# Solution is to set the peer for resolved path. The logic already present in master. Need to back port.

(gdb) p *(InetRoute *) entry
$123 = (InetRoute) {
  <BgpRoute> = {
    <Route> = {
      <DBEntry> = {
        <DBEntryBase> = {
          _vptr.DBEntryBase = 0xc83f50 <vtable for InetRoute+16>,
          chg_list_ = {
            <boost::intrusive::detail::generic_hook<boost::intrusive::get_list_node_algo<void*>, boost::intrusive::member_tag, (boost::intrusive::link_mode_type)1, 0>> = {
              <boost::intrusive::detail::no_default_definer> = {<No data fields>},
              <boost::intrusive::list_node<void*>> = {
                next_ = 0x0,
                prev_ = 0x0
              }, <No data fields>}, <No data fields>},
          tpart_ = 0x7fc1d007c780,
          state_ = std::map with 3 elements = {
            [0] = 0x7fc1c81cdaa0,
            [2] = 0x7fc254500930,
            [3] = 0x7fc224241690
          },
          flags = 1 '\001',
          onremoveq_ = (tbb::atomic) false,
          last_change_at_ = 1462427156821374
        },
        members of DBEntry:
        node_ = {
          <boost::intrusive::detail::generic_hook<boost::intrusive::get_set_node_algo<void*, false>, boost::intrusive::member_tag, (boost::intrusive::link_mode_type)1, 0>> = {
            <boost::intrusive::detail::no_default_definer> = {<No data fields>},
            <boost::intrusive::rbtree_node<void*>> = {
              parent_ = 0x7fc2602de5a0,
              left_ = 0x0,
              right_ = 0x0,
              color_ = boost::intrusive::rbtree_node<void*>::red_t
            }, <No data fields>}, <No data fields>}
      },
      members of Route:
      path_ = {
        <boost::intrusive::list_impl<boost::intrusive::listopt<boost::intrusive::detail::member_hook_traits<Path, boost::intrusive::list_member_hook<boost::intrusive::none, boost::intrusive::none, boost::intrusive::none>, &Path::node_>, unsigned long, true> >> = {
          <boost::intrusive::detail::clear_on_destructor_base<boost::intrusive::list_impl<boost::intrusive::listopt<boost::intrusive::detail::member_hook_traits<Path, boost::intrusive::list_member_hook<boost::intrusive::none, boost::intrusive::none, boost::intrusive::none>, &Path::node_>, unsigned long, true> > >> = {<No data fields>},
          members of boost::intrusive::list_impl<boost::intrusive::listopt<boost::intrusive::detail::member_hook_traits<Path, boost::intrusive::list_member_hook<boost::intrusive::none, boost::intrusive::none, boost::intrusive::none>, &Path::node_>, unsigned long, true> >:
          static external_value_traits = false,
          static constant_time_size = true,
          static stateful_value_traits = <optimized out>,
          data_ = {
            <boost::intrusive::detail::member_hook_traits<Path, boost::intrusive::list_member_hook<boost::intrusive::none, boost::intrusive::none, boost::intrusive::none>, &Path::node_>> = {
              static link_mode = <optimized out>
            },
            me...

Nischal Sheth (nsheth)
information type: Proprietary → Public
Revision history for this message
Prakash Bailkeri (prakashmb) wrote :
Revision history for this message
Nischal Sheth (nsheth) wrote :

Problem happens when the same path is received from multiple
bgpaas peers with the same nexthop.

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.0

Review in progress for https://review.opencontrail.org/20019
Submitter: Nischal Sheth (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/20022
Submitter: Nischal Sheth (<email address hidden>)

Nischal Sheth (nsheth)
tags: added: bgpaas
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/20022
Committed: http://github.org/Juniper/contrail-controller/commit/53dc731798aa2c7fe6630092cd010d0bb0fc0345
Submitter: Zuul
Branch: master

commit 53dc731798aa2c7fe6630092cd010d0bb0fc0345
Author: Nischal Sheth <email address hidden>
Date: Mon May 9 10:09:57 2016 -0700

Add PathResolver tests for multipath with same nexthop

Note that the fix implemented for R3.0 i.e. to copy IPeer from the
original path into the resolved path, is already present in master.

Change-Id: I9df4a50df31aa604fc46ec03b70689f1475decb2
Closes-Bug: 1578504

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/20019
Committed: http://github.org/Juniper/contrail-controller/commit/f7c76a0d8fbaabd7de81faf6902dd4103399d57a
Submitter: Zuul
Branch: R3.0

commit f7c76a0d8fbaabd7de81faf6902dd4103399d57a
Author: Nischal Sheth <email address hidden>
Date: Mon May 9 10:41:56 2016 -0700

Handle multipath for bgpaas when paths have same nexthop

Following changes are implemented:

- Tweak resolver to retain IPeer from original BgpPath
- Add PathResolver tests for multipath with same nexthop

Change-Id: I4c4afd0393cceef089a0ede9acb8ccda1901bad4
Closes-Bug: 1578504

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.