[issue25323] Bus error: 10 when executing recursive program

2015-10-22 Thread Ronald Oussoren
Ronald Oussoren added the comment: W.r.t. the bus error on OSX: see issue #18049, the default stack size on OSX is too small to reach the default recursion limit. -- ___ Python tracker

[issue25323] Bus error: 10 when executing recursive program

2015-10-06 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: -> not a bug status: open -> closed ___ Python tracker ___

[issue25323] Bus error: 10 when executing recursive program

2015-10-06 Thread Radosław Ejsmont
New submission from Radosław Ejsmont: When I execute a recursive deep tree reconstruction algorithm (depth ~2) I am hitting a bus error 10. I have modified the recursion limit accordingly (sys.setrecursionlimit(2)). I am running python 2.7.10 on OS X 10.11. The code I am running is

[issue25323] Bus error: 10 when executing recursive program

2015-10-06 Thread Mark Dickinson
Mark Dickinson added the comment: > You may have to enlarge the C stack The following might work (e.g., in bash shell) ulimit -s 6 Here the count is in KiB, so that's setting a stack size of about 58.6 MiB. There appears to be a system-wide limit of close to 64 MiB, so pushing past

[issue25323] Bus error: 10 when executing recursive program

2015-10-06 Thread eryksun
eryksun added the comment: I don't know about OS X, but in 64-bit Linux I can increase the recursion limit to 10 if I allow the main thread to grow to 64 MiB by setting the RLIMIT_STACK soft limit. For example: soft, hard = resource.getrlimit(resource.RLIMIT_STACK) soft =

[issue25323] Bus error: 10 when executing recursive program

2015-10-06 Thread STINNER Victor
STINNER Victor added the comment: Well, Python tries to protect you against stack overflow, but the protection is not perfect. You may have to enlarge the C stack, but I don't know how. Workaround: try to rewrite your algorithm to use a lower recursion depth. -- nosy: +haypo