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 karzes
Recipients karzes
Date 2020-10-02.18:01:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1601661685.77.0.221830308398.issue41912@roundup.psfhosted.org>
In-reply-to
Content
If I create a sufficiently long chain of generators, I encounter a segmentation fault.  For example, the following works as expected:

    % ./gen_bug3.py 10000
    10000
    %

But for sufficiently larger chain lengths, it seg faults:

    % ./gen_bug3.py 20000
    Segmentation fault (core dumped)
    %

and:

    % ./gen_bug3.py 100000
    Segmentation fault (core dumped)
    %

The exact point where it seg faults seems to vary slightly between different invocations of Python, but the range is very narrow for a given Python installation.  I believe the difference is due to slight variations in used memory upon startup.

I can't see any reason why this should happen, and in any case, if there is some limit that I'm exceeding, it should raise an exception rather than core dump.

I'm using:

    3.6.9 (default, Jul 17 2020, 12:50:27)
    [GCC 8.4.0]

on a 64-bit Ubuntu Linux system.

Additional info:  A friend of mine is running 3.7.9 on a Windows system.  In his case, the symptom is that the program produces no output for a sufficiently long generator chain (presumably it's silently crashing).  Additionally, he encounters the problem with much shorter generator chains than I do.  I suspect it's the same underlying problem.
History
Date User Action Args
2020-10-02 18:01:26karzessetrecipients: + karzes
2020-10-02 18:01:25karzessetmessageid: <1601661685.77.0.221830308398.issue41912@roundup.psfhosted.org>
2020-10-02 18:01:25karzeslinkissue41912 messages
2020-10-02 18:01:25karzescreate