Comment 2 for bug 1425458

Revision history for this message
Prabhjot Singh Sethi (prabhjot) wrote :

(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