From 469cbbc1f1e74d416c7f856de307d8b4e5037d36 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 5 Aug 2023 14:20:27 -0700 Subject: [PATCH] Update regex and globset to pull in memory usage fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: BurntSushi has fixed a memory usage regression introduced by regex 1.9 which caused Buck to allocate and retain significantly more memory when using moderately sized `buck2_common::ignores::ignore_set::IgnoreSet` objects concurrently from many threads. - Bug report: **[rust-lang/regex#1059](https://github.com/rust-lang/regex/issues/1059) *"1.9 memory usage: globset-generated RegexSet allocates and retains 48× more memory (600MB) vs regex 1.8"*** - Globset fix: **[BurntSushi/ripgrep#25770](https://github.com/BurntSushi/ripgrep/pull/25770) *"globset: use non-capture groups in regex transform"*** - Regex fix: **[rust-lang/regex#1062](https://github.com/rust-lang/regex/pull/1062) *"fix memory usage regression for RegexSet with capture groups"*** Reviewed By: zertosh Differential Revision: D48095372 fbshipit-source-id: ec11c2bcaccbd26354d6d0a0398000134eaf3681 --- below/Cargo.toml | 2 +- below/common/Cargo.toml | 2 +- below/dump/Cargo.toml | 2 +- below/model/Cargo.toml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/below/Cargo.toml b/below/Cargo.toml index fa453fcf..4804acc5 100644 --- a/below/Cargo.toml +++ b/below/Cargo.toml @@ -36,7 +36,7 @@ model = { package = "below-model", version = "0.7.1", path = "model" } once_cell = "1.12" plain = "0.2" procfs = { package = "fb_procfs", version = "0.7.1", path = "procfs" } -regex = "1.6.0" +regex = "1.9.2" serde_json = { version = "1.0.100", features = ["float_roundtrip", "unbounded_depth"] } signal-hook = "0.3" slog = { version = "2.7", features = ["max_level_trace", "nested-values"] } diff --git a/below/common/Cargo.toml b/below/common/Cargo.toml index caaf3ca8..ccba7dfb 100644 --- a/below/common/Cargo.toml +++ b/below/common/Cargo.toml @@ -15,7 +15,7 @@ chrono = { version = "0.4", features = ["clock", "serde", "std"], default-featur cursive = { version = "0.20.0", features = ["crossterm-backend"], default-features = false } humantime = "2.1" once_cell = "1.12" -regex = "1.6.0" +regex = "1.9.2" slog = { version = "2.7", features = ["max_level_trace", "nested-values"] } slog-term = "2.8" walkdir = "2.3" diff --git a/below/dump/Cargo.toml b/below/dump/Cargo.toml index ddc8d965..6ada0305 100644 --- a/below/dump/Cargo.toml +++ b/below/dump/Cargo.toml @@ -16,7 +16,7 @@ clap = { version = "4.3.5", features = ["derive", "env", "string", "unicode", "w common = { package = "below-common", version = "0.7.1", path = "../common" } model = { package = "below-model", version = "0.7.1", path = "../model" } once_cell = "1.12" -regex = "1.6.0" +regex = "1.9.2" render = { package = "below-render", version = "0.7.1", path = "../render" } serde_json = { version = "1.0.100", features = ["float_roundtrip", "unbounded_depth"] } slog = { version = "2.7", features = ["max_level_trace", "nested-values"] } diff --git a/below/model/Cargo.toml b/below/model/Cargo.toml index 2ffe11a2..bf8d33c6 100644 --- a/below/model/Cargo.toml +++ b/below/model/Cargo.toml @@ -20,7 +20,7 @@ gpu-stats = { package = "below-gpu-stats", version = "0.7.1", path = "../gpu_sta hostname = "0.3" os_info = "3.0.7" procfs = { package = "fb_procfs", version = "0.7.1", path = "../procfs" } -regex = "1.6.0" +regex = "1.9.2" serde = { version = "1.0.176", features = ["derive", "rc"] } serde_json = { version = "1.0.100", features = ["float_roundtrip", "unbounded_depth"] } slog = { version = "2.7", features = ["max_level_trace", "nested-values"] }