Is there a way to include debug info?
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 42/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 領域
- build-system, tooling
調査の方向性
まず、componentize-py のビルドパスと、生成された .wasm が Wasmtime に渡される方法を追跡し、デバッグの参照として WasmBacktraceDetails::Enable を使用します。Rust と Go で利用可能なコンパイル時のデバッグ情報制御を componentize-py のオプションと比較し、そのうえで、結果として得られるバックトレースがコンポーネントの元のソースファイルを特定することを確認します。
索引モデルが issue の本文から書いたものです。
説明
When the .wasm file raises an error, the resulting backtrace does not contain any reference to the original source files (even using wasmtime::WasmBacktraceDetails::Enable).
With Rust and Go components it's possible to use compile-time flags such as --release or -no-debug to control whether debug info is included or not in the .wasm file. So I was wondering if the same would be possible with componentize-py?
Here's an example of the backtrace I get on error (where the only useful reference to my component's code is line 28):
Error: Failed to call component: error while executing at wasm backtrace:
0: 0xa9b968 - wit-component:adapter:wasi_snapshot_preview1!<wasm function 34>
1: 0x2230183 - wit-component:shim!adapt-wasi_snapshot_preview1-fd_write
2: 0x21b2244 - libc.so!__wasi_fd_write
3: 0x21b1a9f - libc.so!write
4: 0x14934 - <unknown>!<wasm function 782>
5: 0xeba24e - _Py_write_impl
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Python/fileutils.c:1962:17 - _Py_write
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Python/fileutils.c:2033:12
6: 0xf9dffd - _io_FileIO_write_impl
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Modules/_io/fileio.c:874:9 - _io_FileIO_write
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Modules/_io/clinic/fileio.c.h:388:20
7: 0xd16038 - method_vectorcall_FASTCALL_KEYWORDS_METHOD
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Objects/descrobject.c:387:24
8: 0xd09540 - _PyObject_VectorcallTstate
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Include/internal/pycore_call.h:92:11 - PyObject_VectorcallMethod
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Objects/call.c:887:24
9: 0xfab74b - PyObject_CallMethodOneArg
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Include/cpython/abstract.h:103:12 - _textiowrapper_writeflush
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Modules/_io/textio.c:1629:15
10: 0xfacee3 - _io_TextIOWrapper_write_impl
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Modules/_io/textio.c:1759:13 - _io_TextIOWrapper_write
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Modules/_io/clinic/textio.c.h:680:20
11: 0xd64d6e - cfunction_vectorcall_O
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Objects/methodobject.c:509:24
12: 0xd084da - _PyObject_VectorcallTstate
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Include/internal/pycore_call.h:92:11 - PyObject_CallOneArg
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Objects/call.c:401:12
13: 0xd291f6 - PyFile_WriteObject
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Objects/fileobject.c:132:14
14: 0xd292e5 - PyFile_WriteString
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Objects/fileobject.c:156:15
15: 0xeab96b - _Py_WriteIndentedMargin
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Python/traceback.c:430:13 - _PyTraceBack_Print_Indented
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Python/traceback.c:1078:9
16: 0xe96e54 - print_exception_traceback
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Python/pythonrun.c:911:15 - print_exception
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Python/pythonrun.c:1180:9
17: 0xe96465 - print_exception_recursive
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Python/pythonrun.c:1474:13
18: 0xe96122 - _PyErr_Display
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Python/pythonrun.c:1524:9
19: 0xe9600c - PyErr_Display
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Python/pythonrun.c:1556:5
20: 0xea872d - sys_excepthook_impl
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Python/sysmodule.c:772:5 - sys_excepthook
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Python/clinic/sysmodule.c.h:102:20
21: 0xd64ea4 - cfunction_vectorcall_FASTCALL
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Objects/methodobject.c:422:24
22: 0xd08285 - _PyObject_VectorcallTstate
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Include/internal/pycore_call.h:92:11 - _PyObject_FastCallTstate
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Include/internal/pycore_call.h:116:12 - _PyObject_FastCall
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Objects/call.c:334:12
23: 0xe94994 - _PyErr_PrintEx
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Python/pythonrun.c:807:28
24: 0xe96049 - PyErr_PrintEx
at /home/runner/work/componentize-py/componentize-py/cpython/builddir/wasi/../../Python/pythonrun.c:845:5
25: 0x12f52 - <unknown>!<wasm function 291>
26: 0xaf3c63 - libcomponentize_py_runtime.so!pyo3::err::PyErr::print::hbb86b960398edf90
27: 0xadda83 - libcomponentize_py_runtime.so!componentize-py#Dispatch
28: 0x221c1db - libcomponentize_py_bindings.so!edgee:components/data-collection#page-export
- 主要言語
- Rust
- スター
- 284
- フォーク
- 56
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bytecodealliance/componentize-py のほかの issue
-
難易度 3/5 半日 初心者へのやさしさ 40/100
bytecodealliance/componentize-py#259 · コメント 1 件 ·
-
wasm32-wasip3 target uses WASI preview 2 bindings対応中かも @Snowiiii が 6 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 57/100
bytecodealliance/componentize-py#253 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
bytecodealliance/componentize-py#247 · コメント 12 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
bytecodealliance/componentize-py#217 · コメント 6 件 ·
bytecodealliance/componentize-py の issue をすべて見る
似ている issue
-
[Bug] AM Context Monitor (am-monitor): Session turns count is capped at 80 due to turns.slice(-80)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
lbjlaq/Antigravity-Manager#4180 ·
メンテナーはふだん 1 日以内に返信
-
bug triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
zizmorcore/zizmor#2608 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
longbridge/nsh#4201 ·
メンテナーはふだん 1 日以内に返信