Skip to content

Configdb neighbor restore during warmboot#11

Closed
prsunny wants to merge 1 commit intomasterfrom
warmboot
Closed

Configdb neighbor restore during warmboot#11
prsunny wants to merge 1 commit intomasterfrom
warmboot

Conversation

@prsunny
Copy link
Copy Markdown
Owner

@prsunny prsunny commented Aug 9, 2019

What I did
Replace Neigh entries if it exists and add as state reachable during warmboot neighbor restoration.

Why I did it
During warmboot, restore_neighbors.py restores the APP_DB entries as stale. This will be overwritten by nbrmgrd to trigger ARP but in case of Vlan, the member ports won't be added until later in the initialization, the packets won't get forwarded. This results in neigh entry to FAIL state and disrupts the warmboot requirements. Logs are captured below with timestamps of various events

How I verified it

Details if related

admin@str-a7060cx-acs-1:~$ show vlan brief
+-----------+------------------+------------+----------------+-----------------------+
|   VLAN ID | IP Address       | Ports      | Port Tagging   | DHCP Helper Address   |
+===========+==================+============+================+=======================+
|       200 | 192.168.200.1/24 | Ethernet2  | tagged         |                       |
admin@str-a7060cx-acs-1:~$ ip neigh show
192.168.200.4 dev Vlan200 lladdr 24:8a:07:4c:f5:01 REACHABLE
Aug  8 23:04:48.742231 str-a7060cx-acs-1 INFO swss#supervisord: restore_neighbors WARNING:__main__:Sending Neigh with family: IPv4, intf_idx: 11, ip: 192.168.200.4, mac: 24:8a:07:4c:f5:01
Aug  8 23:04:50.142733 str-a7060cx-acs-1 NOTICE swss#nbrmgrd: :- main: --- Starting nbrmgrd ---
Aug  8 23:04:50.156758 str-a7060cx-acs-1 NOTICE swss#nbrmgrd: :- main: starting main loop
Aug  8 23:04:50.157090 str-a7060cx-acs-1 NOTICE swss#nbrmgrd: :- doTask: Neigh entry added for 'Vlan200|192.168.200.4'
Aug  8 23:04:59.010287 str-a7060cx-acs-1 NOTICE swss#portmgrd: :- doTask: Configure Ethernet2 MTU to 9100
Aug  8 23:04:59.024399 str-a7060cx-acs-1 NOTICE swss#portmgrd: :- doTask: Configure Ethernet2 admin status to up
Aug  8 23:05:09.207801 str-a7060cx-acs-1 NOTICE swss#orchagent: :- initializePort: Initializing port alias:Ethernet2 pid:1000000000011
Aug  8 23:05:09.215846 str-a7060cx-acs-1 NOTICE swss#orchagent: :- addHostIntfs: Create host interface for port Ethernet2
Aug  8 23:05:09.218177 str-a7060cx-acs-1 NOTICE swss#orchagent: :- setHostIntfsOperStatus: Set operation status UP to host interface Ethernet2
Aug  8 23:05:09.218503 str-a7060cx-acs-1 NOTICE swss#orchagent: :- initPort: Initialized port Ethernet2
n
Aug  8 23:05:09.644671 str-a7060cx-acs-1 NOTICE swss#orchagent: :- addNextHop: Created next hop 192.168.200.4 on Vlan200

Aug  8 23:05:14.719059 str-a7060cx-acs-1 NOTICE swss#orchagent: :- addBridgePort: Add bridge port Ethernet2 to default 1Q bridge
Aug  8 23:05:14.719473 str-a7060cx-acs-1 NOTICE swss#orchagent: :- addVlanMember: Add member Ethernet2 to VLAN Vlan1000 vid:1000 pid1000000000011
Aug  8 23:05:24.871698 str-a7060cx-acs-1 NOTICE swss#orchagent: :- updatePortOperStatus: Port Ethernet2 oper state set from up to up

@prsunny prsunny closed this Sep 19, 2019
@prsunny prsunny deleted the warmboot branch February 7, 2020 22:53
prsunny pushed a commit that referenced this pull request Mar 12, 2026
**What I did**

Fix the Mem Leak by moving the raw pointers in type_maps to use smart pointers

**Why I did it**

```
Indirect leak of 83776 byte(s) in 476 object(s) allocated from:
    #0 0x7f0a2a414647 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x5555590cc923 in __gnu_cxx::new_allocator, std::allocator > const, referenced_object> > >::allocate(unsigned long, void const*) /usr/include/c++/10/ext/new_allocator.h:115
    #2 0x5555590cc923 in std::allocator_traits, std::allocator > const, referenced_object> > > >::allocate(std::allocator, std::allocator > const, referenced_object> > >&, unsigned long) /usr/include/c++/10/bits/alloc_traits.h:460
    #3 0x5555590cc923 in std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, referenced_object>, std::_Select1st, std::allocator > const, referenced_object> >, std::less, std::allocator > >, std::allocator, std::allocator > const, referenced_object> > >::_M_get_node() /usr/include/c++/10/bits/stl_tree.h:584
    #4 0x5555590cc923 in std::_Rb_tree_node, std::allocator > const, referenced_object> >* std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, referenced_object>, std::_Select1st, std::allocator > const, referenced_object> >, std::less, std::allocator > >, std::allocator, std::allocator > const, referenced_object> > >::_M_create_node, std::allocator > const&>, std::tuple<> >(std::piecewise_construct_t const&, std::tuple, std::allocator > const&>&&, std::tuple<>&&) /usr/include/c++/10/bits/stl_tree.h:634
    #5 0x5555590cc923 in std::_Rb_tree_iterator, std::allocator > const, referenced_object> > std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, referenced_object>, std::_Select1st, std::allocator > const, referenced_object> >, std::less, std::allocator > >, std::allocator, std::allocator > const, referenced_object> > >::_M_emplace_hint_unique, std::allocator > const&>, std::tuple<> >(std::_Rb_tree_const_iterator, std::allocator > const, referenced_object> >, std::piecewise_construct_t const&, std::tuple, std::allocator > const&>&&, std::tuple<>&&) /usr/include/c++/10/bits/stl_tree.h:2461
    #6 0x5555590e8757 in std::map, std::allocator >, referenced_object, std::less, std::allocator > >, std::allocator, std::allocator > const, referenced_object> > >::operator[](std::__cxx11::basic_string, std::allocator > const&) /usr/include/c++/10/bits/stl_map.h:501
    #7 0x5555590d48b0 in Orch::setObjectReference(std::map, std::allocator >, std::map, std::allocator >, referenced_object, std::less, std::allocator > >, std::allocator, std::allocator > const, referenced_object> > >*, std::less, std::allocator > >, std::allocator, std::allocator > const, std::map, std::allocator >, referenced_object, std::less, std::allocator > >, std::allocator, std::allocator > const, referenced_object> > >*> > >&, std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&) orchagent/orch.cpp:450
    #8 0x5555594ff66b in QosOrch::handleQueueTable(Consumer&, std::tuple, std::allocator >, std::__cxx11::basic_string, std::allocator >, std::vector, std::allocator >, std::__cxx11::basic_string, std::allocator > >, std::allocator, std::allocator >, std::__cxx11::basic_string, std::allocator > > > > >&) orchagent/qosorch.cpp:1763
    #9 0x5555594edbd6 in QosOrch::doTask(Consumer&) orchagent/qosorch.cpp:2179
    #10 0x5555590c8743 in Consumer::drain() orchagent/orch.cpp:241
    #11 0x5555590c8743 in Consumer::drain() orchagent/orch.cpp:238
    #12 0x5555590c8743 in Consumer::execute() orchagent/orch.cpp:235
    #13 0x555559090dad in OrchDaemon::start() orchagent/orchdaemon.cpp:755
    #14 0x555558e9be25 in main orchagent/main.cpp:766
    sonic-net#15 0x7f0a299b6d09 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x23d09)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants