Crash in repr() in finalizer
Open
Nobody has claimed this yet.
3.11
interpreter-core
type-crash
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 36k
- PR merge metrics
- PR metrics pending
Description
This is currently the number one crash reported through Windows Error Reporting. It appears to be something to do with a repr during finalization. I haven't dug into the actual lines of code, but the line numbers below should be accurate as of 3.11.1
| symbol | offset | IP | filename | line |
|---|---|---|---|---|
| 0 | python311!_PyObject_VectorcallTstate | 0x0000000000000024 | pycore_call.h | 87 |
| 1 | python311!PyObject_CallOneArg | 0x0000000000000030 | call.c | 377 |
| 2 | python311!PyObject_Repr | 0x000000000000008B | object.c | 434 |
| 3 | python311!_PyEval_EvalFrameDefault | 0x0000000000007136 | ceval.c | 5506 |
| 4 | python311!_PyObject_VectorcallTstate | 0x0000000000000354 | pycore_call.h | 92 |
| 5 | python311!PyObject_CallOneArg | 0x0000000000000030 | call.c | 377 |
| 6 | python311!slot_tp_repr | 0x0000000000000039 | typeobject.c | 7559 |
| 7 | python311!PyObject_Repr | 0x000000000000008B | object.c | 434 |
| 8 | python311!_PyEval_EvalFrameDefault | 0x0000000000007136 | ceval.c | 5506 |
| 9 | python311!_PyObject_VectorcallTstate | 0x0000000000000354 | pycore_call.h | 92 |
| 10 | python311!PyObject_CallOneArg | 0x0000000000000030 | call.c | 377 |
| 11 | python311!slot_tp_finalize | 0x000000000000005F | typeobject.c | 7909 |
| 12 | python311!finalize_garbage | 0x00000000000000A5 | gcmodule.c | 980 |
| 13 | python311!gc_collect_main | 0x0000000000000143 | gcmodule.c | 1280 |
| 14 | python311!_PyGC_CollectNoFail | 0x0000000000000030 | gcmodule.c | 2111 |
| 15 | python311!finalize_modules | 0x00000000000000F0 | pylifecycle.c | 1601 |
| 16 | python311!Py_FinalizeEx | 0x00000000000000A1 | pylifecycle.c | 1839 |
| 17 | python311!Py_RunMain | 0x000000000000001A | main.c | 682 |
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining the reported call chain in gcmodule.c, typeobject.c, object.c, ceval.c, and pylifecycle.c, using the 3.11.1 line references as a guide. Reproduce the Windows finalization crash and trace the repr call during shutdown; done means the crash is understood and a regression check demonstrates safe finalization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100