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.

Author vstinner
Recipients amaury.forgeotdarc, benjamin.peterson, pitrou, vstinner
Date 2008-08-21.16:26:57
SpamBayes Score 7.8123434e-05
Marked as misclassified No
Message-id <1219336019.69.0.338239992431.issue3611@psf.upfronthosting.co.za>
In-reply-to
Content
The bug is not closed :-/ With py3k trunk, I still get a crash. So I 
added a flag to detect inner calls. Here is an example of inner call 
backtrace:

(gdb) where
(...)
#2  0xb7df4201 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0x080a23a9 in PyErr_SetObject (exception=0x818b760, 
value=0xb75a3694) at Python/errors.c:61
#4  0x08094048 in do_raise (exc=0xb75a3694, cause=0x0) at 
Python/ceval.c:2928
#5  0x0808fa70 in PyEval_EvalFrameEx (f=0x83557d4, throwflag=0) at 
Python/ceval.c:1510
(...)
#23 0x08094bd8 in PyEval_CallObjectWithKeywords (func=0xb7a6c96c, 
arg=0xb7c6802c, kw=0x0) at Python/ceval.c:3283
#24 0x0806befd in slot_tp_del (self=0xb759d44c) at 
Objects/typeobject.c:5268
(...)
#26 0x0811f05d in PyDict_Clear (op=0xb7595e84) at 
Objects/dictobject.c:846
#27 0x08121112 in dict_tp_clear (op=0xb7595e84) at 
Objects/dictobject.c:1841
#28 0x080c81e9 in delete_garbage (collectable=0xbfcc75c4, 
old=0x8179434) at Modules/gcmodule.c:684
(...)
#31 0x080c9000 in _PyObject_GC_Malloc (basicsize=28) at 
Modules/gcmodule.c:1333
#32 0x08060aee in PyType_GenericAlloc (type=0x818b0a0, nitems=0) at 
Objects/typeobject.c:667
(...)
#37 0x080a24cc in PyErr_SetObject (exception=0x818b0a0, 
value=0xb75acea0) at Python/errors.c:87
(...)
#44 0x080912f7 in PyEval_EvalFrameEx (f=0x83660e4, throwflag=0) at 
Python/ceval.c:1940
(...)

First Python stack:

(gdb) pystack
/home/haypo/prog/py3k/Lib/io.py (1074): _flush_unlocked
/home/haypo/prog/py3k/Lib/io.py (1070): flush
/home/haypo/prog/py3k/Lib/io.py (1454): flush
/home/haypo/prog/py3k/Lib/io.py (1459): close
/home/haypo/prog/py3k/Lib/io.py (390): __del__
/home/haypo/fusil3000/fusil/process/cpu_probe.py (30): live
/home/haypo/fusil3000/fusil/mas/univers.py (15): executeAgent
(...)

Second Python stack:

(gdb) pystack
/home/haypo/fusil3000/fusil/process/cpu_probe.py (30): live
/home/haypo/fusil3000/fusil/mas/univers.py (15): executeAgent
/home/haypo/fusil3000/fusil/mas/univers.py (24): execute
/home/haypo/fusil3000/fusil/application.py (196): executeProject
(...)

So the real fix is to make PyErr_SetObject() re-entrant.
History
Date User Action Args
2008-08-21 16:26:59vstinnersetrecipients: + vstinner, amaury.forgeotdarc, pitrou, benjamin.peterson
2008-08-21 16:26:59vstinnersetmessageid: <1219336019.69.0.338239992431.issue3611@psf.upfronthosting.co.za>
2008-08-21 16:26:59vstinnerlinkissue3611 messages
2008-08-21 16:26:57vstinnercreate