Skip to content

Commit

Permalink
Update regex and globset to pull in memory usage fixes
Browse files Browse the repository at this point in the history
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](rust-lang/regex#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](rust-lang/regex#1062) *"fix memory usage regression for RegexSet with capture groups"***

Reviewed By: zertosh

Differential Revision: D48095372

fbshipit-source-id: ec11c2bcaccbd26354d6d0a0398000134eaf3681
  • Loading branch information
David Tolnay authored and facebook-github-bot committed Aug 5, 2023
1 parent 6ab52f5 commit ca17a31
Show file tree
Hide file tree
Showing 29 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion eden/fs/cli_rs/edenfs-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fbthrift_socket = { version = "0.1.0", git = "https://github.com/facebookexperim
futures = { version = "0.3.28", features = ["async-await", "compat"] }
once_cell = "1.12"
pathdiff = "0.2"
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"] }
shlex = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/admin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ phases = { version = "0.1.0", path = "../phases" }
prefixblob = { version = "0.1.0", path = "../blobstore/prefixblob" }
pushrebase = { version = "0.1.0", path = "../pushrebase" }
redactedblobstore = { version = "0.1.0", path = "../blobstore/redactedblobstore" }
regex = "1.6.0"
regex = "1.9.2"
repo_blobstore = { version = "0.1.0", path = "../blobrepo/repo_blobstore" }
repo_derived_data = { version = "0.1.0", path = "../repo_attributes/repo_derived_data" }
repo_factory = { version = "0.1.0", path = "../repo_factory" }
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/cmdlib/mononoke_app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ observability = { version = "0.1.0", path = "../../observability" }
permission_checker = { version = "0.1.0", path = "../../permission_checker" }
prefixblob = { version = "0.1.0", path = "../../blobstore/prefixblob" }
redactedblobstore = { version = "0.1.0", path = "../../blobstore/redactedblobstore" }
regex = "1.6.0"
regex = "1.9.2"
rendezvous = { version = "0.1.0", path = "../../common/rendezvous" }
repo_factory = { version = "0.1.0", path = "../../repo_factory" }
running = { version = "0.1.0", path = "../../common/running" }
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/commit_rewriting/megarepo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ mononoke_types = { version = "0.1.0", path = "../../mononoke_types" }
movers = { version = "0.1.0", path = "../movers" }
phases = { version = "0.1.0", path = "../../phases" }
pushrebase = { version = "0.1.0", path = "../../pushrebase" }
regex = "1.6.0"
regex = "1.9.2"
repo_blobstore = { version = "0.1.0", path = "../../blobrepo/repo_blobstore" }
repo_derived_data = { version = "0.1.0", path = "../../repo_attributes/repo_derived_data" }
repo_identity = { version = "0.1.0", path = "../../repo_attributes/repo_identity" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ mononoke_api_types = { version = "0.1.0", path = "../../mononoke_api/types" }
mononoke_hg_sync_job_helper_lib = { version = "0.1.0", path = "../../mononoke_hg_sync_job" }
mononoke_types = { version = "0.1.0", path = "../../mononoke_types" }
mutable_counters = { version = "0.1.0", path = "../../mutable_counters" }
regex = "1.6.0"
regex = "1.9.2"
repo_blobstore = { version = "0.1.0", path = "../../blobrepo/repo_blobstore" }
repo_derived_data = { version = "0.1.0", path = "../../repo_attributes/repo_derived_data" }
repo_identity = { version = "0.1.0", path = "../../repo_attributes/repo_identity" }
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/common/copy_utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fsnodes = { version = "0.1.0", path = "../../derived_data/fsnodes" }
futures = { version = "0.3.28", features = ["async-await", "compat"] }
manifest = { version = "0.1.0", path = "../../manifest" }
mononoke_types = { version = "0.1.0", path = "../../mononoke_types" }
regex = "1.6.0"
regex = "1.9.2"
repo_blobstore = { version = "0.1.0", path = "../../blobrepo/repo_blobstore" }
repo_identity = { version = "0.1.0", path = "../../repo_attributes/repo_identity" }
slog = { version = "2.7", features = ["max_level_trace", "nested-values"] }
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/features/repo_update_logger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ mononoke_types = { version = "0.1.0", path = "../../mononoke_types" }
once_cell = "1.12"
permission_checker = { version = "0.1.0", path = "../../permission_checker" }
phases = { version = "0.1.0", path = "../../phases" }
regex = "1.6.0"
regex = "1.9.2"
repo_blobstore = { version = "0.1.0", path = "../../blobrepo/repo_blobstore" }
repo_identity = { version = "0.1.0", path = "../../repo_attributes/repo_identity" }
serde = { version = "1.0.176", features = ["derive", "rc"] }
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/git/git_types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ gix-object = "0.33"
manifest = { version = "0.1.0", path = "../../manifest" }
megarepo_error = { version = "0.1.0", path = "../../megarepo_api/megarepo_error" }
mononoke_types = { version = "0.1.0", path = "../../mononoke_types" }
regex = "1.6.0"
regex = "1.9.2"
sha1 = "0.10.5"
thiserror = "1.0.43"

Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/hooks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ mercurial_types = { version = "0.1.0", path = "../mercurial/types" }
metaconfig_types = { version = "0.1.0", path = "../metaconfig/types" }
mononoke_types = { version = "0.1.0", path = "../mononoke_types" }
permission_checker = { version = "0.1.0", path = "../permission_checker" }
regex = "1.6.0"
regex = "1.9.2"
scuba = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
scuba_ext = { version = "0.1.0", path = "../common/scuba_ext" }
serde = { version = "1.0.176", features = ["derive", "rc"] }
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/lfs_server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ qps = { version = "0.1.0", path = "../server/qps" }
rand = { version = "0.8", features = ["small_rng"] }
rate_limiting = { version = "0.1.0", path = "../rate_limiting" }
redactedblobstore = { version = "0.1.0", path = "../blobstore/redactedblobstore" }
regex = "1.6.0"
regex = "1.9.2"
repo_authorization = { version = "0.1.0", path = "../repo_authorization" }
repo_blobstore = { version = "0.1.0", path = "../blobrepo/repo_blobstore" }
repo_identity = { version = "0.1.0", path = "../repo_attributes/repo_identity" }
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/metaconfig/parser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ itertools = "0.10.3"
metaconfig_types = { version = "0.1.0", path = "../types" }
mononoke_types = { version = "0.1.0", path = "../../mononoke_types" }
nonzero_ext = "0.2"
regex = "1.6.0"
regex = "1.9.2"
repo_name = { version = "0.1.0", path = "../../../scm/lib/repo_name" }
repos = { version = "0.1.0", path = "../../../../configerator/structs/scm/mononoke/repos/repos" }
serde = { version = "1.0.176", features = ["derive", "rc"] }
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/metaconfig/types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ derive_more = "0.99.17"
facet = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
mononoke_types = { version = "0.1.0", path = "../../mononoke_types" }
mysql_common = "0.26.0"
regex = "1.6.0"
regex = "1.9.2"
scuba = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
serde = { version = "1.0.176", features = ["derive", "rc"] }
serde_derive = "1.0.176"
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/mononoke_api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ phases = { version = "0.1.0", path = "../phases" }
pushrebase = { version = "0.1.0", path = "../pushrebase" }
pushrebase_client = { version = "0.1.0", path = "../pushrebase/client" }
pushrebase_mutation_mapping = { version = "0.1.0", path = "../pushrebase_mutation_mapping" }
regex = "1.6.0"
regex = "1.9.2"
repo_authorization = { version = "0.1.0", path = "../repo_authorization" }
repo_blobstore = { version = "0.1.0", path = "../blobrepo/repo_blobstore" }
repo_bookmark_attrs = { version = "0.1.0", path = "../repo_attributes/repo_bookmark_attrs" }
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/mononoke_hg_sync_job/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ metaconfig_types = { version = "0.1.0", path = "../metaconfig/types" }
mononoke_types = { version = "0.1.0", path = "../mononoke_types" }
mutable_counters = { version = "0.1.0", path = "../mutable_counters" }
once_cell = "1.12"
regex = "1.6.0"
regex = "1.9.2"
repo_blobstore = { version = "0.1.0", path = "../blobrepo/repo_blobstore" }
repo_derived_data = { version = "0.1.0", path = "../repo_attributes/repo_derived_data" }
repo_identity = { version = "0.1.0", path = "../repo_attributes/repo_identity" }
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/mononoke_types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ nonzero_ext = "0.2"
once_cell = "1.12"
quickcheck = "1.0"
quickcheck_arbitrary_derive = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
regex = "1.6.0"
regex = "1.9.2"
serde = { version = "1.0.176", features = ["derive", "rc"] }
serde_derive = "1.0.176"
sha1 = "0.10.5"
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/observability/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ license = "GPLv2+"
anyhow = "1.0.71"
cached_config = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
observability_config = { version = "0.1.0", path = "../../../configerator/structs/scm/mononoke/observability" }
regex = "1.6.0"
regex = "1.9.2"
scuba = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
serde = { version = "1.0.176", features = ["derive", "rc"] }
slog = { version = "2.7", features = ["max_level_trace", "nested-values"] }
2 changes: 1 addition & 1 deletion eden/mononoke/pushrebase/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ context = { version = "0.1.0", path = "../../server/context" }
hooks = { version = "0.1.0", path = "../../hooks" }
mononoke_types = { version = "0.1.0", path = "../../mononoke_types" }
pushrebase = { version = "0.1.0", path = ".." }
regex = "1.6.0"
regex = "1.9.2"
repo_authorization = { version = "0.1.0", path = "../../repo_authorization" }
repo_identity = { version = "0.1.0", path = "../../repo_attributes/repo_identity" }
2 changes: 1 addition & 1 deletion eden/mononoke/repo_client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ percent-encoding = "2.1"
phases = { version = "0.1.0", path = "../phases" }
rand = { version = "0.8", features = ["small_rng"] }
rate_limiting = { version = "0.1.0", path = "../rate_limiting" }
regex = "1.6.0"
regex = "1.9.2"
remotefilelog = { version = "0.1.0", path = "remotefilelog" }
repo_authorization = { version = "0.1.0", path = "../repo_authorization" }
repo_blobstore = { version = "0.1.0", path = "../blobrepo/repo_blobstore" }
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/repo_factory/test_repo_factory/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ newfilenodes = { version = "0.1.0", path = "../../newfilenodes" }
phases = { version = "0.1.0", path = "../../phases" }
pushrebase_mutation_mapping = { version = "0.1.0", path = "../../pushrebase_mutation_mapping" }
redactedblobstore = { version = "0.1.0", path = "../../blobstore/redactedblobstore" }
regex = "1.6.0"
regex = "1.9.2"
rendezvous = { version = "0.1.0", path = "../../common/rendezvous" }
repo_blobstore = { version = "0.1.0", path = "../../blobrepo/repo_blobstore" }
repo_bookmark_attrs = { version = "0.1.0", path = "../../repo_attributes/repo_bookmark_attrs" }
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/tools/admin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ pushrebase_mutation_mapping = { version = "0.1.0", path = "../../pushrebase_muta
question = "0.2.2"
redactedblobstore = { version = "0.1.0", path = "../../blobstore/redactedblobstore" }
redaction = { version = "0.1.0", path = "../../features/redaction" }
regex = "1.6.0"
regex = "1.9.2"
rendezvous = { version = "0.1.0", path = "../../common/rendezvous" }
repo_blobstore = { version = "0.1.0", path = "../../blobrepo/repo_blobstore" }
repo_bookmark_attrs = { version = "0.1.0", path = "../../repo_attributes/repo_bookmark_attrs" }
Expand Down
2 changes: 1 addition & 1 deletion eden/mononoke/walker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ once_cell = "1.12"
paste = "1.0.13"
percent-encoding = "2.1"
phases = { version = "0.1.0", path = "../phases" }
regex = "1.6.0"
regex = "1.9.2"
repo_blobstore = { version = "0.1.0", path = "../blobrepo/repo_blobstore" }
repo_factory = { version = "0.1.0", path = "../repo_factory" }
repo_identity = { version = "0.1.0", path = "../repo_attributes/repo_identity" }
Expand Down
2 changes: 1 addition & 1 deletion eden/scm/lib/commitcloudsubscriber/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ lazy_static = "1.4"
log = { version = "0.4.17", features = ["kv_unstable", "kv_unstable_std"] }
mime = "0.3.14"
parking_lot = { version = "0.12.1", features = ["send_guard"] }
regex = "1.6.0"
regex = "1.9.2"
reqwest = { version = "0.11.18", features = ["blocking", "cookies", "json", "multipart", "native-tls", "rustls-tls", "rustls-tls-native-roots", "stream"] }
reqwest-eventsource = "0.4.0"
rust-ini = { version = "0.17", features = ["inline-comment"] }
Expand Down
2 changes: 1 addition & 1 deletion eden/scm/lib/config/loader/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ hostname = "0.3"
http-client = { version = "0.1.0", path = "../../http-client", optional = true }
identity = { version = "0.1.0", path = "../../identity" }
minibytes = { version = "0.1.0", path = "../../minibytes" }
regex = { version = "1.6.0", optional = true }
regex = { version = "1.9.2", optional = true }
serde = { version = "1.0.176", features = ["derive", "rc"], optional = true }
serde_json = { version = "1.0.100", features = ["float_roundtrip", "unbounded_depth"], optional = true }
serde_urlencoded = { version = "0.7", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion eden/scm/lib/http-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ openssl = "0.10.55"
parking_lot = { version = "0.12.1", features = ["send_guard"] }
paste = "1.0.13"
pin-project = "0.4.30"
regex = "1.6.0"
regex = "1.9.2"
serde = { version = "1.0.176", features = ["derive", "rc"] }
serde_cbor = "0.11"
serde_json = { version = "1.0.100", features = ["float_roundtrip", "unbounded_depth"] }
Expand Down
2 changes: 1 addition & 1 deletion eden/scm/lib/pathmatcher/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2021"
[dependencies]
anyhow = "1.0.71"
bitflags = "1.3"
globset = { version = "0.4.12", features = ["serde1"] }
globset = { version = "0.4.13", features = ["serde1"] }
ignore = "0.4"
parking_lot = { version = "0.12.1", features = ["send_guard"] }
regex-automata = "0.1"
Expand Down
2 changes: 1 addition & 1 deletion eden/scm/lib/revisionstore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ progress-model = { version = "0.1.0", path = "../progress/model" }
quickcheck = "1.0"
quickcheck_arbitrary_derive = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
rand = { version = "0.8", features = ["small_rng"] }
regex = "1.6.0"
regex = "1.9.2"
repo_name = { version = "0.1.0", path = "../repo_name" }
revisionstore_types = { version = "0.1.0", path = "types" }
serde = { version = "1.0.176", features = ["derive", "rc"] }
Expand Down
4 changes: 2 additions & 2 deletions eden/scm/lib/sparse/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ edition = "2021"
[dependencies]
anyhow = "1.0.71"
futures = { version = "0.3.28", features = ["async-await", "compat"] }
globset = { version = "0.4.12", features = ["serde1"] }
globset = { version = "0.4.13", features = ["serde1"] }
once_cell = "1.12"
pathmatcher = { version = "0.1.0", path = "../pathmatcher" }
regex = "1.6.0"
regex = "1.9.2"
thiserror = "1.0.43"
tracing = "0.1.35"
types = { version = "0.1.0", path = "../types" }
Expand Down
2 changes: 1 addition & 1 deletion eden/scm/lib/third-party/streampager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ indexmap = { version = "1.9.2", features = ["arbitrary", "rayon", "serde-1"] }
lazy_static = "1.4"
lru = "0.10.0"
memmap2 = "0.5.10"
regex = "1.6.0"
regex = "1.9.2"
scopeguard = "1.0.0"
serde = { version = "1.0.176", features = ["derive", "rc"] }
smallvec = { version = "1.6.1", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion eden/scm/lib/tracing-runtime-callsite/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ parking_lot = { version = "0.12.1", features = ["send_guard"] }
tracing = "0.1.35"

[dev-dependencies]
regex = "1.6.0"
regex = "1.9.2"

0 comments on commit ca17a31

Please sign in to comment.