(gdb) p Agent::singleton_->agent_init_ $1 = (AgentInit *) 0x7fff6a01dd50 (gdb) set print object on (gdb) p Agent::singleton_->agent_init_ $2 = (TorAgentInit *) 0x7fff6a01dd50 (gdb) p $2->ovsdb_client_._M_ptr $3 = (OVSDB::OvsdbClientTcp *) 0x7febe8004760 (gdb) p $3->session_ $4 = (OVSDB::OvsdbClientTcpSession *) 0x7febe8016cb0 (gdb) p $4->client_id^CQuit (gdb) p $4->client_idl_.px $5 = (OVSDB::OvsdbClientIdl *) 0x7febe8036150 (gdb) p $5->unicast_mac_local_ovsdb_._M_ptr $6 = (OVSDB::UnicastMacLocalOvsdb *) 0x7febe8038920 (gdb) source ~/new_code/controller/src/db/db.gdb (gdb) source ~/new_code/controller/src/vnsw/agent/test/agent.gdb (gdb) source ~/new_code/controller/src/vnsw/agent/ovs_tor_agent/ovsdb_client/test/ovsdb.gdb (gdb) dump_uc_v4_route_entries ^CQuit (gdb) dump_ovsdb_uc_local_entries 0x7febe8016cb0 0x7febf00ddc90 state=2 mac=00:60:2f:aa:e5:e3 logical_switch= bd19e06c-1340-4de5-9c54-2897047f3a4b dest_ip= 10.204.216.196 (gdb) p *(KSyncEntry *)0x7febf00ddc90 $7 = (OVSDB::UnicastMacLocalEntry) {<OVSDB::OvsdbEntry> = {<KSyncEntry> = {_vptr.KSyncEntry = 0xdf6470, static kInvalidIndex = 4294967295, 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_ = 0x7febe8038958, left_ = 0x0, right_ = 0x0, color_ = boost::intrusive::rbtree_node<void*>::black_t}, <No data fields>}, <No data fields>}, index_ = 4294967295, state_ = KSyncEntry::ADD_DEFER, refcount_ = {<tbb::internal::atomic_impl_with_arithmetic<int, int, char>> = {<tbb::internal::atomic_impl<int>> = {rep = {value = 2}}, <No data fields>}, <No data fields>},
while adding unicast mac local entry it waits for resolution of Logical siwtch entry and ends up taking reference on a deleted entry. resulting in a dead lock due to which logical switch remains in DEL_REF_PENDING state and never removed
(gdb) p Agent:: singleton_ ->agent_ init_ singleton_ ->agent_ init_ client_ ._M_ptr :OvsdbClientTcp *) 0x7febe8004760 :OvsdbClientTcp Session *) 0x7febe8016cb0 :OvsdbClientIdl *) 0x7febe8036150 mac_local_ ovsdb_. _M_ptr :UnicastMacLoca lOvsdb *) 0x7febe8038920 controller/ src/db/ db.gdb controller/ src/vnsw/ agent/test/ agent.gdb controller/ src/vnsw/ agent/ovs_ tor_agent/ ovsdb_client/ test/ovsdb. gdb v4_route_ entries ^CQuit uc_local_ entries 0x7febe8016cb0 60:2f:aa: e5:e3 logical_switch= bd19e06c- 1340-4de5- 9c54-2897047f3a 4b dest_ip= 10.204.216.196 :UnicastMacLoca lEntry) {<OVSDB: :OvsdbEntry> = {<KSyncEntry> = {_vptr.KSyncEntry = 0xdf6470, static kInvalidIndex = 4294967295, :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_ = 0x7febe8038958, left_ = 0x0, right_ = 0x0, color_ = boost:: intrusive: :rbtree_ node<void* >::black_ t}, <No data fields>}, <No data fields>}, index_ = 4294967295, :ADD_DEFER, refcount_ = {<tbb:: internal: :atomic_ impl_with_ arithmetic< int, int, char>> = {<tbb:: internal: :atomic_ impl<int> > = {rep = {value = 2}}, <No data fields>}, <No data fields>},
$1 = (AgentInit *) 0x7fff6a01dd50
(gdb) set print object on
(gdb) p Agent::
$2 = (TorAgentInit *) 0x7fff6a01dd50
(gdb) p $2->ovsdb_
$3 = (OVSDB:
(gdb) p $3->session_
$4 = (OVSDB:
(gdb) p $4->client_id^CQuit
(gdb) p $4->client_idl_.px
$5 = (OVSDB:
(gdb) p $5->unicast_
$6 = (OVSDB:
(gdb) source ~/new_code/
(gdb) source ~/new_code/
(gdb) source ~/new_code/
(gdb) dump_uc_
(gdb) dump_ovsdb_
0x7febf00ddc90 state=2 mac=00:
(gdb) p *(KSyncEntry *)0x7febf00ddc90
$7 = (OVSDB:
node_ = {<boost:
state_ = KSyncEntry:
while adding unicast mac local entry it waits for resolution of Logical siwtch entry
and ends up taking reference on a deleted entry. resulting in a dead lock due to which
logical switch remains in DEL_REF_PENDING state and never removed