Repository navigation
Tags
Tags
python: install Python libraries under the prefix given at install time Summary: `add_fb_python_library` made its install directory absolute with the `CMAKE_INSTALL_PREFIX` of configure time, so `cmake --install --prefix` doesn't move a library that `install_fb_python_library` installs. eden installs `eden_scm_redact` that way, and its Windows install into `_artifacts/windows` tries to write `C:/Program Files (x86)/eden/lib/fb-py-libs/eden_scm_redact`, which fails without administrator rights; on Linux the same install tries `/usr/local`. The directory now stays relative, which `install()` resolves against the prefix at install time. ___ landed-with-radar-review Differential Revision: D129598542 fbshipit-source-id: d1eabb64e6e9c3002471d833b4079c89ba55b460
Use `[[likely]]`/`[[unlikely]]` instead of whole-condition `FOLLY_LIK… …ELY` (1/2) Summary: `FOLLY_LIKELY(cond)` and `FOLLY_UNLIKELY(cond)` wrap `__builtin_expect`. When the macro is the entire condition of an `if`, the C++20 `[[likely]]` and `[[unlikely]]` attributes on the branch say the same thing in standard C++. Rewrite those statements, for example `if (FOLLY_UNLIKELY(!ok))` becomes `if (!ok) [[unlikely]]`. Uses inside larger expressions and loop conditions are unchanged. No behavior change. Reviewed By: dtolnay Differential Revision: D130448349 fbshipit-source-id: b4cd6e11cf01f1a082dba6f063d61b7686bd8756
Remove unreachable returns in fbcode/mastermind, fbcode/mcp, fbcode/m… …crouter (+20) Summary: Clang's `-Wunreachable-code-return` (reported by continuous lint as `clang-diagnostic-unreachable-code-return`) flags `return` statements that can never execute. This diff fixes 20 of them. Dead `return`s are deleted when they follow a statement that never completes normally (`throw`, `LOG(FATAL)`, `CHECK(false)`, `std::abort()`, `FAIL()`, ...) or a block whose every path already returns or throws (exhaustive `if`/`else`, `switch` with `default`, `try`/`catch`, `while (true)`). Behaviour is unchanged in every build mode. Part of T294580822. Reviewed By: dtolnay Differential Revision: D127401280 fbshipit-source-id: 8def6f385c2e147fa0fbc38139ebbbf95a4dcb68
ThriftFieldRefIsSetToFreeFunction_mcrouter_lib Reviewed By: Mizuchi Differential Revision: D125619675 fbshipit-source-id: 41f004c0cdf7869cfee6085ee2568df71c0c156d
Updating hashes Summary: GitHub commits: WhatsApp/erlang-language-platform@5270c5b meta/CacheLib@0c320ad meta/fb303@b391ed9 meta/fbthrift@e5bba51 meta/folly@4dda9bd meta/mvfst@79aaf09 meta/proxygen@0d3feea pyrefly-org/pyrefly@30fbf77 meta/wangle@b134806 facebookexperimental/edencommon@8aa064a facebookexperimental/rust-shed@212e67d facebookincubator/fizz@2b9da06 Reviewed By: ajb85 fbshipit-source-id: 4b90bbebcf4e7a5a696841b25d70347865dc211b
Updating hashes Summary: GitHub commits: meta/CacheLib@1afde0f meta/fb303@8565417 meta/fbthrift@e2d2c89 meta/folly@68cabf0 meta/mvfst@2e6b5c9 meta/proxygen@1964792 pyrefly-org/pyrefly@02b812e meta/wangle@40a2fe0 facebookexperimental/edencommon@a151ad9 facebookexperimental/rust-shed@745d642 facebookincubator/fizz@bf0cef2 Reviewed By: pranavcivi fbshipit-source-id: a5c8a6062fa8d2ee907a898b3b40bac146ab372e
Use F14FastSet instead of sorted vector for ShadowSettings key lookup Reviewed By: MatzeB Differential Revision: D120657246 fbshipit-source-id: 96e984ddd56530a57223ad6ecabf8c9c7b41d98d
Avoid folly::dynamic copy in BlackholingPolicyVisitor by storing a re… …ference Reviewed By: cnli87 Differential Revision: D119687021 fbshipit-source-id: 09592bac8d5c6550030351de6cadbb95d9be4d71
Option to insecure-request drop for the proxy Summary: Adds two standalone options for the mcrouter proxy. Reviewed By: djvaporize Differential Revision: D118724271 fbshipit-source-id: 3382c640cab5623c7ccdf3b0c8409606630c9bf9
Stop thread-jumps before shutdown frees the proxies Summary: `CarbonRouterInstance::shutdownImpl()` calls `proxyEvbs_.clear()`, which destroys the `VirtualEventBase`s one at a time and frees each `Proxy` along with them (`Proxy::createProxy` ties the two together via `runOnDestruction`). The other proxy IO threads are still routing at that point -- the join comes later -- and `proxies_` is a vector of raw `Proxy*` that is never cleared. So a request that thread-jumps on a live proxy can resolve a target that `clear()` has already freed. Confirmed on two coredumps (aarch64 and x86-64) from the `fbpkg` / `fbpkg.fetch` CLIs, which stand up and tear down a router on every invocation: mov (%rcx,%rdx,8),%rax ; rax = proxies_[idx] -- ok mov 0x18(%rax),%rbx ; rbx = Proxy->eventBase_ -- ok, read 0 ... mov 0x18(%rbx),%rcx ; SIGSEGV at 0x18, rbx == 0 `proxies_[i]` was still readable, but `eventBase_` -- a reference member that cannot be null in a live `Proxy` -- read 0. The object had been freed and its memory recycled. The x86 faulting `rip` matches the stack reported in S688594. Two halves, because there are two populations of dangerous hops: - New hops. `proxiesDraining_` is set at the start of proxy teardown (after `joinAuxiliaryThreads()`, before anything is destroyed) and checked by the two accessors that resolve a hop target, `getProxyForThreadJump()` and `getProxyBaseForThreadJump()`. While draining they return nullptr and the caller routes locally -- the existing "stay on this thread" path, which every hop site already handles. - In-flight hops. `fenceProxyEventBases()` round-trips every proxy event base before any `VirtualEventBase` is destroyed. No hop site suspends between resolving a target and enqueueing on it, so a hop that read the flag as false is still running inline on its source proxy's thread, and the fence task queued there cannot run until it finishes. Once every proxy has passed the fence, each pending hop is covered by a keep-alive on its target, and `~VirtualEventBase()` blocks on those. Relaxed ordering is sufficient: the happens-before comes from the fence's notification queue, not from the flag. Cost is one relaxed load of a read-mostly flag per hop resolution, behind a consistent-hash lookup (SRRoute) or a full route-handle traverse (Multi\*Routes). `getProxyFromHash()` is replaced by `getProxyForThreadJump()`; it had one in-tree caller, but was public on an OSS-mirrored header, so this is an API break for the GitHub mirror. Reviewed By: vrishal, stuclar Differential Revision: D115935603 fbshipit-source-id: 3927b8d85512262cf222b106e6aa3d8230cee68f
PreviousNext