pystack
Analysis of the stack of remote python processes
Decision gist · record as of 2026-08-14
Yes, if you develop or operate Python services on Linux and need non-intrusive runtime diagnostics. PyStack fills a gap between interactive debuggers (which require stopping execution) and coarse-grained monitoring. The active maintenance, zero security vulnerabilities, permissive license, and broad Python version support make it low-risk. The main barrier is the Linux-only requirement and system library dependencies; if you're on a different OS or cannot install libdw and libelf, it is not an option.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Linux only; requires libdw and libelf system libraries installed.
- Building from source requires pkg-config or manual configuration of library paths.
- Medium install friction due to compiled C extensions requiring libdw and libelf system libraries.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 is permissive; you may use, modify, and distribute PyStack freely in commercial and open-source projects, provided you include a copy of the license and state any changes.
last release 2026-08-07 (7 days) · last repo commit 2026-08-11 · 1,208 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 335,257 downloads/mo, #7,477 on PyPI
Alternatives
Verify before relying
pip install pystack
pystack remote <PID>
# or for core dumps:
pystack core <core_file> [executable]- Whether PyStack can safely inspect processes under heavy load or with memory corruption without data loss.
- Performance characteristics when analyzing very large core files or processes with thousands of threads.
- Compatibility with non-CPython implementations or alternative Python distributions.
What it is and what it does
PyStack is a command-line debugger that attaches to running Python processes or analyzes core dump files to extract and display their call stacks. It works by reading process memory directly, making it safe for production use since it does not execute code or modify memory in the target process. The tool can show which threads hold the Python GIL, whether garbage collection is running, and optionally display native C/C++/Rust frames alongside Python frames, local variables, and function arguments.
The package is built on low-level system introspection and is designed to work even with optimized or stripped Python binaries. It supports multiple interpreters in the same process and can tolerate memory corruption, making it useful for diagnosing hangs, deadlocks, and crashes in production systems. PyStack requires Linux and system libraries (libdw, libelf) to build, but pre-built wheels are available for Python 3.9 through 3.15.
Use it for
- Diagnose why a production Python service is hanging or unresponsive by inspecting its current call stack without restarting.
- Analyze a core dump from a crashed Python process to understand the execution state at the time of failure.
- Debug deadlocks or GIL contention by checking which threads hold the lock and what code they are running.
- Inspect native function calls mixed with Python frames to troubleshoot crashes in C extensions or mixed-language code.
- Examine local variables and function arguments in stack frames to understand program state without interactive debugging.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you develop or operate Python services on Linux and need non-intrusive runtime diagnostics.
PyStack fills a gap between interactive debuggers (which require stopping execution) and coarse-grained monitoring. The active maintenance, zero security vulnerabilities, permissive license, and broad Python version support make it low-risk. The main barrier is the Linux-only requirement and system library dependencies; if you're on a different OS or cannot install libdw and libelf, it is not an option.
Install
pystack on PyPI
Before you install
Medium install friction due to compiled C extensions requiring libdw and libelf system libraries. The package is actively maintained with recent releases and broad wheel coverage across Python 3.9–3.15 on Linux platforms.
Linux only; requires libdw and libelf system libraries installed. Building from source requires pkg-config or manual configuration of library paths.
License in practice
Apache-2.0 is permissive; you may use, modify, and distribute PyStack freely in commercial and open-source projects, provided you include a copy of the license and state any changes.
Quickstart
pip install pystack
pystack remote <PID>
# or for core dumps:
pystack core <core_file> [executable]
Verify before relying
- Whether PyStack can safely inspect processes under heavy load or with memory corruption without data loss.
- Performance characteristics when analyzing very large core files or processes with thousands of threads.
- Compatibility with non-CPython implementations or alternative Python distributions.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 7 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 335,257 / month, #7,477 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: Debuggers |
Evidence: pystack-1.7.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; pystack-1.7.1-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; pystack-1.7.1-cp310-cp310-musllinux_1_2_x86_64.whl; pystack-1.7.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; pystack-1.7.1-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; pystack-1.7.1-cp311-cp311-musllinux_1_2_x86_64.whl; pystack-1.7.1-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; pystack-1.7.1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; pystack-1.7.1-cp312-abi3-musllinux_1_2_x86_64.whl; pystack-1.7.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; pystack-1.7.1-cp313-cp313t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; pystack-1.7.1-cp313-cp313t-musllinux_1_2_x86_64.whl; pystack-1.7.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; pystack-1.7.1-cp314-cp314t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; pystack-1.7.1-cp314-cp314t-musllinux_1_2_x86_64.whl; pystack-1.7.1-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; pystack-1.7.1-cp315-cp315t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; pystack-1.7.1-cp315-cp315t-musllinux_1_2_x86_64.whl; pystack-1.7.1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; pystack-1.7.1-cp39-cp39-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “python stack trace inspection”
- pystackPyStack inspects the stack frames of a running Python process or core…
- traceback-with-variablesAutomatically captures and displays local variables in Python…
- pretty-errorsReformats Python exception tracebacks with color, context, and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Debuggers packages
Extracts and displays stack frame and traceback data with context-aware source code rendering, used to power enhanced tracebacks in IPython and similar tools.
Install it if you need to display or inspect stack frames with source context; skip it if your use case doesn't involve frame introspection.
debugpy is a Debug Adapter Protocol implementation for Python that enables remote debugging of Python scripts and modules through standard DAP clients, with support for breakpoints, exception handling, and subprocess debugging.
Install it if you need remote debugging, DAP client integration, or programmatic control over breakpoints and exception handling.
Pylint is a static code analyzer that checks Python code for errors, enforces coding standards, detects code smells, and suggests refactoring improvements without executing the code.
Install it if you need thorough code analysis with inference-based bug detection; if speed is critical, consider pairing it with faster linters like ruff for…
yamllint checks YAML files for syntax errors, style violations, and structural problems like key repetition, line length, trailing spaces, and indentation issues.
ipdb is an IPython-enabled debugger that replaces Python's standard pdb with tab completion, syntax highlighting, and better introspection while maintaining the same pdb interface.
Memray is a memory profiler for Python that traces every function call to track memory allocations across Python code, native extensions, and the interpreter itself, generating reports like flame graphs and tables to analyze memory usage.
See also crashtest · py-spy · mozcrash · tracebackturbo3 · esp-coredump · pyinstrument · pycrashreport · py-healthcheck · pytest-memray