Skip to content

[pull] master from facebook:master - #1

Merged
pull[bot] merged 678 commits into
Rachelmorrell:masterfrom
meta:master
Nov 1, 2018
Merged

pull[bot] merged 678 commits into
Rachelmorrell:masterfrom
meta:master

Conversation

@pull

@pull pull Bot commented Nov 1, 2018 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot]

svcscm and others added 30 commits August 21, 2018 18:24
Reviewed By: yns88

fbshipit-source-id: 6abd2740a74519ae25284f97fc797cabb7c9ffc8
Reviewed By: yns88

fbshipit-source-id: 0047a77d3dd376dee6dfeb735a54d2677edbf20b
Summary: provide an option to set the high water mark for zmq kvstore pub

Reviewed By: jstrizich

Differential Revision: D9441562

fbshipit-source-id: e036388c378537b49ceb932530e2a2c94f840306
Summary: Update cmake configurations + legocastle jobs in order to add fizz as a dependency to wangle

Reviewed By: reanimus

Differential Revision: D9337956

fbshipit-source-id: 40f25694c2b3fd8aa37d254bc63a664f4c8ee526
Summary:
Add a flag which can be used to disable the Spark thread built in
openr, so that external programs that do neighbor discovery on their own can
send custom neighbor events to openr.

Reviewed By: jstrizich

Differential Revision: D9444964

fbshipit-source-id: bcf1fcfce911f8ce81d86318486345d50de5d48e
Reviewed By: yns88

fbshipit-source-id: da56aa40f9784f8c9d577d681ed8b37bdd9a83e0
Reviewed By: yns88

fbshipit-source-id: fab0d62e812412e68ea7349dff62e29be35459f6
Reviewed By: yns88

fbshipit-source-id: d18854d940fc4000309f854e1a37492427c0c217
Reviewed By: yns88

fbshipit-source-id: c277560477e33434467a8d9788b8723ba979fb1d
Reviewed By: yns88

fbshipit-source-id: 5a38c9cfe1ce953707c449214a08e6ae2e0b187e
Summary:
Adding additional logging to help in debugging KVstore sync issues.
TG logs had lot of 'Spark message received', but not clear for what event. Changed the verbosity from 2 to 1 to include spark event type.

Reviewed By: cenzhao

Differential Revision: D9472950

fbshipit-source-id: 0c36d646ba6d8814632dc6dca4a28d210419b6a2
Summary: in the opensource spec I forgot to specify the github org as facebookincubator in D9337956 vs regular facebook, this caused travis builds for proxygen and anything that depends on fizz to fail

Reviewed By: knekritz

Differential Revision: D9482739

fbshipit-source-id: ba5a8f465c81ec1b9f037114ce1da3614a838699
Reviewed By: yns88

fbshipit-source-id: d943235a5b89fbce2ea4384741648b8cbde7c617
Reviewed By: yns88

fbshipit-source-id: 0dc9b3169196626b50e1fc1fb7b858fa0010ed3a
Reviewed By: yns88

fbshipit-source-id: 756770ce08424f668bf08e706518ddc93cc3b1a4
Reviewed By: yns88

fbshipit-source-id: 3a970ac7d6e56ab5092d079aee83dc91bac75064
Reviewed By: yns88

fbshipit-source-id: 096490c6eed9f287cc857f80bc085ff387b16a2d
Reviewed By: yns88

fbshipit-source-id: 571273e639b8926a25c317a3cc794fd7d2f6b825
Reviewed By: ainsleyh

fbshipit-source-id: f3aa0a06c716685e68d4d9c8eb98955db4d11372
Reviewed By: ainsleyh

fbshipit-source-id: 5a943215e7ebd4005455aacde40d243c19fd257d
Reviewed By: ainsleyh

fbshipit-source-id: d1b2f72251c092ed05e322a25d0550e12870e07c
Reviewed By: ainsleyh

fbshipit-source-id: c24245f3cfa0c3d5520469531dc4fbeef21d6302
Reviewed By: jstrizich

Differential Revision: D9549048

fbshipit-source-id: f213326a8aab926d6d7b7d851d49d106a7aee163
Reviewed By: ainsleyh

fbshipit-source-id: 302e28fb05134387fcd4d716c90627d15a3d3e6a
Reviewed By: ainsleyh

fbshipit-source-id: fc5524f938c0b74fc5ada017bc250d387023f453
Reviewed By: ainsleyh

fbshipit-source-id: ca01847add5d23f643d32e7380ac57b98452854e
The contents here are now in the root .travis.yml, and this file is now out of sync with the FB internal repository.
Reviewed By: ainsleyh

fbshipit-source-id: 6082818fdf18a9bfa2cc6ca16f84459f7fdedea0
Summary:
When running on macOS there is no /etc/issue.  When running
with `set -e` enabled, we don't want this to break the build.

Neither of these is possible today, but will be later in this diff stack.

While I'm in here, also print out the cmake version.

Refs: meta/watchman#639

Reviewed By: snarkmaster

Differential Revision: D9552416

fbshipit-source-id: 432b5b70678908de9f79787d37c3615a7f8649d3
Summary:
I noticed this while testing some changes; the comment
doesn't seem to match up to the `raise` statement, and attempting
to throw a list fails in python.

Reviewed By: strager

Differential Revision: D9566018

fbshipit-source-id: 563e43dfd30867993cc2a0f816db3b835a52e6df
saifhhasan and others added 27 commits October 25, 2018 13:58
Summary:
This is a move towards enforcing proper use of callbacks. An exception can never
be thrown inside callback as it can affect internal state of netlink sockets
(and hence ref-couting problem). By setting noexcept callback user is enforced
to not to do so.

Fixed a bug where in ROUTE callback `isValid` attribute was not set. This
in-turn fixed a broken UT.

Reviewed By: jstrizich

Differential Revision: D10513608

fbshipit-source-id: b178c183e489d576e092d62d697e5a11c0866652
Summary:
Tests in asan build now passes. There were few obvious memory leaks while
using netlink objects

Differential Revision: D10519402

fbshipit-source-id: 31f3268fc7dd131e39842fe7f0d0ff030ae1c85a
Reviewed By: zpao

fbshipit-source-id: 27e294ad69dcd1f9aab1819b6944c10a7f534f27
Reviewed By: zpao

fbshipit-source-id: c1ee3ff260621d8d24874ee7539a21d0e350a44f
Summary:
Few things
- Make proper use of SCOPE_EXIT and SCOPE_FAIL. SCOPE_EXIT is always called even
  in case if exception is thrown. SCOPE_FAIL is called only when exception is
  thrown.
- Initialize primitives
- Some minor fixes here and there

Reviewed By: smaheshm

Differential Revision: D10849934

fbshipit-source-id: 8a7517b71f398a0e906ffda848b50517747aafba
Reviewed By: zpao

fbshipit-source-id: 3cae9e68aa2ac9ee497024b91fcc52d612772524
Reviewed By: zpao

fbshipit-source-id: 3a186d9cc473c84d44c75166c95b7766ec1bc9ef
Reviewed By: zpao

fbshipit-source-id: 1dff37398c7edaa234408f26df21294891d7975d
Reviewed By: zpao

fbshipit-source-id: 3055913d891fea8681203abd88fc63a48730efd5
Summary:
Sometimes in large networks frequent adj updates in different nodes
can cause lot of kvstore updates. These updates can result in CPU
spkies and reasonable amount of control traffic. This diff implements rate
limiter for kvstore updates.

Rate limiter has 2 parameters: msgs/sec, burst size. It's disabled by default.
The rate limited updates are saved in kvstore, and merged with further updates that are
supressed due to rate limiter. So at any time only one publication is pending.

Reviewed By: saifhhasan

Differential Revision: D10428621

fbshipit-source-id: 335d17930bb2824f7f20186845164a9f90bf2115
Reviewed By: cdelahousse

fbshipit-source-id: bb349737964f796364fc434be40dbfea5cb523de
Reviewed By: cdelahousse

fbshipit-source-id: e4998d8402f3aaa528b7592e35c08101bc8be6ec
Reviewed By: cdelahousse

fbshipit-source-id: 8fbc775ecc11c5288d268f964fd0b338e63c3b7a
Reviewed By: cdelahousse

fbshipit-source-id: 2c6a20a59e642d451ac851ec68ab61576c9a388d
Reviewed By: cdelahousse

fbshipit-source-id: d97c97f6fc3c2e5a7e06732e715acc46130b7e29
Reviewed By: cdelahousse

fbshipit-source-id: 2874b96656586c7fee49858cdc85cd406cbedc15
Reviewed By: cdelahousse

fbshipit-source-id: 1c83bcde612c9a6bb06fee75122b3a8bab04e031
Reviewed By: cdelahousse

fbshipit-source-id: bc1f95c3933090c59ee4b32a528c77948588c5f1
Summary:
Implementing copy constructor for NetlinkObjects will simplify lot of code and
improve efficiency as well upto some extent

Further lazy initialize creation of rtnl_obj so that less alloc/de-alloc happens
and we don't unnecessary create C object as well as C++ object. Create C objects
only when necessary for programming via netlink.

Rename APIs for better semantics
- `getRtnl<>Ref` => Return reference to `rtnl_<>` (user is not supposed to free
  it)
- `getRtnl<>Obj` => Return `rtnl_<>` object (user is supposed to free returned
  object once done with it).

This diff also fixes memory leak which happens when we have refresh and recreate
route objects from cache.

{P60236227}

(Note: this ignores all push blocking failures!)

Reviewed By: jstrizich

Differential Revision: D10864093

fbshipit-source-id: a62fa5707cf80b8b1e6c5ffc9e34d3196d3d120e
Summary:
Some added fields were missing in route-comparator. Adding them.
- route-table
- protocol-id
- route-if-name

(Note: this ignores all push blocking failures!)

Reviewed By: jstrizich

Differential Revision: D12808023

fbshipit-source-id: fe34a3d9b416005622cb5fc3b42baf014e77267e
Reviewed By: cdelahousse

fbshipit-source-id: b7d89c8fe9aacdce9e5db2b31361083cc6ce5182
Reviewed By: cdelahousse

fbshipit-source-id: 625611fae0175fa0d5016b9d160f41c4ac4cdb61
Reviewed By: cdelahousse

fbshipit-source-id: 370475168f806da594b90c5873d67262e8cda86a
Reviewed By: cdelahousse

fbshipit-source-id: a205af4e9d4bdf4c1b4cfe9771168acec76508d6
Reviewed By: cdelahousse

fbshipit-source-id: 3f76a76c96b36074932997755847ca0cee5bde1f
Reviewed By: cdelahousse

fbshipit-source-id: 45d8817abacba3b787c3db45bb25e586737e5d61
Summary:
We observe following crash rarely during shutdown of main Open/R process
{P60270653}

Digging bit more, I learned that `cleanUp()` is called on exit of `setup()` as
well as by our main after calling `stop()` on thrift server. So we end up doing
`cleanUp()` twice, once within `setup()` in `NetlinkFibServerThread` as well as
in main() thread just after `stop()`.

Removing this.

Reviewed By: jstrizich

Differential Revision: D12879790

fbshipit-source-id: 0b61bf200d38f08d62221690b4815b4a84947fe7
@pull pull Bot added the ⤵️ pull label Nov 1, 2018
@pull
pull Bot merged commit 156b34c into Rachelmorrell:master Nov 1, 2018
Rachelmorrell pushed a commit that referenced this pull request Apr 12, 2020
Summary:
There is a race condition when KvStoreWrapper and ZMQ background threads are
destroyed. This diff is an attempt to explicitly destroy KvStoreWrapper in TearDown

Also use unique_ptr instead of shared_ptr

```
WARNING: ThreadSanitizer: data race (pid=49594)
  Write of size 8 at 0x7ba000000220 by thread T1:
    #0 close <null> (link_monitor_test+0xdb1f6a)
    #1 zmq::signaler_t::~signaler_t() /home/engshare/third-party2/zeromq/4.3.1/src/zeromq-4.3.1/src/signaler.cpp:114:20 (link_monitor_test+0xbd1274)

  Previous read of size 8 at 0x7ba000000220 by main thread:
    #0 epoll_ctl <null> (link_monitor_test+0xd9bdef)
    #1 epoll_del /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/epoll.c:485 (link_monitor_test+0xec4253)
    #2 folly::EventBaseEvent::eb_event_del() <null> (link_monitor_test+0xa747ef)
    #3 folly::EventHandler::~EventHandler() <null> (link_monitor_test+0xa74a70)
    #4 std::_Hashtable<int, std::pair<int const, openr::OpenrEventBase::ZmqEventHandler>, std::allocator<std::pair<int const, openr::OpenrEventBase::ZmqEventHandler> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::~_Hashtable() <null> (link_monitor_test+0x219620)
    #5 openr::OpenrEventBase::~OpenrEventBase() <null> (link_monitor_test+0x212d8d)
    #6 openr::KvStore::~KvStore() <null> (link_monitor_test+0x1bfbb7)
    #7 openr::KvStore::~KvStore() <null> (link_monitor_test+0x1bfbe9)
    #8 openr::KvStoreWrapper::~KvStoreWrapper() <null> (link_monitor_test+0x117533)
    #9 std::_Sp_counted_ptr_inplace<openr::KvStoreWrapper, std::allocator<openr::KvStoreWrapper>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() <null> (link_monitor_test+0x116fbd)
    #10 LinkMonitorTestFixture::~LinkMonitorTestFixture() <null> (link_monitor_test+0xf8285)
    #11 LinkMonitorTestFixture_BasicOperation_Test::~LinkMonitorTestFixture_BasicOperation_Test() <null> (link_monitor_test+0xf7ee9)
    #12 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) <null> (link_monitor_test+0xc4b2ae)
    #13 __libc_start_main /home/engshare/third-party2/glibc/2.26/src/glibc-2.26/csu/libc-start.c:308:16 (libc.so.6+0x211a5)
```

Reviewed By: yi-xian

Differential Revision: D20148667

fbshipit-source-id: 71634c08df8ebbc98a6b8c4aa3329166834453f2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants