Karthikeyan Singaravelan added the comment:
I can also reproduce the original script's segfault in 2.7 but not in master.
There is a related bug as per the original description by Dmitry that
itertools.tee is not thread safe in https://bugs.python.org/msg323817 and a
related SO answer to
Change by Xiang Zhang :
--
resolution: -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder: -> itertools.tee not thread-safe; can segfault interpreter when
wrapped iterator releases GIL
___
Python tracker
Raymond Hettinger added the comment:
Is it expected?
No, it is a bug.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24482
___
___
Changes by Dmitry Odzerikho dmitry.odzeri...@gmail.com:
Added file: http://bugs.python.org/file39757/test_segfault.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24482
___
Serhiy Storchaka added the comment:
I can't reproduce the crash in 3.3+ (this doesn't matter the bug is gone), but
can reproduce in 2.7 and 3.2. Here is a reproducer that compatible with 2.7 and
3.x.
--
Added file: http://bugs.python.org/file39762/test_segfault.py
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24482
___
___
New submission from Dmitry Odzerikho:
Hi,
I'm using iterators returned by itertools.tee in different threads. The
original iterator passed to itertools.tee is thread-safe, however, it doesn't
guarantees that the cloned iterators are thread safe too. However the
equivalent implementation of
Changes by Dmitry Odzerikho dmitry.odzeri...@gmail.com:
Removed file: http://bugs.python.org/file39756/test_segfault.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24482
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +rhettinger
stage: - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24482
___