GeezerVison is showing github.com — gh-127503: Improve tracebacks on Emscripten when there is a trap by hoodmane · Pull Request #131158 · python/cpython
Conversation
hoodmane
commented
Mar 12, 2025
•
edited by bedevere-app
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
This PR solves two problems:
- No Python traceback shown on segfault/trap
- The JavaScript source line is shown
The JavaScript source line is super long and completely unenlightening, whereas the Python traceback is very helpful.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This PR solves two problems:
1. No Python traceback shown on segfault/trap
2. The JavaScript source line is shown
The JavaScript source line is super long and completely unenlightening,
whereas the Python traceback is very helpful.
|
After this change a trap in the test suite looks as follows:
Details
Aborted(Assertion failed: callable != NULL, at: ../../../../Include/internal/pycore_call.h,116,_PyVectorcall_FunctionInline)
RuntimeError: Aborted(Assertion failed: callable != NULL, at: ../../../../Include/internal/pycore_call.h,116,_PyVectorcall_FunctionInline). Build with -sASSERTIONS for more info.
at abort (file:///home/rchatham/cpython/cross-build/wasm32-emscripten/build/python/python.mjs:261:15)
at ___assert_fail (file:///home/rchatham/cpython/cross-build/wasm32-emscripten/build/python/python.mjs:1735:7)
at wasm://wasm/02f678e6:wasm-function[787]:0x1c26ed
at wasm://wasm/02f678e6:wasm-function[798]:0x1c35ad
at wasm://wasm/02f678e6:wasm-function[3560]:0x3575f2
at wasm://wasm/02f678e6:wasm-function[3558]:0x30d1f8
at wasm://wasm/02f678e6:wasm-function[3557]:0x30cfca
at wasm://wasm/02f678e6:wasm-function[3519]:0x3084d2
at wasm://wasm/02f678e6:wasm-function[3560]:0x318045
at wasm://wasm/02f678e6:wasm-function[3558]:0x30d1f8
Stack (most recent call first):
File "<frozen __hello__>", line 0 in <module>
File "<frozen importlib._bootstrap>", line 1176 in exec_module
File "<frozen importlib._bootstrap>", line 935 in _load_unlocked
File "<frozen importlib._bootstrap>", line 1339 in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1368 in _find_and_load
File "/home/rchatham/cpython/Lib/importlib/util.py", line 90 in find_spec
File "/home/rchatham/cpython/Lib/test/test_ctypes/test_values.py", line 85 in test_frozentable
File "/home/rchatham/cpython/Lib/unittest/case.py", line 606 in _callTestMethod
File "/home/rchatham/cpython/Lib/unittest/case.py", line 660 in run
File "/home/rchatham/cpython/Lib/unittest/case.py", line 716 in __call__
File "/home/rchatham/cpython/Lib/unittest/suite.py", line 122 in run
File "/home/rchatham/cpython/Lib/unittest/suite.py", line 84 in __call__
File "/home/rchatham/cpython/Lib/unittest/suite.py", line 122 in run
File "/home/rchatham/cpython/Lib/unittest/suite.py", line 84 in __call__
File "/home/rchatham/cpython/Lib/unittest/suite.py", line 122 in run
File "/home/rchatham/cpython/Lib/unittest/suite.py", line 84 in __call__
File "/home/rchatham/cpython/Lib/unittest/suite.py", line 122 in run
File "/home/rchatham/cpython/Lib/unittest/suite.py", line 84 in __call__
File "/home/rchatham/cpython/Lib/test/libregrtest/testresult.py", line 148 in run
File "/home/rchatham/cpython/Lib/test/libregrtest/single.py", line 84 in _run_suite
File "/home/rchatham/cpython/Lib/test/libregrtest/single.py", line 42 in run_unittest
File "/home/rchatham/cpython/Lib/test/libregrtest/single.py", line 162 in test_func
File "/home/rchatham/cpython/Lib/test/libregrtest/single.py", line 118 in regrtest_runner
File "/home/rchatham/cpython/Lib/test/libregrtest/single.py", line 165 in _load_run_test
File "/home/rchatham/cpython/Lib/test/libregrtest/single.py", line 210 in _runtest_env_changed_exc
File "/home/rchatham/cpython/Lib/test/libregrtest/single.py", line 319 in _runtest
File "/home/rchatham/cpython/Lib/test/libregrtest/single.py", line 348 in run_single_test
File "/home/rchatham/cpython/Lib/test/libregrtest/main.py", line 378 in run_test
File "/home/rchatham/cpython/Lib/test/libregrtest/main.py", line 408 in run_tests_sequentially
File "/home/rchatham/cpython/Lib/test/libregrtest/main.py", line 550 in _run_tests
File "/home/rchatham/cpython/Lib/test/libregrtest/main.py", line 585 in run_tests
File "/home/rchatham/cpython/Lib/test/libregrtest/main.py", line 757 in main
File "/home/rchatham/cpython/Lib/test/libregrtest/main.py", line 765 in main
File "/home/rchatham/cpython/Lib/test/__main__.py", line 2 in <module>
File "/home/rchatham/cpython/Lib/runpy.py", line 88 in _run_code
File "/home/rchatham/cpython/Lib/runpy.py", line 198 in _run_module_as_main
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely a nicer stack track than the previous behaviour 👍
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
plashchynski
pushed a commit
to plashchynski/cpython
that referenced
this pull request
Mar 17, 2025
python#131158)
Modifies the behavior of the interpreter on crash under Emscripten:
1. No Python traceback shown on segfault/trap
2. The JavaScript source line is shown
The JavaScript source line is super long and completely unenlightening,
whereas the Python traceback is very helpful.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|