Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pull from origin #1

Merged
merged 7 commits into from
Feb 13, 2019
Merged

pull from origin #1

merged 7 commits into from
Feb 13, 2019

Conversation

shine4chen
Copy link
Owner

What I did

Why I did it

How I verified it

Details if related

lguohan and others added 7 commits February 1, 2019 01:53
the test should set the speed and autoneg in config db instead
of application db. As if the speed in config db is not changed,
it will override the value in app db after warm reboot

Signed-off-by: Guohan Lu <gulv@microsoft.com>
now, Force10-S6000 vs env has port speed set in port_config.ini.
Thus, dynamic pg profile is added to the initial list. Extend
the test to support this new scenario.

Signed-off-by: Guohan Lu <gulv@microsoft.com>
* Increase the watermark polling interval to 10s

Signed-off-by: Wenda <wenni@microsoft.com>

* Update watermark test timing with 10s polling interval

Signed-off-by: Wenda <wenni@microsoft.com>
Signed-off-by: Guohan Lu <gulv@microsoft.com>
…745)

* [neighsyncd] increase neighbor syncd restore timeout to 120 seconds

Neighbor syncd is restoring important information for teamd and BGP.
our timeout should not be shorter than the down stream service.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* [restore_neighbor] improve restore neighbor timeouts

Try to get the bgp timeout and use it for restoring neighbor timeout.
When unavailable, use default 110 seconds.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* Set default values according group discussion result

- restore_neighbors.py timeout at 110 seconds due to observed requirement
  of greater than 70 seconds.
- neighbor syncd timeout at 120 seconds (longer than 110 seconds).

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
* Route/NH and VNet delete handling

* Handle VNET Route with Nexthop IP, fix route remove

* Address review comments, increment CRM counters,
@shine4chen shine4chen merged commit 9326978 into shine4chen:master Feb 13, 2019
shine4chen pushed a commit that referenced this pull request Feb 3, 2020
* Fix the stack-overflow issue in AclOrch::getTableById()

In case the table_id and m_mirrorTableId/m_mirrorTableId are empty
The function would be called recursively without ending.

```
If we have some rule that does not have table defined, it will trigger this issue.

(gdb) bt
#0  0x00007f77ac5af3a9 in swss::Logger::write (this=0x7f77ac801ec0 <swss::Logger::getInstance()::m_logger>, prio=swss::Logger::SWSS_DEBUG, fmt=0x7f77ac5f1690 ":> %s: enter")
    at logger.cpp:209
#1  0x00000000004a5792 in AclOrch::getTableById (this=this@entry=0x1c722a0, table_id="") at aclorch.cpp:2617
#2  0x00000000004a59d1 in AclOrch::getTableById (this=this@entry=0x1c722a0, table_id="") at aclorch.cpp:2634
#3  0x00000000004a59d1 in AclOrch::getTableById (this=this@entry=0x1c722a0, table_id="") at aclorch.cpp:2634
...
#20944 0x00000000004a59d1 in AclOrch::getTableById (this=this@entry=0x1c722a0, table_id="") at aclorch.cpp:2634
#20945 0x00000000004ad3ce in AclOrch::doAclRuleTask (this=this@entry=0x1c722a0, consumer=...) at aclorch.cpp:2437
#20946 0x00000000004b04cd in AclOrch::doTask (this=0x1c722a0, consumer=...) at aclorch.cpp:2141
#20947 0x00000000004231b2 in Orch::doTask (this=0x1c722a0) at orch.cpp:369
#20948 0x000000000041c4e9 in OrchDaemon::start (this=this@entry=0x1c19960) at orchdaemon.cpp:376
#20949 0x0000000000409ffc in main (argc=<optimized out>, argv=0x7ffe2e392d68) at main.cpp:295

(gdb) p table_id
$1 = ""
(gdb) p m_mirrorTableId
$2 = ""
(gdb) p m_mirrorV6TableId
$3 = ""
```

Signed-off-by: Zhenggen Xu <zxu@linkedin.com>
shine4chen pushed a commit that referenced this pull request Feb 21, 2024
Currently, ASAN sometimes reports the BufferOrch::m_buffer_type_maps and QosOrch::m_qos_maps as leaked. However, their lifetime is the lifetime of a process so they are not really 'leaked'.
This also adds a simple way to add more suppressions later if required.

Example of ASAN report:

Direct leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x7f96aa952d30 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xead30)
    #1 0x55ca1da9f789 in __static_initialization_and_destruction_0 /__w/2/s/orchagent/bufferorch.cpp:39
    #2 0x55ca1daa02af in _GLOBAL__sub_I_bufferorch.cpp /__w/2/s/orchagent/bufferorch.cpp:1321
    #3 0x55ca1e2a9cd4  (/usr/bin/orchagent+0xe89cd4)

Direct leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x7f96aa952d30 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xead30)
    #1 0x55ca1da6d2da in __static_initialization_and_destruction_0 /__w/2/s/orchagent/qosorch.cpp:80
    #2 0x55ca1da6ecf2 in _GLOBAL__sub_I_qosorch.cpp /__w/2/s/orchagent/qosorch.cpp:2000
    #3 0x55ca1e2a9cd4  (/usr/bin/orchagent+0xe89cd4)

- What I did
Added an lsan suppression config with static variable leak suppression

- Why I did it
To suppress ASAN false positives

- How I verified it
Run a test that produces the static variable leaks report and checked that report has these leaks suppressed.

Signed-off-by: Yakiv Huryk <yhuryk@nvidia.com>
shine4chen pushed a commit that referenced this pull request Feb 21, 2024
…onic-net#2446)

* Add events publish

* Added header file

* signature fix

* syntax

* syntax

* syntax

* syntax

* syntax

* syntax

* Updated fake code

* Remove if and log messages for event_publish

* Remove if and log messages for event_publish (#1)

* Remove event_handle_t from signature and add globally

* Remove extern orchdaemon.cpp

* Revert unneeded changes

Co-authored-by: zbud-msft <zainbudhwani@microsoft.com>
Co-authored-by: Zain Budhwani <99770260+zbud-msft@users.noreply.github.com>
shine4chen pushed a commit that referenced this pull request Feb 21, 2024
**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
    sonic-net#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
    sonic-net#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
    sonic-net#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
    sonic-net#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
    sonic-net#9 0x5555594edbd6 in QosOrch::doTask(Consumer&) orchagent/qosorch.cpp:2179
    sonic-net#10 0x5555590c8743 in Consumer::drain() orchagent/orch.cpp:241
    sonic-net#11 0x5555590c8743 in Consumer::drain() orchagent/orch.cpp:238
    sonic-net#12 0x5555590c8743 in Consumer::execute() orchagent/orch.cpp:235
    sonic-net#13 0x555559090dad in OrchDaemon::start() orchagent/orchdaemon.cpp:755
    sonic-net#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.

6 participants