Description
Hello,
I’m reporting a reproducible segmentation fault (SIGSEGV) observed when using pyroscope-io 0.8.11 from pypi on Python 3.11 under Linux.
The issue was investigated using a core dump and GDB, and the crash consistently occurs inside the native extension shipped with the package.
Environment
Python: 3.11.14
OS: Linux x86_64 (Docker container)
pyroscope-io version: 0.8.11, 0.8.14
Workload: Celery worker (prefork, high concurrency)
Observed behavior
Randomly, the Python process crashes with a SIGSEGV.
The crash does not originate from Python code but from native code.
Core dump analysis shows that the failing code comes from the pyroscope native extension:
pyroscope/_native__lib.cpython-39-x86_64-linux-gnu.so
This extension is loaded while running Python 3.11.
Crash evidence (excerpt)
Program terminated with signal SIGSEGV, Segmentation fault.
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=11, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
grafana/pyroscope-rs#1 0x00007fedc017e9ff in __pthread_kill_internal (threadid=<optimized out>, signo=11) at ./nptl/pthread_kill.c:89
grafana/pyroscope-rs#2 0x00007fedc0129cc2 in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26
grafana/pyroscope-rs#3 <signal handler called>
grafana/pyroscope-rs#4 0x00007fedc018d262 in __GI___libc_free (mem=0x18) at ./malloc/malloc.c:3453
grafana/pyroscope-rs#5 0x00007fed6f7f432c in anyhow::error::object_drop () from /usr/local/lib/python3.11/site-packages/pyroscope/_native__lib.cpython-39-x86_64-linux-gnu.so
grafana/pyroscope-rs#6 0x00007fed6f85b887 in std::sys::backtrace::__rust_begin_short_backtrace () from /usr/local/lib/python3.11/site-packages/pyroscope/_native__lib.cpython-39-x86_64-linux-gnu.so
grafana/pyroscope-rs#7 0x00007fed6f8645e4 in core::ops::function::FnOnce::call_once{{vtable.shim}} ()
from /usr/local/lib/python3.11/site-packages/pyroscope/_native__lib.cpython-39-x86_64-linux-gnu.so
grafana/pyroscope-rs#8 0x00007fed6fa1b67b in std::sys::pal::unix::thread::Thread::new::thread_start ()
The crash happens during object destruction (Drop) inside the Rust native code.
Suspected cause
The native extension shipped in pyroscope-io 0.8.11 is named:
_native__lib.cpython-39-x86_64-linux-gnu.so
When used with Python 3.11, this suggests a potential ABI mismatch (3.9/3.11) between the interpreter and the compiled extension.
The wheel published for Linux is tagged as: py2.py3-none-manylinux
which allows it to be installed on Python 3.11 without warning, even though it contains a CPython-version-specific .so.
Based on the crash pattern, this looks consistent with an ABI incompatibility.
Additional note
I also checked pyroscope-io 0.8.14, and the Linux wheel still contains the same native extension:
_native__lib.cpython-39-x86_64-linux-gnu.so
I am currently testing version 0.8.14, but the packaging seems unchanged in this regard.
EDIT: Same crash with version 0.8.14
Summary
pyroscope-io 0.8.11 and pyroscope-io 0.8.14 crashes with SIGSEGV on Python 3.11.
The crash occurs in the native Rust extension.
The extension is built for CPython 3.9 but loaded on Python 3.11.
An ABI mismatch seems a plausible root cause.
The Linux wheel metadata allows this situation silently.
I hope this report helps; I can provide more details (core dump, full backtrace) if needed.
Thanks.
Description
Hello,
I’m reporting a reproducible segmentation fault (SIGSEGV) observed when using pyroscope-io 0.8.11 from pypi on Python 3.11 under Linux.
The issue was investigated using a core dump and GDB, and the crash consistently occurs inside the native extension shipped with the package.
Environment
Python: 3.11.14
OS: Linux x86_64 (Docker container)
pyroscope-io version: 0.8.11, 0.8.14
Workload: Celery worker (prefork, high concurrency)
Observed behavior
Randomly, the Python process crashes with a SIGSEGV.
The crash does not originate from Python code but from native code.
Core dump analysis shows that the failing code comes from the pyroscope native extension:
pyroscope/_native__lib.cpython-39-x86_64-linux-gnu.soThis extension is loaded while running Python 3.11.
Crash evidence (excerpt)
Program terminated with signal SIGSEGV, Segmentation fault.
The crash happens during object destruction (Drop) inside the Rust native code.
Suspected cause
The native extension shipped in pyroscope-io 0.8.11 is named:
_native__lib.cpython-39-x86_64-linux-gnu.soWhen used with Python 3.11, this suggests a potential ABI mismatch (3.9/3.11) between the interpreter and the compiled extension.
The wheel published for Linux is tagged as:
py2.py3-none-manylinuxwhich allows it to be installed on Python 3.11 without warning, even though it contains a CPython-version-specific .so.
Based on the crash pattern, this looks consistent with an ABI incompatibility.
Additional note
I also checked pyroscope-io 0.8.14, and the Linux wheel still contains the same native extension:
_native__lib.cpython-39-x86_64-linux-gnu.soI am currently testing version 0.8.14, but the packaging seems unchanged in this regard.
EDIT: Same crash with version 0.8.14
Summary
pyroscope-io 0.8.11 and pyroscope-io 0.8.14 crashes with SIGSEGV on Python 3.11.
The crash occurs in the native Rust extension.
The extension is built for CPython 3.9 but loaded on Python 3.11.
An ABI mismatch seems a plausible root cause.
The Linux wheel metadata allows this situation silently.
I hope this report helps; I can provide more details (core dump, full backtrace) if needed.
Thanks.