Demangle Cython __pyx_* symbols in native stack frames
@alexander-alderman-webb がすでに取り組んでいます。
2026年6月12日 から。
評価
この issue はまだ評価されていません。
説明
Native crash frames generated by Cython-compiled code appear as mangled C
symbols (e.g. __pyx_pw_6module_3func) in sentry-native stack traces, making
them unreadable without manual demangling. The Python SDK captures Cython
frames correctly at the Python level (.pyx file, line number), but when a
crash occurs in the native layer of a Cython extension, the native stack frames
shown in Sentry are opaque.
Current behavior
- Python-level Cython frames (captured by sentry-python via
sys.exc_info())
show correct.pyxsource file and line number - Native frames from the C code generated by Cython (captured by sentry-native
on crash) show raw mangled symbols:__pyx_pw_6module_3func_1name,__pyx_f_6module_3ClassName_method, etc. - C++ demangling (
__cxa_demangle) does not apply to Cython's naming scheme - No Cython-specific demangling exists in sentry-python or the Sentry backend
Gap
Cython uses a deterministic, documented symbol naming convention for the C code
it generates. A demangler can reconstruct the original Python-facing name from
a __pyx_* symbol:
__pyx_pw_<module>_<n><name>→ Python wrapper for<module>.<name>__pyx_f_<module>_<ClassName>_<method>→ C-level function for<module>.<ClassName>.<method>
This demangling could be applied as a post-processing step in theGnuBacktraceIntegration or as a standalone CythonIntegration, enriching
native frames with human-readable Cython source names before the event is sent
to Sentry.
Options
- Extend
GnuBacktraceIntegrationto detect and demangle__pyx_*symbols
in parsed backtrace frames — lowest friction, reuses existing pipeline - Add a standalone
CythonIntegrationevent processor that post-processes
all native frames across exception and crash events — cleaner separation,
applicable beyondGnuBacktrace-formatted strings - Implement server-side demangling in the Sentry symbolicator for
__pyx_*
symbols — transparent to SDK users, but requires changes outside this repo
References
- Cython generated C naming conventions: https://cython.readthedocs.io/en/latest/src/userguide/debugging.html
- Existing
GnuBacktraceIntegration:sentry_sdk/integrations/gnu_backtrace.py
Action taken on behalf of Angelo de Voer.
- 主要言語
- Python
- スター
- 2.2k
- フォーク
- 672
- 平均マージ
- 22時間 47分
- マージ済み PR(30日)
- 224
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
getsentry/sentry-python のほかの issue
-
Python
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
getsentry/sentry-python#7569 · コメント 1 件 ·
-
Python
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
getsentry/sentry-python#7568 · コメント 2 件 ·
-
Python
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
getsentry/sentry-python#7567 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
getsentry/sentry-python#7543 · コメント 2 件 · 担当者 1 名 ·
-
Python
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
getsentry/sentry-python#6992 · コメント 1 件 ·
getsentry/sentry-python の issue をすべて見る
似ている issue
-
essnmx good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
-
[Feature] 奇物选择添加优先级 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
syfoud/Simulated_Scepter#174 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Giskard-AI/giskard-oss#2840 · コメント 1 件 ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success オープンarea: repo bug perceived difficulty: 2
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
yeti-platform/yeti#1380 ·