Build 2711 : Vrouter crashed when mirroring configured through heat

Bug #1543534 reported by Ankit Jain
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.20
Fix Committed
High
Anand H. Krishnan
R2.21.x
Fix Committed
High
Anand H. Krishnan
R2.22.x
Fix Committed
High
Anand H. Krishnan
Trunk
Fix Committed
High
Anand H. Krishnan

Bug Description

root@nodeh3:/var/crash# ls
201602090158 201602090204 201602091335 201602091347 201602091525 kexec_cmd linux-image-3.13.0-40-generic-201602090158.crash
root@nodeh3:/var/crash# ls -ltrh
total 64K
-rw-r----- 1 root root 40K Feb 9 02:01 linux-image-3.13.0-40-generic-201602090158.crash
drwxr-xr-x 2 root root 4.0K Feb 9 02:05 201602090204
drwxr-xr-x 2 root root 4.0K Feb 9 13:36 201602091335
drwxr-xr-x 2 root root 4.0K Feb 9 13:48 201602091347
drwxr-xr-x 2 root root 4.0K Feb 9 15:25 201602091525
-rw-r--r-- 1 root root 242 Feb 9 15:30 kexec_cmd
drwxr-xr-x 2 root root 4.0K Feb 9 15:34 201602090158
root@nodeh3:/var/crash# cd cd 201602090158
-bash: cd: cd: No such file or directory
root@nodeh3:/var/crash# cd 201602090158
root@nodeh3:/var/crash/201602090158# ls
dmesg.201602090158 dump.201602090158
root@nodeh3:/var/crash/201602090158#

Copied the logs at

cores copied @ /cs-shared/bugs/<bug-id> on any blr shell server (ex nodeb6)

Tags: vrouter
Revision history for this message
Ankit Jain (ankitja) wrote :
Changed in juniperopenstack:
assignee: Hari Prasad Killi (haripk) → Anand H. Krishnan (anandhk)
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/17120
Submitter: Anand H. Krishnan (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/17169
Submitter: Anand H. Krishnan (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/17170
Submitter: Anand H. Krishnan (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/17171
Submitter: Anand H. Krishnan (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/17169
Committed: http://github.org/Juniper/contrail-vrouter/commit/124c4fb79bbd4e8b7c6ef3e2086b70eddc8357fe
Submitter: Zuul
Branch: R2.21.x

commit 124c4fb79bbd4e8b7c6ef3e2086b70eddc8357fe
Author: Anand H. Krishnan <email address hidden>
Date: Fri Feb 12 12:20:44 2016 +0530

Disallow a new sub-interface for an existing vlan
Do not do a 'preset' on mirror packets

When sub-interfaces with the same vlan id are added again with a
different vif index, we overwrite the existing entry in the vlan
table with the new vif. On deletion of the old vif, we check whether
the pointer in the vlan table match or not. If it does not match,
we do not remove the napi setup, but go ahead and free the napi
structure. This could potentially result in memory corruption.

To avoid such scenarios, return an error if a vif already exists
for a particular vlan

When a packet comes from vhost, we typically accept the layer 2
header that is supplied by the host and hence a 'preset' is done
to reset the packet to what it was before it entered vRouter.
Unfortunately, this was also done for packets those mirrored such
packets, leading to offset issues since we do end up adding a lot
more headers than what the original packets contain. This leads to
wrong length calculation and hence searching for more skbs than
that is originally present and a crash.

Change-Id: I358c93d0d2f6c9f8bfaea1e04885b390d089baf9
Closes-BUG: #1543534, #1544832

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

Reviewed: https://review.opencontrail.org/17170
Committed: http://github.org/Juniper/contrail-vrouter/commit/d697e011842f8bb544a9c7ab3b15bdfa6fbad34c
Submitter: Zuul
Branch: R2.22.x

commit d697e011842f8bb544a9c7ab3b15bdfa6fbad34c
Author: Anand H. Krishnan <email address hidden>
Date: Fri Feb 12 12:24:59 2016 +0530

Disallow a new sub-interface for an existing vlan
Do not do a 'preset' on mirror packets

When sub-interfaces with the same vlan id are added again with a
different vif index, we overwrite the existing entry in the vlan
table with the new vif. On deletion of the old vif, we check whether
the pointer in the vlan table match or not. If it does not match,
we do not remove the napi setup, but go ahead and free the napi
structure. This could potentially result in memory corruption.

To avoid such scenarios, return an error if a vif already exists
for a particular vlan

When a packet comes from vhost, we typically accept the layer 2
header that is supplied by the host and hence a 'preset' is done
to reset the packet to what it was before it entered vRouter.
Unfortunately, this was also done for packets those mirrored such
packets, leading to offset issues since we do end up adding a lot
more headers than what the original packets contain. This leads to
wrong length calculation and hence searching for more skbs than
that is originally present and a crash.

Change-Id: Ifbff5d2f5aaded7f626f82aea963973bd04f6251
Closes-BUG: #1543534, #1544832

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

Reviewed: https://review.opencontrail.org/17171
Committed: http://github.org/Juniper/contrail-vrouter/commit/1795a26f78d6dd046ed50b36a7f80867ec8445e8
Submitter: Zuul
Branch: R2.20

commit 1795a26f78d6dd046ed50b36a7f80867ec8445e8
Author: Anand H. Krishnan <email address hidden>
Date: Fri Feb 12 12:27:59 2016 +0530

Disallow a new sub-interface for an existing vlan
Do not do a 'preset' on mirror packets

When sub-interfaces with the same vlan id are added again with a
different vif index, we overwrite the existing entry in the vlan
table with the new vif. On deletion of the old vif, we check whether
the pointer in the vlan table match or not. If it does not match,
we do not remove the napi setup, but go ahead and free the napi
structure. This could potentially result in memory corruption.

To avoid such scenarios, return an error if a vif already exists
for a particular vlan

When a packet comes from vhost, we typically accept the layer 2
header that is supplied by the host and hence a 'preset' is done
to reset the packet to what it was before it entered vRouter.
Unfortunately, this was also done for packets those mirrored such
packets, leading to offset issues since we do end up adding a lot
more headers than what the original packets contain. This leads to
wrong length calculation and hence searching for more skbs than
that is originally present and a crash.

Change-Id: I34ab1173a2cb7904323d37cce238df2600a5eb7a
Closes-BUG: #1543534, #1544832

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

Reviewed: https://review.opencontrail.org/17120
Committed: http://github.org/Juniper/contrail-vrouter/commit/0c8185aea2ede0bac881d96bb0818389966d1c26
Submitter: Zuul
Branch: master

commit 0c8185aea2ede0bac881d96bb0818389966d1c26
Author: Anand H. Krishnan <email address hidden>
Date: Thu Feb 11 08:54:19 2016 +0530

Do not do a 'preset' on mirror packets

When a packet comes from vhost, we typically accept the layer 2
header that is supplied by the host and hence a 'preset' is done
to reset the packet to what it was before it entered vRouter.
Unfortunately, this was also done for packets those mirrored such
packets, leading to offset issues since we do end up adding a lot
more headers than what the original packets contain. This leads to
wrong length calculation and hence searching for more skbs than
that is originally present and a crash.

Change-Id: I906e7e3417c84ad567cf4b822187929b2a609b68
Closes-BUG: #1543534

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

Other bug subscribers

Bug attachments

Remote bug watches

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