bpo-40928: notify users of osx malloc warnings by jdevries3133 · Pull Request #26783 · python/cpython

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

jdevries3133

This is a bandaid to help people save time debugging this non-bug. I don't think this solution is very strong; I'm just hoping to move the discussion forward on the bpo, and hoping for a hint on how to suppress these warnings all together or come up with some other optimal solution.

I applied the function in test_decimal because that test consistently generates these malloc warnings on my system.

https://bugs.python.org/issue40928

* When trying to allocate very large regions on OS X, malloc does not
  fail silently. It sends a very noisy error out to STDERR
* This provides a helper function to warn the user, and provides the
  warning for test_decimal, which consistently generates these warnings
  on my mac.

@jdevries3133

This is one of two potential fixes I've provided for bpo-40928. The other fix, #26786, gets more to the root of the problem. This is more of a simple band-aid.

@github-actions

This PR is stale because it has been open for 30 days with no activity.

ambv

Copy link

Contributor

@ambv ambv left a comment

This is a safe change to introduce regardless of what we do with the root cause.

@bedevere-bot

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@jdevries3133

@ambv Ok, your suggested changes were incorporated in 4859c7e. Thanks!

@jdevries3133

I have made the requested changes; please review again

@bedevere-bot

Thanks for making the requested changes!

@ambv: please review the changes made to this pull request.

@miss-islington

Thanks @jdevries3133 for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@miss-islington

Thanks @jdevries3133 for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington

Sorry @jdevries3133 and @ambv, I had trouble checking out the 3.9 backport branch.
Please backport using cherry_picker on command line.
cherry_picker 15d3c14df32a35ac69898a7852115722e30d7857 3.9

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Aug 6, 2021
…ngs (pythonGH-26783)

* When trying to allocate very large regions on macOS, malloc does not   fail silently. It sends a noisy error out to STDERR
* This provides a helper function to warn the user, and provides the warning for test_decimal, which consistently generates these warnings on macOS.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 15d3c14)

Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>

@bedevere-bot

@miss-islington

Thanks @jdevries3133 for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@miss-islington

Sorry, @jdevries3133 and @ambv, I could not cleanly backport this to 3.9 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 15d3c14df32a35ac69898a7852115722e30d7857 3.9

ambv pushed a commit to ambv/cpython that referenced this pull request

Aug 6, 2021
… warnings (pythonGH-26783)

* When trying to allocate very large regions on macOS, malloc does not   fail silently. It sends a noisy error out to STDERR
* This provides a helper function to warn the user, and provides the warning for test_decimal, which consistently generates these warnings on macOS.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>.
(cherry picked from commit 15d3c14)

Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>

@bedevere-bot

ambv added a commit that referenced this pull request

Aug 6, 2021
… warnings (GH-26783) (GH-27629)

* When trying to allocate very large regions on macOS, malloc does not   fail silently. It sends a noisy error out to STDERR
* This provides a helper function to warn the user, and provides the warning for test_decimal, which consistently generates these warnings on macOS.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>.
(cherry picked from commit 15d3c14)

Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>

miss-islington added a commit that referenced this pull request

Aug 6, 2021
…ngs (GH-26783)

* When trying to allocate very large regions on macOS, malloc does not   fail silently. It sends a noisy error out to STDERR
* This provides a helper function to warn the user, and provides the warning for test_decimal, which consistently generates these warnings on macOS.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 15d3c14)

Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>