TOR Agent crash due to segmentation fault @ OVSDB::UnicastMacRemoteEntry::PreAddChange

Bug #1429779 reported by Prabhjot Singh Sethi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Fix Committed
High
Prabhjot Singh Sethi
R2.1
Fix Committed
High
Prabhjot Singh Sethi

Bug Description

#0 OVSDB::UnicastMacRemoteEntry::PreAddChange (this=0x7f69c8204e90) at controller/src/vnsw/agent/ovs_tor_agent/ovsdb_client/unicast_mac_remote_ovsdb.cc:68
#1 0x00000000008cabcd in OVSDB::OvsdbDBEntry::Add (this=0x7f69c8204e90) at controller/src/vnsw/agent/ovs_tor_agent/ovsdb_client/ovsdb_entry.cc:58
#2 0x00000000009aa1d5 in KSyncSM_Add (obj=0x7f69d0145d70, entry=0x7f69c8204e90) at controller/src/ksync/ksync_object.cc:566
#3 0x00000000009aa8f5 in NotifyEvent (event=KSyncEntry::RE_EVAL, entry=0x7f69c8204e90, this=0x7f69d0145d70) at controller/src/ksync/ksync_object.cc:1048
#4 KSyncObject::BackRefReEval (this=this@entry=0x7f69d0145d70, key=key@entry=0x7f69d0361150) at controller/src/ksync/ksync_object.cc:1183
#5 0x00000000009aac8b in KSyncObject::NotifyEvent (this=this@entry=0x7f69d0145d70, entry=entry@entry=0x7f69d0361150, event=event@entry=KSyncEntry::DEL_ACK) at controller/src/ksync/ksync_object.cc:1098
#6 0x00000000008cb360 in OVSDB::OvsdbDBEntry::Ack (this=0x7f69d0361150, success=<optimized out>) at controller/src/vnsw/agent/ovs_tor_agent/ovsdb_client/ovsdb_entry.cc:171
#7 0x00000000008c72df in OVSDB::OvsdbClientIdl::trigger_deletion (this=0x7f69d046ef00) at controller/src/vnsw/agent/ovs_tor_agent/ovsdb_client/ovsdb_client_idl.cc:327
#8 0x00000000008ca995 in OVSDB::OvsdbClientSession::OnClose (this=this@entry=0x7f69c0a70d60) at controller/src/vnsw/agent/ovs_tor_agent/ovsdb_client/ovsdb_client_session.cc:43
#9 0x000000000089ba08 in OVSDB::OvsdbClientTcpSession::ProcessSessionEvent (this=0x7f69c0a70d60, ovs_event=...) at controller/src/vnsw/agent/ovs_tor_agent/ovsdb_client/ovsdb_client_tcp.cc:170
#10 0x000000000089d310 in operator() (a1=..., p=<optimized out>, this=<optimized out>) at /usr/include/boost/bind/mem_fn_template.hpp:165
#11 operator()<bool, boost::_mfi::mf1<bool, OVSDB::OvsdbClientTcpSession, OVSDB::OvsdbClientTcpSession::OvsdbSessionEvent>, boost::_bi::list1<OVSDB::OvsdbClientTcpSession::OvsdbSessionEvent&> > (a=<synthetic pointer>, f=..., this=<optimized out>) at /usr/include/boost/bind/bind.hpp:303
#12 operator()<OVSDB::OvsdbClientTcpSession::OvsdbSessionEvent> (a1=<synthetic pointer>, this=<optimized out>) at /usr/include/boost/bind/bind_template.hpp:32
#13 boost::detail::function::function_obj_invoker1<boost::_bi::bind_t<bool, boost::_mfi::mf1<bool, OVSDB::OvsdbClientTcpSession, OVSDB::OvsdbClientTcpSession::OvsdbSessionEvent>, boost::_bi::list2<boost::_bi::value<OVSDB::OvsdbClientTcpSession*>, boost::arg<1> > >, bool, OVSDB::OvsdbClientTcpSession::OvsdbSessionEvent>::invoke (function_obj_ptr=..., a0=...) at /usr/include/boost/function/function_template.hpp:132
#14 0x000000000089fb1a in operator() (a0=..., this=0x7f69cfffea90) at /usr/include/boost/function/function_template.hpp:767
#15 RunQueue (this=0x1ec0da0) at controller/src/base/queue_task.h:53
#16 QueueTaskRunner<OVSDB::OvsdbClientTcpSession::OvsdbSessionEvent, WorkQueue<OVSDB::OvsdbClientTcpSession::OvsdbSessionEvent> >::Run (this=0x1ec0da0) at controller/src/base/queue_task.h:36
#17 0x0000000000cfb5d0 in TaskImpl::execute (this=0x7f69d4beb740) at controller/src/base/task.cc:232
#18 0x00007f69dc573b3a in ?? () from /usr/lib/libtbb.so.2
#19 0x00007f69dc56f816 in ?? () from /usr/lib/libtbb.so.2
#20 0x00007f69dc56ef4b in ?? () from /usr/lib/libtbb.so.2
#21 0x00007f69dc56b0ff in ?? () from /usr/lib/libtbb.so.2
#22 0x00007f69dc56b2f9 in ?? () from /usr/lib/libtbb.so.2
#23 0x00007f69dc78f182 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#24 0x00007f69db42ffbd in clone () from /lib/x86_64-linux-gnu/libc.so.6

in PreAddChange we try to fetch tunnel ip from physical switch, which however was not available.

Tags: bms vrouter
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : master

Review in progress for https://review.opencontrail.org/8221
Submitter: Prabhjot Singh Sethi (<email address hidden>)

Changed in juniperopenstack:
status: New → In Progress
Changed in juniperopenstack:
importance: Undecided → High
information type: Proprietary → Public
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

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

commit d80827902ea23839579dcc97d9cb66cddb25a3a3
Author: Prabhjot Singh Sethi <email address hidden>
Date: Wed Mar 11 00:27:06 2015 +0530

Fix for TOR Agent Crash on session cleanup

Issue:
------
while session is getting deleted, cleanup job for all
ovsdb entries is scheduled, during which we skip encode
of ovsdb transaction, however preadd processing was
still getting triggered, due which unicast remote mac
entry while trying to access a field from incomplete
logical switch entry ends up in segmentation fault.

Fix:
----
pre add/change method is supposed to be used only to
manage KSync references out of the context of ovsdb
transaction. while client idl is scheduled for delete
pre add/change method should not be called to update
KSync references, since it should go away eventually
when the entry is deleted as part of entry destructor
or post delete processing.

Closes-Bug: 1429779
Change-Id: I7c1b0a9e86ef1c0264ef815a89d60dcbdf985f18

Changed in juniperopenstack:
status: In Progress → Fix Committed
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : R2.1

Review in progress for https://review.opencontrail.org/8320
Submitter: Prabhjot Singh Sethi (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/8320
Committed: http://github.org/Juniper/contrail-controller/commit/02a5a84077f20fe99189e649d5898e664faf4856
Submitter: Zuul
Branch: R2.1

commit 02a5a84077f20fe99189e649d5898e664faf4856
Author: Prabhjot Singh Sethi <email address hidden>
Date: Wed Mar 11 00:27:06 2015 +0530

Fix for TOR Agent Crash on session cleanup

Issue:
------
while session is getting deleted, cleanup job for all
ovsdb entries is scheduled, during which we skip encode
of ovsdb transaction, however preadd processing was
still getting triggered, due which unicast remote mac
entry while trying to access a field from incomplete
logical switch entry ends up in segmentation fault.

Fix:
----
pre add/change method is supposed to be used only to
manage KSync references out of the context of ovsdb
transaction. while client idl is scheduled for delete
pre add/change method should not be called to update
KSync references, since it should go away eventually
when the entry is deleted as part of entry destructor
or post delete processing.

Closes-Bug: 1429779
(cherry picked from commit d80827902ea23839579dcc97d9cb66cddb25a3a3)

Conflicts:
 src/vnsw/agent/ovs_tor_agent/ovsdb_client/ovsdb_entry.cc

Change-Id: I9d4be8445230de9ece75f292e03f151c7e57d25d

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

Other bug subscribers

Remote bug watches

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