Comment 1 for bug 1398885

Revision history for this message
Ashish Ranjan (aranjan-n) wrote :

Assigning to Praveen.

Looking at the code sg_ can be NULL if SecurityGroupEntry::Activate() is not called.
So, deref at CopySgEntries() @flow_table.cc:565 needs to have null check.

uuid is also NULL. that may to be investigated. Per Ajay id_perms 'may' come in separate message.

-----

(gdb) bt
#0 0x00007fda573b5bb9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007fda573b8fc8 in __GI_abort () at abort.c:89
#2 0x00007fda573aea76 in __assert_fail_base (fmt=0x7fda57500370 "/LC_MESSAGES/%N:", assertion=assertion@entry=0xe728fa "px != 0",
    file=file@entry=0xe81b78 "/usr/include/boost/smart_ptr/intrusive_ptr.hpp", line=line@entry=162,
    function=function@entry=0xebc5c0 <boost::intrusive_ptr<SgEntry>::operator->() const::__PRETTY_FUNCTION__> "T* boost::intrusive_ptr<T>::operator->() const [with T = SgEntry]") at assert.c:92
#3 0x00007fda573aeb22 in __GI___assert_fail (assertion=0xe728fa "px != 0", file=0xe81b78 "/usr/include/boost/smart_ptr/intrusive_ptr.hpp",
    line=162,
    function=0xebc5c0 <boost::intrusive_ptr<SgEntry>::operator->() const::__PRETTY_FUNCTION__> "T* boost::intrusive_ptr<T>::operator->() const [with T = SgEntry]") at assert.c:101
#4 0x00000000009f518d in boost::intrusive_ptr<SgEntry>::operator-> (this=<optimized out>) at /usr/include/boost/smart_ptr/intrusive_ptr.hpp:162
#5 0x00000000009fc29a in operator-> (this=<optimized out>) at controller/src/vnsw/agent/pkt/flow_table.cc:582
#6 CopySgEntries (vm_port=vm_port@entry=0x7fda440cd910, list=..., ingress_acl=true) at controller/src/vnsw/agent/pkt/flow_table.cc:565
#7 0x00000000009fc2fc in FlowEntry::GetLocalFlowSgList (this=this@entry=0x7fda38013640, vm_port=0x7fda440cd910, reverse_vm_port=0x0)
    at controller/src/vnsw/agent/pkt/flow_table.cc:588
#8 0x00000000009fc43f in FlowEntry::GetSgList (this=this@entry=0x7fda38013640, intf=<optimized out>)
    at controller/src/vnsw/agent/pkt/flow_table.cc:680
#9 0x00000000009fc49a in FlowEntry::GetPolicyInfo (this=0x7fda38013640, vn=0x7fda48023460) at controller/src/vnsw/agent/pkt/flow_table.cc:889
#10 0x0000000000a02bb2 in FlowTable::ResyncVmPortFlows (this=0x7fda44018b90, intf=0x7fda440cd910)
    at controller/src/vnsw/agent/pkt/flow_table.cc:2171
#11 0x0000000000d86792 in operator() (a1=0x7fda440cd920, a0=0x7fda4400f4a0, this=0x7fda50001b10)
    at /usr/include/boost/function/function_template.hpp:767
#12 RunNotify (entry=0x7fda440cd920, tpart=0x7fda4400f4a0, this=0x7fda4400f420) at controller/src/db/db_table.cc:88
#13 DBTableBase::RunNotify (this=<optimized out>, tpart=tpart@entry=0x7fda4400f4a0, entry=entry@entry=0x7fda440cd920)
    at controller/src/db/db_table.cc:132
#14 0x0000000000d87c18 in DBTablePartBase::RunNotify (this=this@entry=0x7fda4400f4a0) at controller/src/db/db_table_partition.cc:45
#15 0x0000000000d85bf1 in DBPartition::QueueRunner::Run (this=0x7fda48072480) at controller/src/db/db_partition.cc:178
#16 0x0000000000e680c0 in TaskImpl::execute (this=0x7fda505dbb40) at controller/src/base/task.cc:224
#17 0x00007fda57f85b3a in tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::local_wait_for_all (this=0x7fda505d7e00,
    parent=..., child=<optimized out>) at ../../src/tbb/custom_scheduler.h:455
#18 0x00007fda57f81816 in tbb::internal::arena::process (this=0x7fda505e7800, s=...) at ../../src/tbb/arena.cpp:106
#19 0x00007fda57f80f4b in tbb::internal::market::process (this=0x7fda505fbf00, j=...) at ../../src/tbb/market.cpp:479
#20 0x00007fda57f7d0ff in tbb::internal::rml::private_worker::run (this=0x7fda505f3f80) at ../../src/tbb/private_server.cpp:283
#21 0x00007fda57f7d2f9 in tbb::internal::rml::private_worker::thread_routine (arg=<optimized out>) at ../../src/tbb/private_server.cpp:240
#22 0x00007fda581a1182 in start_thread (arg=0x7fda50002700) at pthread_create.c:312
#23 0x00007fda57479fbd in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#24 0x0000000000000000 in ?? ()

(gdb) f 6
#6 CopySgEntries (vm_port=vm_port@entry=0x7fda440cd910, list=..., ingress_acl=true) at controller/src/vnsw/agent/pkt/flow_table.cc:565
565 in controller/src/vnsw/agent/pkt/flow_table.cc
(gdb) p vm_port
$10 = (const VmInterface *) 0x7fda440cd910
(gdb) p $10->sg_list_.list_
$11 = {_M_t = {
    _M_impl = {<std::allocator<std::_Rb_tree_node<VmInterface::SecurityGroupEntry> >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<VmInterface::SecurityGroupEntry> >> = {<No data fields>}, <No data fields>}, _M_key_compare = {<VmInterface::ListEntry> = {
          _vptr.ListEntry = 0xe9fb90 <vtable for VmInterface::SecurityGroupEntry+16>, installed_ = false, del_pending_ = false}, sg_ = {
          px = 0x0}, uuid_ = {data = '\000' <repeats 15 times>}}, _M_header = {_M_color = std::_S_red, _M_parent = 0x7fda40047b90,
        _M_left = 0x7fda40047b90, _M_right = 0x7fda40047b90}, _M_node_count = 1}}}