chore(deps): bump the dependencies group with 6 updates (#3151)

* chore(deps): bump the dependencies group with 6 updates

Bumps the dependencies group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [hyper](https://github.com/hyperium/hyper) | `1.10.0` | `1.10.1` |
| [serial_test](https://github.com/palfrey/serial_test) | `3.4.0` | `3.5.0` |
| [snafu](https://github.com/shepmaster/snafu) | `0.9.0` | `0.9.1` |
| [uuid](https://github.com/uuid-rs/uuid) | `1.23.1` | `1.23.2` |
| [dial9-tokio-telemetry](https://github.com/dial9-rs/dial9-tokio-telemetry) | `0.3.12` | `0.3.13` |
| [pyroscope](https://github.com/grafana/pyroscope-rs) | `2.0.5` | `2.0.6` |


Updates `hyper` from 1.10.0 to 1.10.1
- [Release notes](https://github.com/hyperium/hyper/releases)
- [Changelog](https://github.com/hyperium/hyper/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/hyper/compare/v1.10.0...v1.10.1)

Updates `serial_test` from 3.4.0 to 3.5.0
- [Release notes](https://github.com/palfrey/serial_test/releases)
- [Commits](https://github.com/palfrey/serial_test/compare/v3.4.0...v3.5.0)

Updates `snafu` from 0.9.0 to 0.9.1
- [Changelog](https://github.com/shepmaster/snafu/blob/main/CHANGELOG.md)
- [Commits](https://github.com/shepmaster/snafu/compare/0.9.0...0.9.1)

Updates `uuid` from 1.23.1 to 1.23.2
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/v1.23.1...v1.23.2)

Updates `dial9-tokio-telemetry` from 0.3.12 to 0.3.13
- [Release notes](https://github.com/dial9-rs/dial9-tokio-telemetry/releases)
- [Changelog](https://github.com/dial9-rs/dial9/blob/main/CHANGELOG.md)
- [Commits](https://github.com/dial9-rs/dial9-tokio-telemetry/compare/dial9-tokio-telemetry-v0.3.12...dial9-tokio-telemetry-v0.3.13)

Updates `pyroscope` from 2.0.5 to 2.0.6
- [Release notes](https://github.com/grafana/pyroscope-rs/releases)
- [Changelog](https://github.com/grafana/pyroscope-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/grafana/pyroscope-rs/compare/lib-2.0.5...lib-2.0.6)

---
updated-dependencies:
- dependency-name: hyper
  dependency-version: 1.10.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: serial_test
  dependency-version: 3.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: snafu
  dependency-version: 0.9.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: uuid
  dependency-version: 1.23.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: dial9-tokio-telemetry
  dependency-version: 0.3.13
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: pyroscope
  dependency-version: 2.0.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix(profiling): pin pyroscope to 2.0.5, add jemalloc memory profiling, unify platform gates

Pin pyroscope to =2.0.5 to avoid duplicate `perf_signal_handler` symbol
caused by 2.0.6 vendoring pprof-rs internally. 2.0.5 depends on external
pprof-pyroscope-fork (v0.1500.4), which Cargo unifies with the workspace's
pprof-pyroscope-fork — a single symbol instance, no linker collision.

Add jemalloc_backend for continuous memory profiling export to Pyroscope,
alongside the existing pprof-based CPU profiling. Both CPU and memory
profiling now work on linux and macos.

Unify platform gates from `cfg(all(target_os = "linux", target_env = "gnu",
target_arch = "x86_64"))` to `cfg(any(target_os = "linux",
target_os = "macos"))`, switching macOS global allocator from mimalloc to
jemalloc.

* style: format cfg attributes in allocator_reclaim.rs

* chore(deps): ignore pyroscope 2.x in dependabot, add profile_type tag

Add pyroscope 2.x to dependabot ignore list to prevent auto-upgrade
past 2.0.5 (>=2.0.6 vendors pprof-rs, causing duplicate symbol conflict).

Add profile_type=cpu tag to CPU profiling agent for differentiation
from memory profiling agent in Pyroscope UI.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: houseme <housemecn@gmail.com>
This commit is contained in:
dependabot[bot]
2026-06-01 15:21:47 +08:00
committed by GitHub
parent 4d2f13af6f
commit cbb6f9c76f
13 changed files with 167 additions and 107 deletions
+3 -3
View File
@@ -173,12 +173,12 @@ hashbrown = { workspace = true }
[target.'cfg(target_os = "linux")'.dependencies]
libsystemd.workspace = true
[target.'cfg(not(all(target_os = "linux", target_env = "gnu", target_arch = "x86_64")))'.dependencies]
[target.'cfg(not(any(target_os = "linux", target_os = "macos")))'.dependencies]
mimalloc = { workspace = true }
libmimalloc-sys = { version = "0.1.49", features = ["extended"] }
# Only enable pprof-based profiling on linux + gnu + x86_64.
[target.'cfg(all(target_os = "linux", target_env = "gnu", target_arch = "x86_64"))'.dependencies]
# jemalloc + pprof-based profiling on linux and macos.
[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies]
tikv-jemallocator = { workspace = true }
tikv-jemalloc-ctl = { workspace = true }
jemalloc_pprof = { workspace = true }
+6 -6
View File
@@ -15,10 +15,10 @@
use crate::admin::{auth::validate_admin_request, router::Operation};
use crate::auth::{check_key_valid, get_session_token};
use crate::server::RemoteAddr;
#[cfg(all(target_os = "linux", target_env = "gnu", target_arch = "x86_64"))]
#[cfg(any(target_os = "linux", target_os = "macos"))]
use http::HeaderMap;
use http::StatusCode;
#[cfg(all(target_os = "linux", target_env = "gnu", target_arch = "x86_64"))]
#[cfg(any(target_os = "linux", target_os = "macos"))]
use http::header::CONTENT_TYPE;
use matchit::Params;
use rustfs_policy::policy::action::{Action, AdminAction};
@@ -52,7 +52,7 @@ impl Operation for TriggerProfileCPU {
authorize_profile_request(&req).await?;
info!("Triggering CPU profile dump via S3 request...");
#[cfg(not(all(target_os = "linux", target_env = "gnu", target_arch = "x86_64")))]
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
{
return Ok(S3Response::new((
StatusCode::NOT_IMPLEMENTED,
@@ -64,7 +64,7 @@ impl Operation for TriggerProfileCPU {
)));
}
#[cfg(all(target_os = "linux", target_env = "gnu", target_arch = "x86_64"))]
#[cfg(any(target_os = "linux", target_os = "macos"))]
{
let dur = std::time::Duration::from_secs(60);
match crate::profiling::dump_cpu_pprof_for(dur).await {
@@ -86,7 +86,7 @@ impl Operation for TriggerProfileMemory {
authorize_profile_request(&req).await?;
info!("Triggering Memory profile dump via S3 request...");
#[cfg(not(all(target_os = "linux", target_env = "gnu", target_arch = "x86_64")))]
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
{
return Ok(S3Response::new((
StatusCode::NOT_IMPLEMENTED,
@@ -94,7 +94,7 @@ impl Operation for TriggerProfileMemory {
)));
}
#[cfg(all(target_os = "linux", target_env = "gnu", target_arch = "x86_64"))]
#[cfg(any(target_os = "linux", target_os = "macos"))]
{
match crate::profiling::dump_memory_pprof_now().await {
Ok(path) => {
+5 -5
View File
@@ -70,7 +70,7 @@ impl Operation for ProfileHandler {
async fn call(&self, req: S3Request<Body>, _params: Params<'_, '_>) -> S3Result<S3Response<(StatusCode, Body)>> {
authorize_profile_request(&req).await?;
#[cfg(not(all(target_os = "linux", target_env = "gnu", target_arch = "x86_64")))]
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
{
let requested_url = req.uri.to_string();
let target_os = std::env::consts::OS;
@@ -82,7 +82,7 @@ impl Operation for ProfileHandler {
return Ok(S3Response::new((StatusCode::NOT_IMPLEMENTED, Body::from(msg))));
}
#[cfg(all(target_os = "linux", target_env = "gnu", target_arch = "x86_64"))]
#[cfg(any(target_os = "linux", target_os = "macos"))]
{
use rustfs_config::{DEFAULT_CPU_FREQ, ENV_CPU_FREQ};
use rustfs_utils::get_env_usize;
@@ -172,9 +172,9 @@ impl Operation for ProfileStatusHandler {
async fn call(&self, req: S3Request<Body>, _params: Params<'_, '_>) -> S3Result<S3Response<(StatusCode, Body)>> {
authorize_profile_request(&req).await?;
#[cfg(not(all(target_os = "linux", target_env = "gnu", target_arch = "x86_64")))]
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
let message = format!("CPU profiling is not supported on {} platform", std::env::consts::OS);
#[cfg(not(all(target_os = "linux", target_env = "gnu", target_arch = "x86_64")))]
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
let status = HashMap::from([
("enabled", "false"),
("status", "not_supported"),
@@ -182,7 +182,7 @@ impl Operation for ProfileStatusHandler {
("message", message.as_str()),
]);
#[cfg(all(target_os = "linux", target_env = "gnu", target_arch = "x86_64"))]
#[cfg(any(target_os = "linux", target_os = "macos"))]
let status = {
use rustfs_config::{DEFAULT_ENABLE_PROFILING, ENV_ENABLE_PROFILING};
use rustfs_utils::get_env_bool;
+4 -11
View File
@@ -18,15 +18,12 @@ use tokio_util::sync::CancellationToken;
use tracing::{debug, warn};
pub fn allocator_backend() -> &'static str {
#[cfg(all(target_os = "linux", target_env = "gnu", target_arch = "x86_64"))]
#[cfg(any(target_os = "linux", target_os = "macos"))]
{
"jemalloc"
}
#[cfg(all(
not(target_os = "windows"),
not(all(target_os = "linux", target_env = "gnu", target_arch = "x86_64"))
))]
#[cfg(all(not(target_os = "windows"), not(any(target_os = "linux", target_os = "macos"))))]
{
"mimalloc"
}
@@ -85,10 +82,7 @@ fn reclaimable_work_snapshot() -> ReclaimableWorkSnapshot {
}
}
#[cfg(all(
not(target_os = "windows"),
not(all(target_os = "linux", target_env = "gnu", target_arch = "x86_64"))
))]
#[cfg(all(not(target_os = "windows"), not(any(target_os = "linux", target_os = "macos"))))]
#[allow(unsafe_code)]
fn collect_allocator_memory(force: bool) -> Result<(), String> {
// SAFETY: `mi_collect` is provided by the active global allocator backend
@@ -100,9 +94,8 @@ fn collect_allocator_memory(force: bool) -> Result<(), String> {
Ok(())
}
#[cfg(all(target_os = "linux", target_env = "gnu", target_arch = "x86_64"))]
#[cfg(any(target_os = "linux", target_os = "macos"))]
fn collect_allocator_memory(_force: bool) -> Result<(), String> {
#[cfg(not(target_os = "macos"))]
let _ = tikv_jemalloc_ctl::background_thread::write(true);
tikv_jemalloc_ctl::epoch::advance().map_err(|err| err.to_string())?;
Ok(())
+2 -2
View File
@@ -73,11 +73,11 @@ const ENV_SCANNER_ENABLED: &str = "RUSTFS_SCANNER_ENABLED";
const ENV_SCANNER_ENABLED_DEPRECATED: &str = "RUSTFS_ENABLE_SCANNER";
const ENV_HEAL_ENABLED: &str = "RUSTFS_HEAL_ENABLED";
const ENV_HEAL_ENABLED_DEPRECATED: &str = "RUSTFS_ENABLE_HEAL";
#[cfg(all(target_os = "linux", target_env = "gnu", target_arch = "x86_64"))]
#[cfg(any(target_os = "linux", target_os = "macos"))]
#[global_allocator]
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
#[cfg(not(all(target_os = "linux", target_env = "gnu", target_arch = "x86_64")))]
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
+4 -4
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#[cfg(not(all(target_os = "linux", target_env = "gnu", target_arch = "x86_64")))]
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
mod unsupported_impl {
use std::path::PathBuf;
use std::time::Duration;
@@ -57,10 +57,10 @@ mod unsupported_impl {
}
}
#[cfg(not(all(target_os = "linux", target_env = "gnu", target_arch = "x86_64")))]
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
pub use unsupported_impl::{dump_cpu_pprof_for, dump_memory_pprof_now, init_from_env, shutdown_profiling};
#[cfg(all(target_os = "linux", target_env = "gnu", target_arch = "x86_64"))]
#[cfg(any(target_os = "linux", target_os = "macos"))]
mod linux_impl {
use jemalloc_pprof::PROF_CTL;
use pprof::protos::Message;
@@ -369,5 +369,5 @@ mod linux_impl {
}
}
#[cfg(all(target_os = "linux", target_env = "gnu", target_arch = "x86_64"))]
#[cfg(any(target_os = "linux", target_os = "macos"))]
pub use linux_impl::{dump_cpu_pprof_for, dump_memory_pprof_now, init_from_env, shutdown_profiling};