Message221654
The problem is in the ceval.c, the core of Python bytecode interpreter. For performances, it doesn't check if pending calls should be called for each instructio. It uses "fast dispatch" which doesn't check pending calls. The problem is that a signal schedules a pending call. The scheduled call is never executed on Python 2.
Python 3.2 introduced an atomic eval_breaker variable which fixes this issue. It is part of the huge change "new GIL":
---
changeset: 57175:fdd6484f1210
parent: 57172:6d91aaadddd0
user: Antoine Pitrou <solipsis@pitrou.net>
date: Tue Nov 10 19:50:40 2009 +0000
files: Include/ceval.h Include/pystate.h Include/sysmodule.h Lib/test/test_sys.py Makefile.pre.in Objects/longob
description:
Merge in the new GIL.
---
I'm not sure that it would be possible to only backport the "eval_breaker" variable. Anyway, changing ceval.c in minor Python 2.7 release is risky. I would prefer to close the bug as wontfix. IMO the safe solution is to upgrade to Python 3.2 or later. |
|
Date |
User |
Action |
Args |
2014-06-26 22:41:18 | vstinner | set | recipients:
+ vstinner, pitrou, r.david.murray, apsaras |
2014-06-26 22:41:18 | vstinner | set | messageid: <1403822478.12.0.542701692821.issue21870@psf.upfronthosting.co.za> |
2014-06-26 22:41:18 | vstinner | link | issue21870 messages |
2014-06-26 22:41:17 | vstinner | create | |
|