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.
Created on 2013年04月08日 22:49 by fhamand, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| segfault.zip | fhamand, 2013年04月08日 22:55 | minimum case to reproduce | ||
| gen_fix.patch | benjamin.peterson, 2013年04月09日 04:15 | review | ||
| Messages (6) | |||
|---|---|---|---|
| msg186354 - (view) | Author: Frank Hamand (fhamand) | Date: 2013年04月08日 22:55 | |
I've found a very strange bug in python 3.3 It's taken me around an hour just to narrow it down to a small case where it happens. I cannot for the life of me figure out the exact cause. It seems to have something to do with "yield from". I've attached a case which reproduces this. Run python3.3 test.py, it should segfault on linux, "stopped responding" on windows. Tested with OS: Linux Debian-60-squeeze-32-minimal 2.6.32-5-686-bigmem PY: Python 3.3.1rc1 (default, Mar 30 2013, 21:44:39) OS: Windows 7 64 bit PY: Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32 NOTES: If you get rid of "import logging" in generators.py, it only crashes if there's no __pycache__ |
|||
| msg186355 - (view) | Author: Frank Hamand (fhamand) | Date: 2013年04月08日 22:59 | |
The file contents so people dont have to download the zip: generators.py: --------------------------- def subgen(): yield def other_gen(self): move = yield from subgen() game.py: --------------------------- class Game(object): def __init__(self): self.gen = self.first_gen() next(self.gen) def first_gen(self): while True: from generators import \ other_gen yield from other_gen(self) test.py: --------------------------- from game import Game Game() |
|||
| msg186365 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2013年04月09日 01:27 | |
The crashing version has 'import logging' at the top of generators.py. I did not experience a crash when it was absent even if there was no __pycache__. It also doesn't crash if the import is moved out of the body of first_gen. FAULTHANDLER doesn't fair too well on this one, no real surprise :) Fatal Python error: Segmentation fault Current thread 0xb75856c0: zsh: segmentation fault PYTHONFAULTHANDLER=true ../python test.py |
|||
| msg186370 - (view) | Author: Benjamin Peterson (benjamin.peterson) * (Python committer) | Date: 2013年04月09日 04:15 | |
This is the patch. I'll have to think about whether there's a self-contained way to test this. |
|||
| msg186530 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2013年04月10日 21:01 | |
New changeset 35cb75b9d653 by Benjamin Peterson in branch '3.3': don't run frame if it has no stack (closes #17669) http://hg.python.org/cpython/rev/35cb75b9d653 New changeset 0b2d4089180c by Benjamin Peterson in branch 'default': merge 3.3 (#17669) http://hg.python.org/cpython/rev/0b2d4089180c |
|||
| msg193797 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2013年07月27日 21:07 | |
New changeset 516303f32bad by Benjamin Peterson in branch '3.3': add a test for issue #17669 (closes #18565) http://hg.python.org/cpython/rev/516303f32bad |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:44 | admin | set | github: 61869 |
| 2013年07月29日 08:55:44 | pconnell | set | nosy:
+ pconnell |
| 2013年07月27日 21:07:37 | python-dev | set | messages: + msg193797 |
| 2013年04月10日 21:01:45 | python-dev | set | status: open -> closed nosy: + python-dev messages: + msg186530 resolution: fixed stage: resolved |
| 2013年04月09日 20:48:43 | Arfrever | set | nosy:
+ Arfrever |
| 2013年04月09日 04:15:54 | benjamin.peterson | set | files:
+ gen_fix.patch assignee: benjamin.peterson messages: + msg186370 keywords: + patch |
| 2013年04月09日 01:27:24 | r.david.murray | set | nosy:
+ r.david.murray, pitrou, eric.snow, vinay.sajip, brett.cannon messages: + msg186365 versions: + Python 3.4 |
| 2013年04月08日 23:24:34 | pitrou | set | nosy:
+ ncoghlan, benjamin.peterson |
| 2013年04月08日 22:59:10 | fhamand | set | messages: + msg186355 |
| 2013年04月08日 22:55:26 | fhamand | set | files:
+ segfault.zip messages: + msg186354 title: Segfault caused by -> Segfault caused by weird combination of imports and yield from |
| 2013年04月08日 22:49:14 | fhamand | create | |