From 3e71860661fd6da212400b9a02c3242452f7e33e Mon Sep 17 00:00:00 2001 From: "riseproject-dev[bot]" <330740410+riseproject-dev[bot]@users.noreply.github.com> Date: Wed, 23 Sep 2026 07:28:21 +0000 Subject: [PATCH 1/2] pyroscope-io: Add version 1.2.4 Signed-off-by: riseproject-dev[bot] <330740410+riseproject-dev[bot]@users.noreply.github.com> --- docs/packages/pyroscope-io.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/packages/pyroscope-io.yaml b/docs/packages/pyroscope-io.yaml index 2598e66575b..28e7a099685 100644 --- a/docs/packages/pyroscope-io.yaml +++ b/docs/packages/pyroscope-io.yaml @@ -41,3 +41,4 @@ versions: - filename: pyroscope_io-1.2.3-cp314-cp314-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl sha256: 86065a4ba38264fa0e15b4930033988b5f73c98bce4e7ec7a4b3639d799951b9 requires-python: '>=3.10' +- version: 1.2.4 From f379736bf441ed327cc89d00e868310dad252688 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Thu, 24 Sep 2026 07:12:23 +0000 Subject: [PATCH 2/2] pyroscope-io: carry patches and rust-version bump forward to 1.2.4 The nightly-upgrade bot bumped docs/packages/pyroscope-io.yaml to 1.2.4 but did not copy patches/pyroscope-io// forward, so CI failed trying to apply a patch from a directory that doesn't exist. Both patches still apply as-is against 1.2.4: the py-spy git dependency pinned in rust/Cargo.toml moved from rev 8065105 to d6fe739, but the target line in rust/python_bindings/mod.rs that 0002 touches is unchanged between the two revisions, and the Cargo.lock/Cargo.toml context that 0001 touches only differs in that pinned rev. Verified both apply cleanly and that py-spy now compiles for riscv64 against the new pairing. Upstream also bumped its own RUST_VERSION pin from 1.96.0 to 1.98.0 between 1.2.3 and 1.2.4 (docker/wheel.Dockerfile), matching a rust-version bump in rust/Cargo.toml; without it cargo refuses to build. Mirror that bump in before-all.sh. --- .github/workflows/build-pyroscope-io.yml | 2 +- ...-spy-from-a-locally-patched-checkout.patch | 51 +++++++++++++++++++ ...-no-tstate_current-offset-on-riscv64.patch | 37 ++++++++++++++ 3 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 patches/pyroscope-io/1.2.4/0001-cargo-build-py-spy-from-a-locally-patched-checkout.patch create mode 100644 patches/pyroscope-io/1.2.4/0002-python_bindings-return-no-tstate_current-offset-on-riscv64.patch diff --git a/.github/workflows/build-pyroscope-io.yml b/.github/workflows/build-pyroscope-io.yml index fbfb078a096..d4551e9d0d7 100644 --- a/.github/workflows/build-pyroscope-io.yml +++ b/.github/workflows/build-pyroscope-io.yml @@ -95,7 +95,7 @@ jobs: set -euxo pipefail OPENSSL_VERSION=3.5.7 - RUST_VERSION=1.96.0 + RUST_VERSION=1.98.0 # libstdc++-static is added to upstream's list: build.rs links the C++ memalloc # profiler statically and Rocky 10 keeps libstdc++.a out of the default install. diff --git a/patches/pyroscope-io/1.2.4/0001-cargo-build-py-spy-from-a-locally-patched-checkout.patch b/patches/pyroscope-io/1.2.4/0001-cargo-build-py-spy-from-a-locally-patched-checkout.patch new file mode 100644 index 00000000000..5e90469dd6b --- /dev/null +++ b/patches/pyroscope-io/1.2.4/0001-cargo-build-py-spy-from-a-locally-patched-checkout.patch @@ -0,0 +1,51 @@ +From c57a63ff84704938c7609c0b380232d4d432c25d Mon Sep 17 00:00:00 2001 +From: Ludovic Henry +Date: Fri, 18 Sep 2026 06:43:06 +0000 +Subject: [PATCH] cargo: build py-spy from a locally patched checkout + +py-spy does not compile for riscv64: pyruntime::get_tstate_current_offset +is defined once per architecture and riscv64 matches none of the arms, so +the build fails with + + error[E0425]: cannot find function `get_tstate_current_offset` in module `pyruntime` + +py-spy is pulled in as a git dependency pinned to a revision, so the fix +cannot be applied in place. Redirect the git source to a checkout of that +same revision carrying the one-line riscv64 addition, see +0002-python_bindings-return-no-tstate_current-offset-on-riscv64.patch. + +Only the source line of the py-spy entry changes in Cargo.lock, so every +other dependency stays pinned exactly as upstream released it and the +build keeps running with --locked. + +Upstream-Status: Inappropriate [redirects a pinned dependency to a local checkout; the fix itself belongs in py-spy] + +Signed-off-by: Ludovic Henry +--- + rust/Cargo.lock | 1 - + rust/Cargo.toml | 3 +++ + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/rust/Cargo.lock b/rust/Cargo.lock +index ce22bb2..9e45d4e 100644 +--- a/rust/Cargo.lock ++++ b/rust/Cargo.lock +@@ -1180,7 +1180,6 @@ dependencies = [ + [[package]] + name = "py-spy" + version = "0.4.2" +-source = "git+https://github.com/grafana/pyroscope-py-spy?rev=d6fe739#d6fe739cf600d74279817d8eb0e5192b73d75d27" + dependencies = [ + "anyhow", + "chrono", +diff --git a/rust/Cargo.toml b/rust/Cargo.toml +index 52c429a..3fc66d4 100644 +--- a/rust/Cargo.toml ++++ b/rust/Cargo.toml +@@ -32,3 +32,6 @@ cmake = "0.1" + [features] + default = [] + memory = [] ++ ++[patch."https://github.com/grafana/pyroscope-py-spy"] ++py-spy = { path = "../py-spy" } diff --git a/patches/pyroscope-io/1.2.4/0002-python_bindings-return-no-tstate_current-offset-on-riscv64.patch b/patches/pyroscope-io/1.2.4/0002-python_bindings-return-no-tstate_current-offset-on-riscv64.patch new file mode 100644 index 00000000000..43854e05878 --- /dev/null +++ b/patches/pyroscope-io/1.2.4/0002-python_bindings-return-no-tstate_current-offset-on-riscv64.patch @@ -0,0 +1,37 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ludovic Henry +Date: Thu, 27 Aug 2026 00:00:00 +0000 +Subject: [PATCH] python_bindings: return no tstate_current offset on riscv64 + +Applied to the py-spy checkout that pyroscope-python pins as a git +dependency. + +pyruntime::get_tstate_current_offset has one definition per architecture +and riscv64 matches none of them, so any riscv64 build of py-spy fails to +compile: + + error[E0425]: cannot find function `get_tstate_current_offset` in module `pyruntime` + +Add riscv64 to the arm that returns None, the same answer powerpc, powerpc64 +and mips give. The offset is only consulted for CPython 3.7 to 3.11, where +the caller already handles None by reporting an unknown offset; 3.12 and +later read the GIL through a struct offset instead. + +Upstream-Status: To upstream [targets the py-spy dependency rather than pyroscope-python; not yet submitted to benfred/py-spy] + +Signed-off-by: Ludovic Henry +--- +diff --git a/src/python_bindings/mod.rs b/src/python_bindings/mod.rs +index 772e4de..df9e4cb 100644 +--- a/src/python_bindings/mod.rs ++++ b/src/python_bindings/mod.rs +@@ -195,7 +195,8 @@ pub mod pyruntime { + any( + target_arch = "powerpc64", + target_arch = "powerpc", +- target_arch = "mips" ++ target_arch = "mips", ++ target_arch = "riscv64" + ) + ))] + pub fn get_tstate_current_offset(version: &Version) -> Option {