This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_multiprocessing segfaults on Windows
Type: crash Stage:
Components: Versions: Python 2.6
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, jnoller, theller
Priority: normal Keywords:

Created on 2008-06-16 17:25 by theller, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg68274 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2008-06-16 17:25
When Python shuts down after running test_multiprocessing on Windows, a
segfault occurs (this is with a debug build from trunk):

>	python26_d.dll!_Py_ForgetReference(_object * op=0x012de740)  Line 2023
+ 0xf bytes	C
 	python26_d.dll!_Py_Dealloc(_object * op=0x012de740)  Line 2043 + 0x9
bytes	C
 	python26_d.dll!tupledealloc(PyTupleObject * op=0x00d58c78)  Line 169 +
0x8a bytes	C
 	python26_d.dll!_Py_Dealloc(_object * op=0x00d58c78)  Line 2044 + 0x7
bytes	C
 	python26_d.dll!PyObject_CallFunctionObjArgs(_object *
callable=0x00d64090, ...)  Line 2716 + 0x51 bytes	C
 	python26_d.dll!handle_callback(_PyWeakReference * ref=0x012de740,
_object * callback=0x00d64090)  Line 864 + 0xf bytes	C
 	python26_d.dll!PyObject_ClearWeakRefs(_object * object=0x012bcc98) 
Line 910 + 0xd bytes	C
 	python26_d.dll!func_dealloc(PyFunctionObject * op=0x012bcc98)  Line
453 + 0x9 bytes	C
 	python26_d.dll!_Py_Dealloc(_object * op=0x012bcc98)  Line 2044 + 0x7
bytes	C
 	python26_d.dll!tupledealloc(PyTupleObject * op=0x012ddeb8)  Line 169 +
0x8a bytes	C
 	python26_d.dll!_Py_Dealloc(_object * op=0x012ddeb8)  Line 2044 + 0x7
bytes	C
 	python26_d.dll!clear_slots(_typeobject * type=0x00cbbac8, _object *
self=0x012de740)  Line 821 + 0x51 bytes	C
 	python26_d.dll!subtype_dealloc(_object * self=0x012de740)  Line 950
+ 0xd bytes	C
 	python26_d.dll!_Py_Dealloc(_object * op=0x012de740)  Line 2044 + 0x7
bytes	C
 	python26_d.dll!dict_dealloc(_dictobject * mp=0x00d538c0)  Line 907 +
0x6c bytes	C
 	python26_d.dll!_Py_Dealloc(_object * op=0x00d538c0)  Line 2044 + 0x7
bytes	C
 	python26_d.dll!dict_dealloc(_dictobject * mp=0x00d536c8)  Line 907 +
0x6c bytes	C
 	python26_d.dll!_Py_Dealloc(_object * op=0x00d536c8)  Line 2044 + 0x7
bytes	C
 	python26_d.dll!instance_dealloc(PyInstanceObject * inst=0x00d60bf8) 
Line 668 + 0x6c bytes	C
 	python26_d.dll!_Py_Dealloc(_object * op=0x00d60bf8)  Line 2044 + 0x7
bytes	C
 	python26_d.dll!insertdict(_dictobject * mp=0x00d53620, _object *
key=0x00d5c9b8, long hash=-1896994012, _object * value=0x1e2bb004)  Line
455 + 0x51 bytes	C
 	python26_d.dll!PyDict_SetItem(_object * op=0x00d53620, _object *
key=0x00d5c9b8, _object * value=0x1e2bb004)  Line 697 + 0x15 bytes	C
 	python26_d.dll!_PyModule_Clear(_object * m=0x00d63968)  Line 125 +
0x12 bytes	C
 	python26_d.dll!PyImport_Cleanup()  Line 479 + 0x9 bytes	C
 	python26_d.dll!Py_Finalize()  Line 452	C
 	python26_d.dll!Py_Exit(int sts=0)  Line 1690	C
 	python26_d.dll!handle_system_exit()  Line 1111 + 0x9 bytes	C
 	python26_d.dll!PyErr_PrintEx(int set_sys_last_vars=1)  Line 1123	C
 	python26_d.dll!PyErr_Print()  Line 1030 + 0x7 bytes	C
 	python26_d.dll!PyRun_SimpleFileExFlags(_iobuf * fp=0x10311448, const
char * filename=0x009d5d93, int closeit=1, PyCompilerFlags *
flags=0x0022ff30)  Line 931	C
 	python26_d.dll!PyRun_AnyFileExFlags(_iobuf * fp=0x10311448, const char
* filename=0x009d5d93, int closeit=1, PyCompilerFlags *
flags=0x0022ff30)  Line 731 + 0x15 bytes	C
 	python26_d.dll!Py_Main(int argc=5, char * * argv=0x009d5d68)  Line 600
+ 0x39 bytes	C
 	python_d.exe!main(int argc=5, char * * argv=0x009d5d68)  Line 23 +
0xe bytes	C
 	python_d.exe!__tmainCRTStartup()  Line 582 + 0x19 bytes	C
 	python_d.exe!mainCRTStartup()  Line 399	C
msg68275 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-06-16 17:30
Can you check whether the patch for issue3100 corrects the problem?
(see PyObject_ClearWeakRefs in the call stack)
msg68277 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2008-06-16 17:38
Yes, the patch weakref_cycle.patch from #3100 fixes the problem.
msg68288 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2008-06-16 18:56
> Thomas Heller <theller@ctypes.org> added the comment:
> 
> Yes, the patch weakref_cycle.patch from #3100 fixes the problem.

BTW: I also get a segfault on Linux, which is fixed by this patch.
msg68291 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-06-16 19:24
This is a duplicate of #3100, which has been corrected by r64309.
History
Date User Action Args
2022-04-11 14:56:35adminsetgithub: 47374
2008-06-16 19:24:01amaury.forgeotdarcsetstatus: open -> closed
resolution: duplicate
messages: + msg68291
2008-06-16 18:56:14thellersetmessages: + msg68288
2008-06-16 17:54:22jnollersetnosy: + jnoller
2008-06-16 17:38:50thellersetmessages: + msg68277
2008-06-16 17:30:51amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg68275
2008-06-16 17:25:41thellercreate