Agent crash in VrfEntry::GetUcRoute()

Bug #1473647 reported by Praveen
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.20
Fix Committed
High
Praveen
Trunk
Fix Committed
High
Praveen

Bug Description

#1 0x00000000014d6f36 in VrfEntry::GetUcRoute (this=0x0, rt_key=...)
    at controller/src/vnsw/agent/oper/vrf.cc:208
208
        table = GetInet4UnicastRouteTable();
(gdb) up
#2 0x000000000166b248 in FlowTable::GetUcRoute (this=0x7f072c03a850,
    entry=0x0, addr=...) at controller/src/vnsw/agent/pkt/flow_table.cc:3225
3225
        rt = entry->GetUcRoute(inet4_route_key_);
(gdb) up
#3 0x0000000001699bc6 in PktFlowInfo::UpdateRoute (this=0x7f07326417d0,
    rt=0x7f07326417a8, vrf=0x0, ip=..., mac=...,
    ref_map=std::map with 0 elements)
    at controller/src/vnsw/agent/pkt/pkt_flow_info.cc:69
69
        *rt = flow_table->GetUcRoute(vrf, ip);
(gdb) up
#4 0x000000000169d132 in PktFlowInfo::EgressProcess (this=0x7f07326417d0, pkt=
    0x4051d10, in=0x7f0732641750, out=0x7f0732641790)
    at controller/src/vnsw/agent/pkt/pkt_flow_info.cc:1124
1124
                flow_dest_plen_map);
(gdb) p out->vrf_
$1 = (const VrfEntry *) 0x0
(gdb) p *out
$7 = {_vptr.PktControlInfo = 0x1d7b570 <vtable for PktControlInfo+16>,
  vrf_ = 0x0, intf_ = 0x0, rt_ = 0x0, vn_ = 0x0, vm_ = 0x0, vlan_nh_ = false,
  vlan_tag_ = 0, nh_ = 8}

(gdb) p nh->type_
$10 = NextHop::INTERFACE
(gdb) p nh->id_
$11 = 8

casting this to InterfaceNH
(gdb) p (InterfaceNH *) nh
$12 = (InterfaceNH *) 0x7f072c064850
(gdb) p $12->vrf_.px
$17 = (VrfEntry *) 0x7f072c05f070
(gdb) p $17->name_
$18 = "default-domain:default-project:Public:Public”

Somehow out->intf_ is not set although the nexthop interface is:
(gdb) p $12->interface_
$29 = {px = 0x7f072c0645a0}
(gdb) p $12->interface_.px
$30 = (Interface *) 0x7f072c0645a0
(gdb) p $30->name_
$31 = "vgw"

Tags: vrouter
Revision history for this message
Praveen (praveen-karadakal) wrote :

Agent crashing when message is trapped for setup of egress flow with vgw interface as out-interface.

Agent ensures that egress flows are not trapped by configuration (uses policy disabled NH in MPLS Label and also the interface has policy disabled).

However, there are corner cases where packets can be trapped for egress flow setup,
1. Source-IP is in ECMP
2. Agent has setup forward flow, but before reverse flow is setup the reverse packet hits vrouter

Must fix agent to handle egress flows going out on vgw interface.

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

Review in progress for https://review.opencontrail.org/12339
Submitter: Praveen K V (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/12339
Committed: http://github.org/Juniper/contrail-controller/commit/af7e38e0b6b21b3265b8d2ed0bd8a365f66909c9
Submitter: Zuul
Branch: R2.20

commit af7e38e0b6b21b3265b8d2ed0bd8a365f66909c9
Author: Praveen K V <email address hidden>
Date: Sat Jul 11 17:00:03 2015 +0530

Handle SIMPLE_GATEWAY interface in NHDecode()

NHDecode used in Egress flow processing does not handle SIMPLE_GATEWAY
interfaces as of now. As a result, the out->vrf_ field is NULL even
after NHDecode() resulting in crash.

Modify NHDecode to handle SIMPLE_GATEWAY interface.

Change-Id: I2faf73c62fe671f86af17f54dc57ce4e9596c22f
Closes-Bug: #1473647

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

Review in progress for https://review.opencontrail.org/12702
Submitter: Praveen K V (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/12702
Committed: http://github.org/Juniper/contrail-controller/commit/15d8f735006cb9af94d54d5c4d163c8a31dbfe69
Submitter: Zuul
Branch: master

commit 15d8f735006cb9af94d54d5c4d163c8a31dbfe69
Author: Praveen K V <email address hidden>
Date: Sat Jul 11 17:00:03 2015 +0530

Handle SIMPLE_GATEWAY interface in NHDecode()

NHDecode used in Egress flow processing does not handle SIMPLE_GATEWAY
interfaces as of now. As a result, the out->vrf_ field is NULL even
after NHDecode() resulting in crash.

Modify NHDecode to handle SIMPLE_GATEWAY interface.

Change-Id: I2faf73c62fe671f86af17f54dc57ce4e9596c22f
Closes-Bug: #1473647

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

Review in progress for https://review.opencontrail.org/12723
Submitter: Praveen K V (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/12723
Committed: http://github.org/Juniper/contrail-controller/commit/55dcd6a7b2049fef752d3243d66d4ed32683aef1
Submitter: Zuul
Branch: R2.22-dev

commit 55dcd6a7b2049fef752d3243d66d4ed32683aef1
Author: Praveen K V <email address hidden>
Date: Sat Jul 11 17:00:03 2015 +0530

Handle SIMPLE_GATEWAY interface in NHDecode()

NHDecode used in Egress flow processing does not handle SIMPLE_GATEWAY
interfaces as of now. As a result, the out->vrf_ field is NULL even
after NHDecode() resulting in crash.

Modify NHDecode to handle SIMPLE_GATEWAY interface.

Change-Id: I2faf73c62fe671f86af17f54dc57ce4e9596c22f
Closes-Bug: #1473647

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.