Stream: git-wasmtime

Topic: wasmtime / Issue #2638 Code runs fine in Wasmer (Cranelif...


view this post on Zulip Wasmtime GitHub notifications bot (Feb 05 2021 at 11:14):

abbec opened Issue #2638:

Debugging further, the Python debug malloc (this is a debug build) gets an invalid allocation from dlmalloc causing it to overwrite some internal dlmalloc data structures.

If there is a better way we can debug this to provide more/better info, please let us know!

python.wasm.zip

view this post on Zulip Wasmtime GitHub notifications bot (Feb 05 2021 at 11:14):

abbec labeled Issue #2638:

Debugging further, the Python debug malloc (this is a debug build) gets an invalid allocation from dlmalloc causing it to overwrite some internal dlmalloc data structures.

If there is a better way we can debug this to provide more/better info, please let us know!

python.wasm.zip

view this post on Zulip Wasmtime GitHub notifications bot (Feb 05 2021 at 11:15):

abbec edited Issue #2638:

Debugging further, the Python debug malloc (this is a debug build) gets an invalid allocation from dlmalloc causing it to overwrite some internal dlmalloc data structures.

If there is a better way we can debug this to provide more/better info, please let us know!

view this post on Zulip Wasmtime GitHub notifications bot (Feb 05 2021 at 11:16):

abbec edited Issue #2638:

$ wasmtime run python.wasm --dir . -- -m test
Error: failed to run main module `python.wasm`

Caused by:
    0: failed to invoke command default
    1: wasm trap: out of bounds memory access
       wasm backtrace:
           0: 0x68557c - <unknown>!dlmalloc
           1: 0x68760e - <unknown>!realloc
           2: 0x452d56 - <unknown>!_PyMem_RawRealloc
           3: 0x457580 - <unknown>!_PyMem_DebugRawRealloc
           4: 0x4556ae - <unknown>!PyMem_RawRealloc
           5: 0x453028 - <unknown>!_PyObject_Realloc
           6: 0x457580 - <unknown>!_PyMem_DebugRawRealloc
           7: 0x4582ba - <unknown>!_PyMem_DebugRealloc
           8: 0x458587 - <unknown>!PyMem_Realloc
           9: 0x42c1b5 - <unknown>!list_resize
          10: 0x42c52f - <unknown>!app1
          11: 0x42c369 - <unknown>!PyList_Append
          12: 0x4af5b1 - <unknown>!_posix_listdir
          13: 0x49cad9 - <unknown>!os_listdir_impl
          14: 0x49c9a1 - <unknown>!os_listdir
          15: 0x20f6a5 - <unknown>!cfunction_vectorcall_FASTCALL_KEYWORDS
          16: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          17: 0x20a7d7 - <unknown>!call_function
          18: 0x1ffd1d - <unknown>!_PyEval_EvalFrameDefault
          19: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          20: 0x2d3d85 - <unknown>!function_code_fastcall
          21: 0x2d4508 - <unknown>!_PyFunction_Vectorcall
          22: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          23: 0x20a7d7 - <unknown>!call_function
          24: 0x1ffe37 - <unknown>!_PyEval_EvalFrameDefault
          25: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          26: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          27: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          28: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          29: 0x20a7d7 - <unknown>!call_function
          30: 0x1ffe37 - <unknown>!_PyEval_EvalFrameDefault
          31: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          32: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          33: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          34: 0x19e67e - <unknown>!_PyObject_Vectorcall
          35: 0x19dd65 - <unknown>!method_vectorcall
          36: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          37: 0x20a7d7 - <unknown>!call_function
          38: 0x1ffd1d - <unknown>!_PyEval_EvalFrameDefault
          39: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          40: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          41: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          42: 0x19e67e - <unknown>!_PyObject_Vectorcall
          43: 0x19dd65 - <unknown>!method_vectorcall
          44: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          45: 0x20a7d7 - <unknown>!call_function
          46: 0x200057 - <unknown>!_PyEval_EvalFrameDefault
          47: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          48: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          49: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          50: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          51: 0x20a7d7 - <unknown>!call_function
          52: 0x200057 - <unknown>!_PyEval_EvalFrameDefault
          53: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          54: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          55: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          56: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          57: 0x20a7d7 - <unknown>!call_function
          58: 0x1ffd1d - <unknown>!_PyEval_EvalFrameDefault
          59: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          60: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          61: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          62: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          63: 0x20a7d7 - <unknown>!call_function
          64: 0x200057 - <unknown>!_PyEval_EvalFrameDefault
          65: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          66: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          67: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          68: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          69: 0x20a7d7 - <unknown>!call_function
          70: 0x200057 - <unknown>!_PyEval_EvalFrameDefault
          71: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          72: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          73: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          74: 0x2d2079 - <unknown>!PyVectorcall_Call
          75: 0x2d2407 - <unknown>!PyObject_Call
          76: 0x48a8dc - <unknown>!pymain_run_module
          77: 0x489a3e - <unknown>!pymain_run_python
          78: 0x489625 - <unknown>!Py_RunMain
          79: 0x48b4e9 - <unknown>!pymain_main
          80: 0x48b974 - <unknown>!Py_BytesMain
          81: 0x421d - <unknown>!main
          82: 0x68a7ff - <unknown>!__main_void
          83: 0x689d72 - <unknown>!__original_main
          84: 0x41b3 - <unknown>!_start
       note: run with `WASMTIME_BACKTRACE_DETAILS=1` environment variable to display more information

Debugging further, the Python debug malloc (this is a debug build) gets an invalid allocation from dlmalloc causing it to overwrite some internal dlmalloc data structures.

If there is a better way we can debug this to provide more/better info, please let us know!

view this post on Zulip Wasmtime GitHub notifications bot (Feb 05 2021 at 11:20):

abbec edited Issue #2638:

<details>
<summary>Callstack</summary>

$ wasmtime run python.wasm --dir . -- -m test
Error: failed to run main module `python.wasm`

Caused by:
    0: failed to invoke command default
    1: wasm trap: out of bounds memory access
       wasm backtrace:
           0: 0x68557c - <unknown>!dlmalloc
           1: 0x68760e - <unknown>!realloc
           2: 0x452d56 - <unknown>!_PyMem_RawRealloc
           3: 0x457580 - <unknown>!_PyMem_DebugRawRealloc
           4: 0x4556ae - <unknown>!PyMem_RawRealloc
           5: 0x453028 - <unknown>!_PyObject_Realloc
           6: 0x457580 - <unknown>!_PyMem_DebugRawRealloc
           7: 0x4582ba - <unknown>!_PyMem_DebugRealloc
           8: 0x458587 - <unknown>!PyMem_Realloc
           9: 0x42c1b5 - <unknown>!list_resize
          10: 0x42c52f - <unknown>!app1
          11: 0x42c369 - <unknown>!PyList_Append
          12: 0x4af5b1 - <unknown>!_posix_listdir
          13: 0x49cad9 - <unknown>!os_listdir_impl
          14: 0x49c9a1 - <unknown>!os_listdir
          15: 0x20f6a5 - <unknown>!cfunction_vectorcall_FASTCALL_KEYWORDS
          16: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          17: 0x20a7d7 - <unknown>!call_function
          18: 0x1ffd1d - <unknown>!_PyEval_EvalFrameDefault
          19: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          20: 0x2d3d85 - <unknown>!function_code_fastcall
          21: 0x2d4508 - <unknown>!_PyFunction_Vectorcall
          22: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          23: 0x20a7d7 - <unknown>!call_function
          24: 0x1ffe37 - <unknown>!_PyEval_EvalFrameDefault
          25: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          26: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          27: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          28: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          29: 0x20a7d7 - <unknown>!call_function
          30: 0x1ffe37 - <unknown>!_PyEval_EvalFrameDefault
          31: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          32: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          33: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          34: 0x19e67e - <unknown>!_PyObject_Vectorcall
          35: 0x19dd65 - <unknown>!method_vectorcall
          36: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          37: 0x20a7d7 - <unknown>!call_function
          38: 0x1ffd1d - <unknown>!_PyEval_EvalFrameDefault
          39: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          40: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          41: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          42: 0x19e67e - <unknown>!_PyObject_Vectorcall
          43: 0x19dd65 - <unknown>!method_vectorcall
          44: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          45: 0x20a7d7 - <unknown>!call_function
          46: 0x200057 - <unknown>!_PyEval_EvalFrameDefault
          47: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          48: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          49: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          50: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          51: 0x20a7d7 - <unknown>!call_function
          52: 0x200057 - <unknown>!_PyEval_EvalFrameDefault
          53: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          54: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          55: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          56: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          57: 0x20a7d7 - <unknown>!call_function
          58: 0x1ffd1d - <unknown>!_PyEval_EvalFrameDefault
          59: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          60: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          61: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          62: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          63: 0x20a7d7 - <unknown>!call_function
          64: 0x200057 - <unknown>!_PyEval_EvalFrameDefault
          65: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          66: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          67: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          68: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          69: 0x20a7d7 - <unknown>!call_function
          70: 0x200057 - <unknown>!_PyEval_EvalFrameDefault
          71: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          72: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          73: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          74: 0x2d2079 - <unknown>!PyVectorcall_Call
          75: 0x2d2407 - <unknown>!PyObject_Call
          76: 0x48a8dc - <unknown>!pymain_run_module
          77: 0x489a3e - <unknown>!pymain_run_python
          78: 0x489625 - <unknown>!Py_RunMain
          79: 0x48b4e9 - <unknown>!pymain_main
          80: 0x48b974 - <unknown>!Py_BytesMain
          81: 0x421d - <unknown>!main
          82: 0x68a7ff - <unknown>!__main_void
          83: 0x689d72 - <unknown>!__original_main
          84: 0x41b3 - <unknown>!_start
       note: run with `WASMTIME_BACKTRACE_DETAILS=1` environment variable to display more information

</details>

<details>
<summary>Detailed Callstack</summary>

$ WASMTIME_BACKTRACE_DETAILS=1 wasmtime run python.wasm --dir . -- -m test
Error: failed to run main module `python.wasm`

Caused by:
    0: failed to invoke command default
    1: wasm trap: out of bounds memory access
       wasm backtrace:
           0: 0x68557c - <unknown>!dlmalloc
           1: 0x68760e - <unknown>!realloc
           2: 0x452d56 - _PyMem_RawRealloc
                           at /Users/abbe/code/gbk-python/Objects/obmalloc.c:122:12
           3: 0x457580 - _PyMem_DebugRawRealloc
                           at /Users/abbe/code/gbk-python/Objects/obmalloc.c:2241:20
           4: 0x4556ae - PyMem_RawRealloc
                           at /Users/abbe/code/gbk-python/Objects/obmalloc.c:591:12
           5: 0x453028 - _PyObject_Realloc
                           at /Users/abbe/code/gbk-python/Objects/obmalloc.c:1987:12
           6: 0x457580 - _PyMem_DebugRawRealloc
                           at /Users/abbe/code/gbk-python/Objects/obmalloc.c:2241:20
           7: 0x4582ba - _PyMem_DebugRealloc
                           at /Users/abbe/code/gbk-python/Objects/obmalloc.c:2327:12
           8: 0x458587 - PyMem_Realloc
                           at /Users/abbe/code/gbk-python/Objects/obmalloc.c:624:12
           9: 0x42c1b5 - list_resize
                           at /Users/abbe/code/gbk-python/Objects/listobject.c:70:26
          10: 0x42c52f - app1
                           at /Users/abbe/code/gbk-python/Objects/listobject.c:340:9
          11: 0x42c369 - PyList_Append
                           at /Users/abbe/code/gbk-python/Objects/listobject.c:352:16
          12: 0x4af5b1 - _posix_listdir
                           at /Users/abbe/code/gbk-python/./Modules/posixmodule.c:3831:13
          13: 0x49cad9 - os_listdir_impl
                           at /Users/abbe/code/gbk-python/./Modules/posixmodule.c:3887:12
          14: 0x49c9a1 - os_listdir
                           at /Users/abbe/code/gbk-python/./Modules/clinic/posixmodule.c.h:1197:20
          15: 0x20f6a5 - cfunction_vectorcall_FASTCALL_KEYWORDS
                           at /Users/abbe/code/gbk-python/Objects/methodobject.c:437:24
          16: 0x20bc53 - _PyObject_Vectorcall
                           at /Users/abbe/code/gbk-python/./Include/cpython/abstract.h:127:11
          17: 0x20a7d7 - call_function
                           at /Users/abbe/code/gbk-python/Python/ceval.c:4963:13
          18: 0x1ffd1d - _PyEval_EvalFrameDefault
                           at /Users/abbe/code/gbk-python/Python/ceval.c:3469:23
          19: 0x1eac4f - PyEval_EvalFrameEx
                           at /Users/abbe/code/gbk-python/Python/ceval.c:741:12
          20: 0x2d3d85 - function_code_fastcall
                           at /Users/abbe/code/gbk-python/Objects/call.c:283:14
          21: 0x2d4508 - _PyFunction_Vectorcall
                           at /Users/abbe/code/gbk-python/Objects/call.c:410:20
          22: 0x20bc53 - _PyObject_Vectorcall
                           at /Users/abbe/code/gbk-python/./Include/cpython/abstract.h:127:11
          23: 0x20a7d7 - call_function
                           at /Users/abbe/code/gbk-python/Python/ceval.c:4963:13
          24: 0x1ffe37 - _PyEval_EvalFrameDefault
                           at /Users/abbe/code/gbk-python/Python/ceval.c:3486:23
          25: 0x1eac4f - PyEval_EvalFrameEx
                           at /Users/abbe/code/gbk-python/Python/ceval.c:741:12
          26: 0x1eaa0e - _PyEval_EvalCodeWithName
                           at /Users/abbe/code/gbk-python/Python/ceval.c:4298:14
          27: 0x2d4a6c - _PyFunction_Vectorcall
                           at /Users/abbe/code/gbk-python/Objects/call.c:435:12
          28: 0x20bc53 - _PyObject_Vectorcall
                           at /Users/abbe/code/gbk-python/./Include/cpython/abstract.h:127:11
          29: 0x20a7d7 - call_function
                           at /Users/abbe/code/gbk-python/Python/ceval.c:4963:13
          30: 0x1ffe37 - _PyEval_EvalFrameDefault
                           at /Users/abbe/code/gbk-python/Python/ceval.c:3486:23
          31: 0x1eac4f - PyEval_EvalFrameEx
                           at /Users/abbe/code/gbk-python/Python/ceval.c:741:12
          32: 0x1eaa0e -
[message truncated]

view this post on Zulip Wasmtime GitHub notifications bot (Feb 05 2021 at 11:22):

abbec edited Issue #2638:

<details>
<summary>Callstack</summary>

$ wasmtime run python.wasm --dir . -- -m test
Error: failed to run main module `python.wasm`

Caused by:
    0: failed to invoke command default
    1: wasm trap: out of bounds memory access
       wasm backtrace:
           0: 0x68557c - <unknown>!dlmalloc
           1: 0x68760e - <unknown>!realloc
           2: 0x452d56 - <unknown>!_PyMem_RawRealloc
           3: 0x457580 - <unknown>!_PyMem_DebugRawRealloc
           4: 0x4556ae - <unknown>!PyMem_RawRealloc
           5: 0x453028 - <unknown>!_PyObject_Realloc
           6: 0x457580 - <unknown>!_PyMem_DebugRawRealloc
           7: 0x4582ba - <unknown>!_PyMem_DebugRealloc
           8: 0x458587 - <unknown>!PyMem_Realloc
           9: 0x42c1b5 - <unknown>!list_resize
          10: 0x42c52f - <unknown>!app1
          11: 0x42c369 - <unknown>!PyList_Append
          12: 0x4af5b1 - <unknown>!_posix_listdir
          13: 0x49cad9 - <unknown>!os_listdir_impl
          14: 0x49c9a1 - <unknown>!os_listdir
          15: 0x20f6a5 - <unknown>!cfunction_vectorcall_FASTCALL_KEYWORDS
          16: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          17: 0x20a7d7 - <unknown>!call_function
          18: 0x1ffd1d - <unknown>!_PyEval_EvalFrameDefault
          19: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          20: 0x2d3d85 - <unknown>!function_code_fastcall
          21: 0x2d4508 - <unknown>!_PyFunction_Vectorcall
          22: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          23: 0x20a7d7 - <unknown>!call_function
          24: 0x1ffe37 - <unknown>!_PyEval_EvalFrameDefault
          25: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          26: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          27: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          28: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          29: 0x20a7d7 - <unknown>!call_function
          30: 0x1ffe37 - <unknown>!_PyEval_EvalFrameDefault
          31: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          32: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          33: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          34: 0x19e67e - <unknown>!_PyObject_Vectorcall
          35: 0x19dd65 - <unknown>!method_vectorcall
          36: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          37: 0x20a7d7 - <unknown>!call_function
          38: 0x1ffd1d - <unknown>!_PyEval_EvalFrameDefault
          39: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          40: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          41: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          42: 0x19e67e - <unknown>!_PyObject_Vectorcall
          43: 0x19dd65 - <unknown>!method_vectorcall
          44: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          45: 0x20a7d7 - <unknown>!call_function
          46: 0x200057 - <unknown>!_PyEval_EvalFrameDefault
          47: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          48: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          49: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          50: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          51: 0x20a7d7 - <unknown>!call_function
          52: 0x200057 - <unknown>!_PyEval_EvalFrameDefault
          53: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          54: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          55: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          56: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          57: 0x20a7d7 - <unknown>!call_function
          58: 0x1ffd1d - <unknown>!_PyEval_EvalFrameDefault
          59: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          60: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          61: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          62: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          63: 0x20a7d7 - <unknown>!call_function
          64: 0x200057 - <unknown>!_PyEval_EvalFrameDefault
          65: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          66: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          67: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          68: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          69: 0x20a7d7 - <unknown>!call_function
          70: 0x200057 - <unknown>!_PyEval_EvalFrameDefault
          71: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          72: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          73: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          74: 0x2d2079 - <unknown>!PyVectorcall_Call
          75: 0x2d2407 - <unknown>!PyObject_Call
          76: 0x48a8dc - <unknown>!pymain_run_module
          77: 0x489a3e - <unknown>!pymain_run_python
          78: 0x489625 - <unknown>!Py_RunMain
          79: 0x48b4e9 - <unknown>!pymain_main
          80: 0x48b974 - <unknown>!Py_BytesMain
          81: 0x421d - <unknown>!main
          82: 0x68a7ff - <unknown>!__main_void
          83: 0x689d72 - <unknown>!__original_main
          84: 0x41b3 - <unknown>!_start
       note: run with `WASMTIME_BACKTRACE_DETAILS=1` environment variable to display more information

</details>

<details>
<summary>Detailed Callstack</summary>

$ WASMTIME_BACKTRACE_DETAILS=1 wasmtime run python.wasm --dir . -- -m test
Error: failed to run main module `python.wasm`

Caused by:
    0: failed to invoke command default
    1: wasm trap: out of bounds memory access
       wasm backtrace:
           0: 0x68557c - <unknown>!dlmalloc
           1: 0x68760e - <unknown>!realloc
           2: 0x452d56 - _PyMem_RawRealloc
                           at /Users/abbe/code/gbk-python/Objects/obmalloc.c:122:12
           3: 0x457580 - _PyMem_DebugRawRealloc
                           at /Users/abbe/code/gbk-python/Objects/obmalloc.c:2241:20
           4: 0x4556ae - PyMem_RawRealloc
                           at /Users/abbe/code/gbk-python/Objects/obmalloc.c:591:12
           5: 0x453028 - _PyObject_Realloc
                           at /Users/abbe/code/gbk-python/Objects/obmalloc.c:1987:12
           6: 0x457580 - _PyMem_DebugRawRealloc
                           at /Users/abbe/code/gbk-python/Objects/obmalloc.c:2241:20
           7: 0x4582ba - _PyMem_DebugRealloc
                           at /Users/abbe/code/gbk-python/Objects/obmalloc.c:2327:12
           8: 0x458587 - PyMem_Realloc
                           at /Users/abbe/code/gbk-python/Objects/obmalloc.c:624:12
           9: 0x42c1b5 - list_resize
                           at /Users/abbe/code/gbk-python/Objects/listobject.c:70:26
          10: 0x42c52f - app1
                           at /Users/abbe/code/gbk-python/Objects/listobject.c:340:9
          11: 0x42c369 - PyList_Append
                           at /Users/abbe/code/gbk-python/Objects/listobject.c:352:16
          12: 0x4af5b1 - _posix_listdir
                           at /Users/abbe/code/gbk-python/./Modules/posixmodule.c:3831:13
          13: 0x49cad9 - os_listdir_impl
                           at /Users/abbe/code/gbk-python/./Modules/posixmodule.c:3887:12
          14: 0x49c9a1 - os_listdir
                           at /Users/abbe/code/gbk-python/./Modules/clinic/posixmodule.c.h:1197:20
          15: 0x20f6a5 - cfunction_vectorcall_FASTCALL_KEYWORDS
                           at /Users/abbe/code/gbk-python/Objects/methodobject.c:437:24
          16: 0x20bc53 - _PyObject_Vectorcall
                           at /Users/abbe/code/gbk-python/./Include/cpython/abstract.h:127:11
          17: 0x20a7d7 - call_function
                           at /Users/abbe/code/gbk-python/Python/ceval.c:4963:13
          18: 0x1ffd1d - _PyEval_EvalFrameDefault
                           at /Users/abbe/code/gbk-python/Python/ceval.c:3469:23
          19: 0x1eac4f - PyEval_EvalFrameEx
                           at /Users/abbe/code/gbk-python/Python/ceval.c:741:12
          20: 0x2d3d85 - function_code_fastcall
                           at /Users/abbe/code/gbk-python/Objects/call.c:283:14
          21: 0x2d4508 - _PyFunction_Vectorcall
                           at /Users/abbe/code/gbk-python/Objects/call.c:410:20
          22: 0x20bc53 - _PyObject_Vectorcall
                           at /Users/abbe/code/gbk-python/./Include/cpython/abstract.h:127:11
          23: 0x20a7d7 - call_function
                           at /Users/abbe/code/gbk-python/Python/ceval.c:4963:13
          24: 0x1ffe37 - _PyEval_EvalFrameDefault
                           at /Users/abbe/code/gbk-python/Python/ceval.c:3486:23
          25: 0x1eac4f - PyEval_EvalFrameEx
                           at /Users/abbe/code/gbk-python/Python/ceval.c:741:12
          26: 0x1eaa0e - _PyEval_EvalCodeWithName
                           at /Users/abbe/code/gbk-python/Python/ceval.c:4298:14
          27: 0x2d4a6c - _PyFunction_Vectorcall
                           at /Users/abbe/code/gbk-python/Objects/call.c:435:12
          28: 0x20bc53 - _PyObject_Vectorcall
                           at /Users/abbe/code/gbk-python/./Include/cpython/abstract.h:127:11
          29: 0x20a7d7 - call_function
                           at /Users/abbe/code/gbk-python/Python/ceval.c:4963:13
          30: 0x1ffe37 - _PyEval_EvalFrameDefault
                           at /Users/abbe/code/gbk-python/Python/ceval.c:3486:23
          31: 0x1eac4f - PyEval_EvalFrameEx
                           at /Users/abbe/code/gbk-python/Python/ceval.c:741:12
          32: 0x1eaa0e -
[message truncated]

view this post on Zulip Wasmtime GitHub notifications bot (Feb 05 2021 at 11:25):

abbec edited Issue #2638:

<details>
<summary>Callstack</summary>

$ wasmtime run python.wasm --dir . -- -m test
Error: failed to run main module `python.wasm`

Caused by:
    0: failed to invoke command default
    1: wasm trap: out of bounds memory access
       wasm backtrace:
           0: 0x68557c - <unknown>!dlmalloc
           1: 0x68760e - <unknown>!realloc
           2: 0x452d56 - <unknown>!_PyMem_RawRealloc
           3: 0x457580 - <unknown>!_PyMem_DebugRawRealloc
           4: 0x4556ae - <unknown>!PyMem_RawRealloc
           5: 0x453028 - <unknown>!_PyObject_Realloc
           6: 0x457580 - <unknown>!_PyMem_DebugRawRealloc
           7: 0x4582ba - <unknown>!_PyMem_DebugRealloc
           8: 0x458587 - <unknown>!PyMem_Realloc
           9: 0x42c1b5 - <unknown>!list_resize
          10: 0x42c52f - <unknown>!app1
          11: 0x42c369 - <unknown>!PyList_Append
          12: 0x4af5b1 - <unknown>!_posix_listdir
          13: 0x49cad9 - <unknown>!os_listdir_impl
          14: 0x49c9a1 - <unknown>!os_listdir
          15: 0x20f6a5 - <unknown>!cfunction_vectorcall_FASTCALL_KEYWORDS
          16: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          17: 0x20a7d7 - <unknown>!call_function
          18: 0x1ffd1d - <unknown>!_PyEval_EvalFrameDefault
          19: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          20: 0x2d3d85 - <unknown>!function_code_fastcall
          21: 0x2d4508 - <unknown>!_PyFunction_Vectorcall
          22: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          23: 0x20a7d7 - <unknown>!call_function
          24: 0x1ffe37 - <unknown>!_PyEval_EvalFrameDefault
          25: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          26: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          27: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          28: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          29: 0x20a7d7 - <unknown>!call_function
          30: 0x1ffe37 - <unknown>!_PyEval_EvalFrameDefault
          31: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          32: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          33: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          34: 0x19e67e - <unknown>!_PyObject_Vectorcall
          35: 0x19dd65 - <unknown>!method_vectorcall
          36: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          37: 0x20a7d7 - <unknown>!call_function
          38: 0x1ffd1d - <unknown>!_PyEval_EvalFrameDefault
          39: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          40: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          41: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          42: 0x19e67e - <unknown>!_PyObject_Vectorcall
          43: 0x19dd65 - <unknown>!method_vectorcall
          44: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          45: 0x20a7d7 - <unknown>!call_function
          46: 0x200057 - <unknown>!_PyEval_EvalFrameDefault
          47: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          48: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          49: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          50: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          51: 0x20a7d7 - <unknown>!call_function
          52: 0x200057 - <unknown>!_PyEval_EvalFrameDefault
          53: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          54: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          55: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          56: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          57: 0x20a7d7 - <unknown>!call_function
          58: 0x1ffd1d - <unknown>!_PyEval_EvalFrameDefault
          59: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          60: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          61: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          62: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          63: 0x20a7d7 - <unknown>!call_function
          64: 0x200057 - <unknown>!_PyEval_EvalFrameDefault
          65: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          66: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          67: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          68: 0x20bc53 - <unknown>!_PyObject_Vectorcall
          69: 0x20a7d7 - <unknown>!call_function
          70: 0x200057 - <unknown>!_PyEval_EvalFrameDefault
          71: 0x1eac4f - <unknown>!PyEval_EvalFrameEx
          72: 0x1eaa0e - <unknown>!_PyEval_EvalCodeWithName
          73: 0x2d4a6c - <unknown>!_PyFunction_Vectorcall
          74: 0x2d2079 - <unknown>!PyVectorcall_Call
          75: 0x2d2407 - <unknown>!PyObject_Call
          76: 0x48a8dc - <unknown>!pymain_run_module
          77: 0x489a3e - <unknown>!pymain_run_python
          78: 0x489625 - <unknown>!Py_RunMain
          79: 0x48b4e9 - <unknown>!pymain_main
          80: 0x48b974 - <unknown>!Py_BytesMain
          81: 0x421d - <unknown>!main
          82: 0x68a7ff - <unknown>!__main_void
          83: 0x689d72 - <unknown>!__original_main
          84: 0x41b3 - <unknown>!_start
       note: run with `WASMTIME_BACKTRACE_DETAILS=1` environment variable to display more information

</details>

<details>
<summary>Detailed Callstack</summary>

$ WASMTIME_BACKTRACE_DETAILS=1 wasmtime run python.wasm --dir . -- -m test
Error: failed to run main module `python.wasm`

Caused by:
    0: failed to invoke command default
    1: wasm trap: out of bounds memory access
       wasm backtrace:
           0: 0x68557c - <unknown>!dlmalloc
           1: 0x68760e - <unknown>!realloc
           2: 0x452d56 - _PyMem_RawRealloc
                           at /Users/abbe/code/gbk-python/Objects/obmalloc.c:122:12
           3: 0x457580 - _PyMem_DebugRawRealloc
                           at /Users/abbe/code/gbk-python/Objects/obmalloc.c:2241:20
           4: 0x4556ae - PyMem_RawRealloc
                           at /Users/abbe/code/gbk-python/Objects/obmalloc.c:591:12
           5: 0x453028 - _PyObject_Realloc
                           at /Users/abbe/code/gbk-python/Objects/obmalloc.c:1987:12
           6: 0x457580 - _PyMem_DebugRawRealloc
                           at /Users/abbe/code/gbk-python/Objects/obmalloc.c:2241:20
           7: 0x4582ba - _PyMem_DebugRealloc
                           at /Users/abbe/code/gbk-python/Objects/obmalloc.c:2327:12
           8: 0x458587 - PyMem_Realloc
                           at /Users/abbe/code/gbk-python/Objects/obmalloc.c:624:12
           9: 0x42c1b5 - list_resize
                           at /Users/abbe/code/gbk-python/Objects/listobject.c:70:26
          10: 0x42c52f - app1
                           at /Users/abbe/code/gbk-python/Objects/listobject.c:340:9
          11: 0x42c369 - PyList_Append
                           at /Users/abbe/code/gbk-python/Objects/listobject.c:352:16
          12: 0x4af5b1 - _posix_listdir
                           at /Users/abbe/code/gbk-python/./Modules/posixmodule.c:3831:13
          13: 0x49cad9 - os_listdir_impl
                           at /Users/abbe/code/gbk-python/./Modules/posixmodule.c:3887:12
          14: 0x49c9a1 - os_listdir
                           at /Users/abbe/code/gbk-python/./Modules/clinic/posixmodule.c.h:1197:20
          15: 0x20f6a5 - cfunction_vectorcall_FASTCALL_KEYWORDS
                           at /Users/abbe/code/gbk-python/Objects/methodobject.c:437:24
          16: 0x20bc53 - _PyObject_Vectorcall
                           at /Users/abbe/code/gbk-python/./Include/cpython/abstract.h:127:11
          17: 0x20a7d7 - call_function
                           at /Users/abbe/code/gbk-python/Python/ceval.c:4963:13
          18: 0x1ffd1d - _PyEval_EvalFrameDefault
                           at /Users/abbe/code/gbk-python/Python/ceval.c:3469:23
          19: 0x1eac4f - PyEval_EvalFrameEx
                           at /Users/abbe/code/gbk-python/Python/ceval.c:741:12
          20: 0x2d3d85 - function_code_fastcall
                           at /Users/abbe/code/gbk-python/Objects/call.c:283:14
          21: 0x2d4508 - _PyFunction_Vectorcall
                           at /Users/abbe/code/gbk-python/Objects/call.c:410:20
          22: 0x20bc53 - _PyObject_Vectorcall
                           at /Users/abbe/code/gbk-python/./Include/cpython/abstract.h:127:11
          23: 0x20a7d7 - call_function
                           at /Users/abbe/code/gbk-python/Python/ceval.c:4963:13
          24: 0x1ffe37 - _PyEval_EvalFrameDefault
                           at /Users/abbe/code/gbk-python/Python/ceval.c:3486:23
          25: 0x1eac4f - PyEval_EvalFrameEx
                           at /Users/abbe/code/gbk-python/Python/ceval.c:741:12
          26: 0x1eaa0e - _PyEval_EvalCodeWithName
                           at /Users/abbe/code/gbk-python/Python/ceval.c:4298:14
          27: 0x2d4a6c - _PyFunction_Vectorcall
                           at /Users/abbe/code/gbk-python/Objects/call.c:435:12
          28: 0x20bc53 - _PyObject_Vectorcall
                           at /Users/abbe/code/gbk-python/./Include/cpython/abstract.h:127:11
          29: 0x20a7d7 - call_function
                           at /Users/abbe/code/gbk-python/Python/ceval.c:4963:13
          30: 0x1ffe37 - _PyEval_EvalFrameDefault
                           at /Users/abbe/code/gbk-python/Python/ceval.c:3486:23
          31: 0x1eac4f - PyEval_EvalFrameEx
                           at /Users/abbe/code/gbk-python/Python/ceval.c:741:12
          32: 0x1eaa0e -
[message truncated]


Last updated: Dec 23 2024 at 12:05 UTC