Message11288

Author zyasoft
Recipients jamesmudd, jeff.allen, stefan.richthofer, zyasoft
Date 2017-04-02.15:18:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1491146330.88.0.731847674116.issue2536@psf.upfronthosting.co.za>
In-reply-to
Content
Per https://hg.python.org/cpython/rev/a21f5af476cb (part of http://bugs.python.org/issue12051, which added test_endless_recursion), we most likely want to do a defensive use of ThreadState#enterCall, so we can reduce the expected amount of "available" stack.

Note that prior to 2.7.0, we did not have a Java accelerator (port of _json.c), so this problem never occurred because it was only in Python code (which always checks on every call). In general, I would have expected the call to the default function would cause enough checking, but apparently not.

There's a subtle interaction between https://docs.python.org/2/library/sys.html#sys.setrecursionlimit (by default 1000, https://github.com/jythontools/jython/blob/master/src/org/python/core/PySystemState.java#L167), the actual memory for the stack (set by -Xss), and how much Java code is actually executed. It looks like we have been exploring this subtlety during the course of this bug.

I don't think there's much more we can ask Java itself to do here; much like CPython, we have to code even more defensively.
History
Date User Action Args
2017-04-02 15:18:50zyasoftsetmessageid: <1491146330.88.0.731847674116.issue2536@psf.upfronthosting.co.za>
2017-04-02 15:18:50zyasoftsetrecipients: + zyasoft, jeff.allen, stefan.richthofer, jamesmudd
2017-04-02 15:18:50zyasoftlinkissue2536 messages
2017-04-02 15:18:50zyasoftcreate