From 566f75ff8d7c1ac272a7e71011187340ca1bad07 Mon Sep 17 00:00:00 2001 From: hanabi1224 Date: Fri, 5 Jun 2026 04:25:53 +0800 Subject: [PATCH 1/3] fix: critical memory leak in quick_cache --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6147f0faf96..fe76670225b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3355,7 +3355,7 @@ dependencies = [ "puruspe", "quick-protobuf", "quick-protobuf-codec", - "quick_cache", + "quick_cache_memleak_fix", "quickcheck", "quickcheck_macros", "rand 0.8.6", @@ -7473,10 +7473,10 @@ dependencies = [ ] [[package]] -name = "quick_cache" -version = "0.6.22" +name = "quick_cache_memleak_fix" +version = "0.6.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1c821816e9b928e20e92ed59bb3ac4aab321d16ca2316871c9fe7ca739cd477" +checksum = "206a5ac54e1246374c7f581c79b8b4467d42571b290f16cd4f9405c1647f38c1" dependencies = [ "ahash", "equivalent", diff --git a/Cargo.toml b/Cargo.toml index 5f950d69320..4def6cb6710 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -180,7 +180,7 @@ prometheus-client = "0.23" puruspe = "0.4" quick-protobuf = "0.8" quick-protobuf-codec = "0.3" -quick_cache = { version = "0.6", features = ["stats"] } +quick_cache = { package = "quick_cache_memleak_fix", version = "0.6", features = ["stats"] } rand = "0.8" rand_chacha = "0.3" rand_distr = "0.4" From 2a232b47790161d8d5811a79a9cc92d4ab1f5a97 Mon Sep 17 00:00:00 2001 From: hanabi1224 Date: Fri, 5 Jun 2026 04:35:17 +0800 Subject: [PATCH 2/3] changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57daa70cb20..0c3e6a1bd24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,8 @@ ### Fixed +- [#7143](https://github.com/ChainSafe/forest/pull/7143): Fixed a critical memory leak in `quick_cache`. + ## Forest v0.33.5 "Drift" Non-mandatory release for all node operators. It includes a few bug fixes as well as performance improvements for JSON-RPC calls, especially for batch requests. From 8d2b353123f27b7141bce63a73c72bbbf7e6c2e2 Mon Sep 17 00:00:00 2001 From: hanabi1224 Date: Fri, 5 Jun 2026 12:10:41 +0800 Subject: [PATCH 3/3] switch back to quick_cache@0.6.23 --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fe76670225b..0a6fcfd8ae0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3355,7 +3355,7 @@ dependencies = [ "puruspe", "quick-protobuf", "quick-protobuf-codec", - "quick_cache_memleak_fix", + "quick_cache", "quickcheck", "quickcheck_macros", "rand 0.8.6", @@ -7473,10 +7473,10 @@ dependencies = [ ] [[package]] -name = "quick_cache_memleak_fix" +name = "quick_cache" version = "0.6.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206a5ac54e1246374c7f581c79b8b4467d42571b290f16cd4f9405c1647f38c1" +checksum = "3a3db184a8b66cfe87f0263a1de147a6b554c864d1767c6f7fa4eb0e5497b565" dependencies = [ "ahash", "equivalent", diff --git a/Cargo.toml b/Cargo.toml index 4def6cb6710..5f950d69320 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -180,7 +180,7 @@ prometheus-client = "0.23" puruspe = "0.4" quick-protobuf = "0.8" quick-protobuf-codec = "0.3" -quick_cache = { package = "quick_cache_memleak_fix", version = "0.6", features = ["stats"] } +quick_cache = { version = "0.6", features = ["stats"] } rand = "0.8" rand_chacha = "0.3" rand_distr = "0.4"