- 18 Dec, 2019 8 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Canonical implementation of `IoUringBackend::NotAvailable` - need to export exceptions since they are the most likely use-case for RTTI and can just bring the base class's ctors into scope. Differential Revision: D19154080 fbshipit-source-id: efaf9440a5ec3d78201448160efe4b8893314956
-
Andrii Grynenko authored
Reviewed By: yfeldblum, lewissbaker Differential Revision: D19156701 fbshipit-source-id: 80bd8b7fc6dfde71756411342e5f4eb912150f06
-
Igor Sugak authored
Summary: Exposed by UBSAN's unsigned-integer-overflow: ``` > folly/experimental/observer/detail/Core.cpp:179:9: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'size_t' (aka 'unsigned long') > #0 0x7f605837dfea in folly::observer_detail::Core::removeStaleDependents()::$_4::operator()(std::vector<std::weak_ptr<folly::observer_detail::Core>, std::allocator<std::weak_ptr<folly::observer_detail::Core> > >&) const folly/experimental/observer/detail/Core.cpp:179 > #1 0x7f6058344b0c in auto folly::SynchronizedBase<folly::Synchronized<std::vector<std::weak_ptr<folly::observer_detail::Core>, std::allocator<std::weak_ptr<folly::observer_detail::Core> > >, folly::SharedMutexImpl<false, void, std::atomic, false, false> >, (folly::detail::MutexLevel)1>::withWLock<folly::observer_detail::Core::removeStaleDependents()::$_4>(folly::observer_detail::Core::removeStaleDependents()::$_4&&) folly/Synchronized.h:210 > #2 0x7f6058344917 in folly::observer_detail::Core::removeStaleDependents() folly/experimental/observer/detail/Core.cpp:174 > #3 0x7f60583785cb in folly::observer_detail::Core::~Core()::$_2::operator()(std::unordered_set<std::shared_ptr<folly::observer_detail::Core>, std::hash<std::shared_ptr<folly::observer_detail::Core> >, std::equal_to<std::shared_ptr<folly::observer_detail::Core> >, std::allocator<std::shared_ptr<folly::observer_detail::Core> > > const&) const folly/experimental/observer/detail/Core.cpp:156 > #4 0x7f6058343cdc in auto folly::SynchronizedBase<folly::Synchronized<std::unordered_set<std::shared_ptr<folly::observer_detail::Core>, std::hash<std::shared_ptr<folly::observer_detail::Core> >, std::equal_to<std::shared_ptr<folly::observer_detail::Core> >, std::allocator<std::shared_ptr<folly::observer_detail::Core> > >, folly::SharedMutexImpl<false, void, std::atomic, false, false> >, (folly::detail::MutexLevel)1>::withWLock<folly::observer_detail::Core::~Core()::$_2>(folly::ob server_detail::Core::~Core()::$_2&&) folly/Synchronized.h:210 > #5 0x7f6058343a17 in folly::observer_detail::Core::~Core() folly/experimental/observer/detail/Core.cpp:154 > #6 0x7f605838b8ca in std::_Sp_counted_ptr<folly::observer_detail::Core*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() buck-out/cells/fbsource/gen/third-party/gcc/7.x/stdc++-headers#header-mode-symlink-tree-with-header-map,headers/bits/shared_ptr_base.h:378 > #7 0x7f605834d411 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() buck-out/cells/fbsource/gen/third-party/gcc/7.x/stdc++-headers#header-mode-symlink-tree-with-header-map,headers/bits/shared_ptr_base.h:156 > #8 0x7f605834d332 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() buck-out/cells/fbsource/gen/third-party/gcc/7.x/stdc++-headers#header-mode-symlink-tree-with-header-map,headers/bits/shared_ptr_base.h:686 > #9 0x7f605834d23a in std::__shared_ptr<folly::observer_detail::Core, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() buck-out/cells/fbsource/gen/third-party/gcc/7.x/stdc++-headers#header-mode-symlink-tree-with-header-map,headers/bits/shared_ptr_base.h:1125 > #10 0x7f605833c416 in std::shared_ptr<folly::observer_detail::Core>::~shared_ptr() buck-out/cells/fbsource/gen/third-party/gcc/7.x/stdc++-headers#header-mode-symlink-tree-with-header-map,headers/bits/shared_ptr.h:93 > #11 0x7f6058376413 in folly::observer_detail::ObserverManager::scheduleRefresh(std::shared_ptr<folly::observer_detail::Core>, unsigned long)::'lambda'()::~() folly/experimental/observer/detail/ObserverManager.h:91 > #12 0x7f6058377014 in unsigned long folly::detail::function::execSmall<folly::observer_detail::ObserverManager::scheduleRefresh(std::shared_ptr<folly::observer_detail::Core>, unsigned long)::'lambda'()>(folly::detail::function::Op, folly::detail::function::Data*, folly::detail::function::Data*) folly/Function.h:592 > #13 0x7f6058377788 in folly::Function<void ()>::exec(folly::detail::function::Op, folly::detail::function::Data*, folly::detail::function::Data*) const folly/Function.h:649 > #14 0x7f6058376380 in folly::Function<void ()>::~Function() folly/Function.h:781 > #15 0x7f6058477b99 in folly::observer_detail::ObserverManager::UpdatesManager::CurrentQueue::CurrentQueue()::'lambda'()::operator()() const folly/experimental/observer/detail/ObserverManager.cpp:73 > #16 0x7f6058473de8 in void std::__invoke_impl<void, folly::observer_detail::ObserverManager::UpdatesManager::CurrentQueue::CurrentQueue()::'lambda'()>(std::__invoke_other, folly::observer_detail::ObserverManager::UpdatesManager::CurrentQueue::CurrentQueue()::'lambda'()&&) buck-out/cells/fbsource/gen/third-party/gcc/7.x/stdc++-headers#header-mode-symlink-tree-with-header-map,headers/bits/invoke.h:60 > #17 0x7f6058473c08 in std::__invoke_result<folly::observer_detail::ObserverManager::UpdatesManager::CurrentQueue::CurrentQueue()::'lambda'()>::type std::__invoke<folly::observer_detail::ObserverManager::UpdatesManager::CurrentQueue::CurrentQueue()::'lambda'()>(folly::observer_detail::ObserverManager::UpdatesManager::CurrentQueue::CurrentQueue()::'lambda'()&&) buck-out/cells/fbsource/gen/third-party/gcc/7.x/stdc++-headers#header-mode-symlink-tree-with-header-map,headers/bits/invok e.h:95 > #18 0x7f6058473b66 in decltype(std::__invoke(_S_declval<0ul>())) std::thread::_Invoker<std::tuple<folly::observer_detail::ObserverManager::UpdatesManager::CurrentQueue::CurrentQueue()::'lambda'()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) buck-out/cells/fbsource/gen/third-party/gcc/7.x/stdc++-headers#header-mode-symlink-tree-with-header-map,headers/thread:234 > #19 0x7f6058473a43 in std::thread::_Invoker<std::tuple<folly::observer_detail::ObserverManager::UpdatesManager::CurrentQueue::CurrentQueue()::'lambda'()> >::operator()() buck-out/cells/fbsource/gen/third-party/gcc/7.x/stdc++-headers#header-mode-symlink-tree-with-header-map,headers/thread:243 > #20 0x7f6058473549 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<folly::observer_detail::ObserverManager::UpdatesManager::CurrentQueue::CurrentQueue()::'lambda'()> > >::_M_run() buck-out/cells/fbsource/gen/third-party/gcc/7.x/stdc++-headers#header-mode-symlink-tree-with-header-map,headers/thread:186 > #21 0x7f60576bac5f in std::execute_native_thread_routine(void*) third-party/gcc/7.x/libstdc++-v3/src/c++11/thread.cc:83 > #22 0x7f605639e6b5 in start_thread /home/engshare/third-party2/glibc/2.26/src/glibc-2.26/nptl/pthread_create.c:465:7 > #23 0x7f6055ecdebe in __GI___clone /home/engshare/third-party2/glibc/2.26/src/glibc-2.26/sysdeps/unix/sysv/linux/x86_64/clone.S:95 > > SUMMARY: UndefinedBehaviorSanitizer: unsigned-integer-overflow folly/experimental/observer/detail/Core.cpp:179:9 ``` Fix the error by rearranging increment and decrement operations. Reviewed By: leikahing Differential Revision: D19164999 fbshipit-source-id: d3c9b638492d0bf44c2acaac1e95fafe8b785182
-
David Carlier authored
Summary: - __cxa_get_globals signature closer of the libcxxabi. - malloc.h exists now on FreeBSD but prevents stdlib.h inclusion if __STDC__. Pull Request resolved: https://github.com/facebook/folly/pull/1281 Reviewed By: Orvid Differential Revision: D19140640 Pulled By: yfeldblum fbshipit-source-id: 525014b5a367b8d8e95cf10e3e779cd7f0647bd5
-
Andrii Grynenko authored
Summary: An alternative to co_return Try that works for Task<void> Reviewed By: yfeldblum Differential Revision: D19136334 fbshipit-source-id: 72a18482b326dbc40b691712a5fd311efad45785
-
Matt Ma authored
Summary: The general idea is to change cache to a mapping between an address and array of frames instead of just one frame. Also changed Dwarf to directly fill frames array with inline function calls, instead of allocating extra LocationInfo array. Moved shared data structure like LocationInfo and SymbolizedFrame into a separate file so that it can used in both Dwarf.cpp and Symbolizer.cpp. Reviewed By: luciang Differential Revision: D18825831 fbshipit-source-id: fe963a1adbbc6f0055c466b91708eee732abc141
-
Dan Melnic authored
Summary: Skip the EventBase tests if the backend is not available Reviewed By: yfeldblum Differential Revision: D19002064 fbshipit-source-id: a995df02998c80de2f9076ea16a0281b6288d6b5
-
Dan Melnic authored
Summary: Fix io_uring backend tests Reviewed By: yfeldblum, danobi Differential Revision: D19023775 fbshipit-source-id: d696064d26b37f52529c84601f6797ef82b0ddb5
-
- 17 Dec, 2019 6 commits
-
-
Dan Melnic authored
Summary: EventBase test lib rework Reviewed By: yfeldblum Differential Revision: D19001877 fbshipit-source-id: d99ad41007012c7bd21ee259a0a0b5ee2b709512
-
Dan Melnic authored
Summary: Add IoUringBackend::NotAvailable exception Reviewed By: kevin-vigor Differential Revision: D19143143 fbshipit-source-id: 7b55106d50882d34fc6100a81ff2a4e5748e9b85
-
Andrii Grynenko authored
Summary: This allows makeObserver to work even during shutdown. Reviewed By: yfeldblum Differential Revision: D19136597 fbshipit-source-id: 17e946a66743a56d24904697c02ce7165bcaf397
-
Misha Shneerson authored
Summary: Linux thread identifier is something that we can get with `gettid`. http://man7.org/linux/man-pages/man2/gettid.2.html This TID is super usefully for providing thread information while debugging on Linux (this is the thing that `ps` command uses, or procfs), but is not really mappable from `std::thread::id` (e.g. the thread handle we get with `pthread_self()`). Reviewed By: yfeldblum Differential Revision: D19134596 fbshipit-source-id: 32ad025c5e378e3c7b55da1aad8dd9f3e26d0892
-
Elliott Clark authored
Summary: While running a system lots of different values will be added to lots of different `MultiLevelTimeSeries`. These values can be timestamps, lengths of time, file sizes, just about anything. There's no way for the underlying library to know before hand how large they will be. So it's always going to be possible to cause undefined behavior. That means we could fix this one of two ways. We could make this code be ignored for ubsan, or we could make it never roll over. I have made it so that the code won't roll over here. This seems better because it will continue to give more representative numbers. Rather than going from a very large number to a very small number, we'll remain at a very large number. That should still convey to every one that the numbers being accumulated are very large. Reviewed By: mzlee Differential Revision: D16970762 fbshipit-source-id: c56f6db1dbdecefd190e6ac357133886a3642571
-
Dan Melnic authored
Summary: New 20191216 liburing Reviewed By: danobi Differential Revision: D19125513 fbshipit-source-id: 38d2800ee75865cb76cb06edc0328feaa44bab3e
-
- 16 Dec, 2019 1 commit
-
-
Lee Howes authored
Summary: Integrate calls into logging framework to allow tracking of source and use of the global executor. Reviewed By: andriigrynenko Differential Revision: D18232728 fbshipit-source-id: e714b870cc041af9c99a95baf8f32c3819852b37
-
- 14 Dec, 2019 3 commits
-
-
Lee Howes authored
Summary: Adds sampled logging to track executors passed to Future::via. Reviewed By: andriigrynenko Differential Revision: D18233242 fbshipit-source-id: b5c004f643261a36fd0b63fb6e033263ece1662f
-
Igor Sugak authored
Reviewed By: Orvid Differential Revision: D19053964 fbshipit-source-id: dd31937cbeb3c7ef202e4b91c1b153f849376bdf
-
Yedidya Feldblum authored
Summary: [Folly] Prefer `TEST_F` and tests named `...Test` in `folly/experimental/coro/`. Reviewed By: lewissbaker Differential Revision: D18746584 fbshipit-source-id: 49156a1dca5ef115bf12add5ceb38cb7905fac3d
-
- 13 Dec, 2019 7 commits
-
-
Igor Sugak authored
Summary: These files fail to build when a different version of glog is used. Notice that both cpp files use gflags but don't include its header. Reviewed By: pixelb Differential Revision: D18974446 fbshipit-source-id: 4cfaa6dc62c795f4fe7f6624f078cffe550ecfec
-
Felix Handte authored
Summary: D18890515 broke folly builds when zstd isn't present. (My bad!!) This should fix it. Reviewed By: lukaspiatkowski Differential Revision: D19029293 fbshipit-source-id: 2ede5a8402e60af61a294c9db35ca15dffdf4c49
-
Sushil Patil authored
Summary: `folly::AtomicBitSet<N>` used `N` to denote the number of blocks (32-bit or 64-bit each) instead of number of bits as used by `std::bitset`. This confusion of unit led to unintentional allocation of extra storage in many cases. A simple fix would be to make `N` denote number of bits. However, changing meaning of `N`could lead to silent breakage of code during run time for some users who used `N` to denote number of blocks. Therefore, to make the new meaning of `N` more explicit, `AtomicBitSet` is renamed to `ConcurrentBitSet` & `N` now denotes the number of bits. Reviewed By: al13n321 Differential Revision: D18866751 fbshipit-source-id: 17741646862776e1a080eaac7877f495bb56b656
-
Andrii Grynenko authored
Differential Revision: D19001755 fbshipit-source-id: bda1a278017059e83c9a529aac7b429f074e42c1
-
Misha Shneerson authored
Summary: We should be able to associate rootId with the TID the request is running on. Reviewed By: yfeldblum Differential Revision: D18918492 fbshipit-source-id: 539cd78729b438928a9a4b0c93e8e17295b642d5
-
Misha Shneerson authored
Summary: What: exposed an API `folly::RequestContext::getRootsFromAllThreads` that reports all "root" RequestContexts for all threads in the process. (where "root" is defined as the original RequestContext created for the request but which might have been overridden with `ShallowCopyRequestContextScopeGuard)` Reviewed By: andriigrynenko Differential Revision: D18849187 fbshipit-source-id: f3c67becf1e38fb8d2198c81ed0ce77bac860d63
-
Andrii Vasylevskyi authored
Summary: Fixing couple more failures in folly when compiling wasm: 1) making posix_memalign used instead of memalign (wasi-libc has memlaign as legacy P123789170) 2) disabling clearenv() that is using environ, which wasi-libc has off by ```#ifdef _GNU_SOURCE```, not sure why, but it's already off for linux and we won't use it our wasm code either. Reviewed By: shodoco Differential Revision: D18944271 fbshipit-source-id: ffa838591ada1248fdb8ae24f7eac45896a311e2
-
- 12 Dec, 2019 3 commits
-
-
Felix Handte authored
Summary: This is intentionally not hidden in `folly/compression/Zstd.cpp`, so that it can be used by other Zstd users as well. Reviewed By: bimbashrestha Differential Revision: D18890515 fbshipit-source-id: e87eb6acd03f4b4d5f68201ef924984047d0160e
-
Felix Handte authored
Summary: This reduces contention on the synchronized stack in the `CompressionContextPool`, as well as potentially helping cache locality under heavy compression workloads. I have plans to make a singleton of this, and to use it in `folly::io::Codec` and some other places, so they all use the same contexts. Reviewed By: bimbashrestha Differential Revision: D18863824 fbshipit-source-id: 63c2f3dd0abe0aa4c88350767e9e77acb763c9a5
-
Giuseppe Ottaviano authored
Summary: `F14Vector{Map,Set}` have specified iteration order: inverse insertion order. When serialized, however, the order does not round-trip (in fact, it flips). This diff introduces an extension point to specify the iteration order for serialization, and it specializes it for F14 to make the iteration order round-trip. Reviewed By: vitaut Differential Revision: D17108774 fbshipit-source-id: 466b746baacff861242729bfa62447c138094cee
-
- 11 Dec, 2019 2 commits
-
-
Andrii Grynenko authored
Reviewed By: yfeldblum Differential Revision: D18926899 fbshipit-source-id: d16c1b5b54a75fe70514f25b648de70ae66b6415
-
Yedidya Feldblum authored
Summary: [Folly] Define support macro in all branches v.s. as a fallback for style. Differential Revision: D18900489 fbshipit-source-id: 9f9cb3c70889c8d6800070221bd8fe9ce091745c
-
- 10 Dec, 2019 3 commits
-
-
Lee Howes authored
Summary: Stub interface for logging functions to integrate with the GlobalExecutor and Futures. Reviewed By: andriigrynenko Differential Revision: D18229089 fbshipit-source-id: ad57de08a8bd6a80e2d0af9a9792de86a8267176
-
Lukasz Piatkowski authored
Summary: This should fix the Travis CI builds. It adds rust toolchain support inside docker and sets the required THRIFT env variable. Pull Request resolved: https://github.com/facebookexperimental/rust-shed/pull/3 Reviewed By: krallin Differential Revision: D18905608 Pulled By: lukaspiatkowski fbshipit-source-id: 5db1eff6f215a6617d8acaa0c99a62d45225956b
-
Yedidya Feldblum authored
Summary: [Folly] Helper variable templates for tuple applicability traits: `is_applicable_v`, `is_applicable_r_v`, `is_nothrow_applicable_v`, `is_nothrow_applicable_r_v`. Reviewed By: lewissbaker Differential Revision: D18746853 fbshipit-source-id: 9d01b24030f95ab5b4963660dc4ef471b5e0ad02
-
- 09 Dec, 2019 5 commits
-
-
Dan Melnic authored
Summary: Add support for io_uring based EventBase backend Reviewed By: kevin-vigor Differential Revision: D18682173 fbshipit-source-id: d6e02879e2b493680caaa3097d75970d0b5d7d07
-
Anirudh Ramachandran authored
Summary: Helps test resumption failure/success in other tests that use AsyncSSLSocketTest classes. Reviewed By: mingtaoy Differential Revision: D18561383 fbshipit-source-id: 29852ede80ecd59f662f536368ce2efe7d26745d
-
Keith Birney authored
Summary: This fixes a timing issue that has been observed in rare cases under very heavy load. Differential Revision: D18875069 fbshipit-source-id: cd47abfbd01c10e2568693f876dd3e6c2cb3bb24
-
Dan Melnic authored
Summary: Add support for setting a zerocopy enable function Reviewed By: kevin-vigor Differential Revision: D18579527 fbshipit-source-id: dc3ab7bb13b26528bc964c7eb616517e444487a4
-
Zoltán Gilián authored
Summary: To enable building with -Werror,-Wundef. Reviewed By: guangyfb Differential Revision: D18850905 fbshipit-source-id: 95555781fec991eac119c95a6a6cd7751b5ba742
-
- 07 Dec, 2019 1 commit
-
-
Michael Lee (Engineering) authored
Summary: When compiling each file individually, bring the includes closer as they are referenced (e.g., rely less on transitive includes and include what you use) Reviewed By: bithree Differential Revision: D18864197 fbshipit-source-id: 24adef418fd2eb944aa283a55411ec5a7c6f549b
-
- 06 Dec, 2019 1 commit
-
-
Pavlo Kushnir authored
Summary: Currently if compiler decides to inline fiber function, we'll end up allocating variables on fiber stack even though we use `runInMainContext`. Reviewed By: andriigrynenko Differential Revision: D18842065 fbshipit-source-id: 847c4f95c44ef49f5c7537af878ca8340f2b7b16
-