msg190162 - (view) |
Author: Brett Cannon (brett.cannon) *  |
Date: 2013-05-28 01:02 |
If you run any test that has infinite recursion (test_json test_exceptions test_sys test_runpy) it will segfault with a fresh checkout under OS X 10.8.3 using Clang. Not sure how widespread this is.
I did check that I am using a clean checkout of the default branch.
|
msg190192 - (view) |
Author: Ronald Oussoren (ronaldoussoren) *  |
Date: 2013-05-28 10:23 |
I can confirm the problem. It appears to be a stack overflow, when I increase the stack size of the main thead (by adding "-Wl,-stack_size,2faf000" to the link command for BUILDPYTHON) the crash in test_json goes away.
Appearently the default maximum stack size isn't large enough for the default value of the recursion limit.
An easy workaround (fix?) would be to add -Wl,-stack_size,VALUE to the link flags on OSX, for some sane value of VALUE. The value is the maximum size of the stack of the main thread and doesn't affect process size unless a process actually uses more stack space. It does affect the available free address space, and hence the maximum stack size shouldn't be increased too far (especially for 32-bit builds)
|
msg190200 - (view) |
Author: Ronald Oussoren (ronaldoussoren) *  |
Date: 2013-05-28 12:31 |
The attached patch fixes the problem on OSX by increasing the maximum stack size of the main thread from 8M (the default) to 16M.
NOTE: The -Wl,-stack_size,... option cannot be added to LDFLAGS, ld errors out when that option is used when linking a shared library (such as the extensions or libpython.dylib)
|
msg190205 - (view) |
Author: Ronald Oussoren (ronaldoussoren) *  |
Date: 2013-05-28 13:20 |
The update fixes the name error mention in rietveld.
|
msg190206 - (view) |
Author: Brett Cannon (brett.cannon) *  |
Date: 2013-05-28 13:26 |
LGTM
|
msg190354 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2013-05-30 11:49 |
> Appearently the default maximum stack size isn't large enough for the default value of the recursion limit.
Why not changing the recursion limit instead of the size of the stack?
|
msg190355 - (view) |
Author: Ronald Oussoren (ronaldoussoren) *  |
Date: 2013-05-30 12:18 |
I'd prefer to keep the default recursion limit the same as on Linux, changing the recursion limit on OSX would just introduce an unnecessary difference between the two platforms.
The patch changes the maximum stack size from 8 to 16 MByte, neither of which is huge and shouldn't cause other problems.
I'd also like to increase the default stack size for newly created threads (see #18049) and will update that patch to create a 16 MByte stack as well.
|
msg190356 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2013-05-30 12:50 |
> The patch changes the maximum stack size from 8 to 16 MByte, neither of which is huge and shouldn't cause other problems.
On Mac OS X: Is the memory allocated at Python startup, or on demand,
as the stack grows? If I am correct, the physical memory is allocated
on demand on Linux.
2013/5/30 Ronald Oussoren <report@bugs.python.org>:
>
> Ronald Oussoren added the comment:
>
> I'd prefer to keep the default recursion limit the same as on Linux, changing the recursion limit on OSX would just introduce an unnecessary difference between the two platforms.
>
> The patch changes the maximum stack size from 8 to 16 MByte, neither of which is huge and shouldn't cause other problems.
>
> I'd also like to increase the default stack size for newly created threads (see #18049) and will update that patch to create a 16 MByte stack as well.
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue18075>
> _______________________________________
|
msg190358 - (view) |
Author: Ronald Oussoren (ronaldoussoren) *  |
Date: 2013-05-30 13:33 |
On 30 May, 2013, at 14:50, STINNER Victor <report@bugs.python.org> wrote:
>
> STINNER Victor added the comment:
>
>> The patch changes the maximum stack size from 8 to 16 MByte, neither of which is huge and shouldn't cause other problems.
>
> On Mac OS X: Is the memory allocated at Python startup, or on demand,
> as the stack grows? If I am correct, the physical memory is allocated
> on demand on Linux.
Memory for the stack is allocated on demand, the parameter sets the maximum size that the stack can grow to. See also man ld(1).
Ronald
|
msg190378 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2013-05-30 19:02 |
New changeset b07ad4b5e349 by Łukasz Langa in branch 'default':
Fixed #18075 - Infinite recursion tests triggering a segfault on Mac OS X
http://hg.python.org/cpython/rev/b07ad4b5e349
|
msg341111 - (view) |
Author: Ned Deily (ned.deily) *  |
Date: 2019-04-29 19:07 |
New changeset 883dfc668f9730b00928730035b5dbd24b9da2a0 by Ned Deily in branch 'master':
bpo-34602: Avoid failures setting macOS stack resource limit (GH-13011)
https://github.com/python/cpython/commit/883dfc668f9730b00928730035b5dbd24b9da2a0
|
msg341113 - (view) |
Author: miss-islington (miss-islington) |
Date: 2019-04-29 19:27 |
New changeset 52a5b71063af68c42b048095c4e555e93257f151 by Miss Islington (bot) in branch '3.7':
bpo-34602: Avoid failures setting macOS stack resource limit (GH-13011)
https://github.com/python/cpython/commit/52a5b71063af68c42b048095c4e555e93257f151
|
msg341117 - (view) |
Author: Ned Deily (ned.deily) *  |
Date: 2019-04-29 19:57 |
New changeset fbe2a1394bf52f5a4455681e1b1f705a31559585 by Ned Deily (Miss Islington (bot)) in branch '3.6':
bpo-34602: Avoid failures setting macOS stack resource limit (GH-13011) (GH-13014)
https://github.com/python/cpython/commit/fbe2a1394bf52f5a4455681e1b1f705a31559585
|
msg347112 - (view) |
Author: Ned Deily (ned.deily) *  |
Date: 2019-07-02 07:12 |
New changeset 5bbbc733e6cc0804f19b071944af8d4719e26ae6 by Ned Deily in branch 'master':
bpo-34602: Avoid failures setting macOS stack resource limit (GH-14546)
https://github.com/python/cpython/commit/5bbbc733e6cc0804f19b071944af8d4719e26ae6
|
msg347114 - (view) |
Author: miss-islington (miss-islington) |
Date: 2019-07-02 07:31 |
New changeset bd92b94da93198c8385c06ca908407f172c7e8b2 by Miss Islington (bot) in branch '3.8':
bpo-34602: Avoid failures setting macOS stack resource limit (GH-14546)
https://github.com/python/cpython/commit/bd92b94da93198c8385c06ca908407f172c7e8b2
|
msg347116 - (view) |
Author: miss-islington (miss-islington) |
Date: 2019-07-02 07:38 |
New changeset bf82cd3124df94935c6e3190c7c40b76918d2174 by Miss Islington (bot) in branch '3.7':
bpo-34602: Avoid failures setting macOS stack resource limit (GH-14546)
https://github.com/python/cpython/commit/bf82cd3124df94935c6e3190c7c40b76918d2174
|
msg347118 - (view) |
Author: Ned Deily (ned.deily) *  |
Date: 2019-07-02 07:49 |
New changeset 782854f90ad5f73f787f68693d535f2b05514e13 by Ned Deily (Miss Islington (bot)) in branch '3.6':
bpo-34602: Avoid failures setting macOS stack resource limit (GH-14546) (GH-14549)
https://github.com/python/cpython/commit/782854f90ad5f73f787f68693d535f2b05514e13
|
msg347166 - (view) |
Author: Ned Deily (ned.deily) *  |
Date: 2019-07-02 22:34 |
New changeset dcc0eb379613f279864af61023ea44c94aa0535c by Ned Deily (Miss Islington (bot)) in branch '3.7':
bpo-34602: Avoid failures setting macOS stack resource limit (GH-14546)
https://github.com/python/cpython/commit/dcc0eb379613f279864af61023ea44c94aa0535c
|
|
Date |
User |
Action |
Args |
2022-04-11 14:57:46 | admin | set | github: 62275 |
2019-07-02 22:34:03 | ned.deily | set | messages:
+ msg347166 |
2019-07-02 07:49:02 | ned.deily | set | messages:
+ msg347118 |
2019-07-02 07:38:41 | miss-islington | set | messages:
+ msg347116 |
2019-07-02 07:31:12 | miss-islington | set | messages:
+ msg347114 |
2019-07-02 07:13:05 | miss-islington | set | pull_requests:
+ pull_request14366 |
2019-07-02 07:12:52 | miss-islington | set | pull_requests:
+ pull_request14364 |
2019-07-02 07:12:43 | miss-islington | set | pull_requests:
+ pull_request14362 |
2019-07-02 07:12:37 | ned.deily | set | messages:
+ msg347112 |
2019-07-02 06:55:43 | ned.deily | set | pull_requests:
+ pull_request14360 |
2019-06-21 18:35:45 | ned.deily | link | issue37365 superseder |
2019-04-29 19:57:20 | ned.deily | set | messages:
+ msg341117 |
2019-04-29 19:32:07 | miss-islington | set | pull_requests:
+ pull_request12937 |
2019-04-29 19:27:39 | miss-islington | set | nosy:
+ miss-islington messages:
+ msg341113
|
2019-04-29 19:08:00 | miss-islington | set | pull_requests:
+ pull_request12935 |
2019-04-29 19:07:44 | ned.deily | set | nosy:
+ ned.deily messages:
+ msg341111
|
2019-04-29 18:48:20 | ned.deily | set | pull_requests:
+ pull_request12933 |
2013-05-30 19:31:46 | lukasz.langa | set | status: open -> closed resolution: fixed |
2013-05-30 19:02:29 | python-dev | set | nosy:
+ python-dev messages:
+ msg190378
|
2013-05-30 13:33:40 | ronaldoussoren | set | messages:
+ msg190358 |
2013-05-30 12:50:20 | vstinner | set | messages:
+ msg190356 |
2013-05-30 12:18:35 | ronaldoussoren | set | messages:
+ msg190355 |
2013-05-30 11:49:08 | vstinner | set | nosy:
+ vstinner messages:
+ msg190354
|
2013-05-28 13:26:36 | brett.cannon | set | assignee: ronaldoussoren messages:
+ msg190206 |
2013-05-28 13:20:37 | ronaldoussoren | set | files:
+ issue-18075-osx-stacksize-update.txt
messages:
+ msg190205 |
2013-05-28 12:31:27 | ronaldoussoren | set | files:
+ issue-18075-osx-stacksize.txt
messages:
+ msg190200 stage: patch review |
2013-05-28 10:23:38 | ronaldoussoren | set | nosy:
+ ronaldoussoren messages:
+ msg190192
|
2013-05-28 01:02:08 | brett.cannon | create | |