[issue35711] Print information about an unexpectedly pending error before crashing

2019-01-23 Thread STINNER Victor
STINNER Victor added the comment: > A failure (crash) from such asserts provides no information on its own about > the unhandled exception itself to help the developer track down the C API use > error that led to this state. Maybe someone should try to modify faulthandler to display the curr

[issue35711] Print information about an unexpectedly pending error before crashing

2019-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Not PyErr_Print(). Maybe PyErr_WriteUnraisable(). -- ___ Python tracker ___ ___ Python-bugs-lis

[issue35711] Print information about an unexpectedly pending error before crashing

2019-01-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'm re-opening this. The original intent of the PR was missed even though the change in the PR as is was not how we want to do this in the CPython VM. Background: We build our default non-production test interpreter in `#undef NDEBUG` mode at Google which

[issue35711] Print information about an unexpectedly pending error before crashing

2019-01-15 Thread STINNER Victor
STINNER Victor added the comment: I close the issue, see: https://github.com/python/cpython/pull/11513#issuecomment-454369637 -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue35711] Print information about an unexpectedly pending error before crashing

2019-01-11 Thread STINNER Victor
STINNER Victor added the comment: I'm a supporter to add *more* checks to the debug build but also provide a Python runtime compiled in debug mode which would be ABI compatible (no need to rebuild C extensions). See my large project: https://pythoncapi.readthedocs.io/ Especially: ht

[issue35711] Print information about an unexpectedly pending error before crashing

2019-01-11 Thread STINNER Victor
STINNER Victor added the comment: I added _Py_CheckFunctionResult() to every C calls. This function calls PyErr_Occurred() after a function call. This change has been made in Python 3.5: bpo-23571. I made this change because it was very difficult to identify bugs when an exception was raised

[issue35711] Print information about an unexpectedly pending error before crashing

2019-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Calling PyErr_Occurred() on every function call adds some overhead. It should be called only in the debug build. In addition to the traceback, it would be nice to output also some information about the callable. Note also that PyErr_Print() calls sys.exce

[issue35711] Print information about an unexpectedly pending error before crashing

2019-01-10 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch, patch pull_requests: +11071, 11072 stage: -> patch review ___ Python tracker ___ ___

[issue35711] Print information about an unexpectedly pending error before crashing

2019-01-10 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch, patch, patch pull_requests: +11071, 11072, 11073 stage: -> patch review ___ Python tracker ___ _

[issue35711] Print information about an unexpectedly pending error before crashing

2019-01-10 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +11071 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue35711] Print information about an unexpectedly pending error before crashing

2019-01-10 Thread Samuel Freilich
New submission from Samuel Freilich : _PyObject_FastCallDict and _PyObject_FastCallKeywords assert that there is no pending exception before calling functions that might otherwise clobber the exception state. However, that doesn't produce very clear output for debugging, since the assert fail