Skip to content

Conversation

@jdevries3133
Copy link
Contributor

@jdevries3133 jdevries3133 commented Jun 18, 2021

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
Copy link
Contributor Author

jdevries3133 commented Jun 18, 2021

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
Copy link

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

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Jul 19, 2021
Copy link
Contributor

@ambv ambv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@bedevere-bot
Copy link

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
Copy link
Contributor Author

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

@jdevries3133
Copy link
Contributor Author

I have made the requested changes; please review again

@bedevere-bot
Copy link

Thanks for making the requested changes!

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

@bedevere-bot bedevere-bot requested a review from ambv August 2, 2021 19:43
@github-actions github-actions bot removed the stale Stale PR or inactive for long period of time. label Aug 3, 2021
@miss-islington
Copy link
Contributor

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

@miss-islington
Copy link
Contributor

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
Copy link
Contributor

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 <[email protected]>
(cherry picked from commit 15d3c14)

Co-authored-by: Jack DeVries <[email protected]>
@bedevere-bot
Copy link

GH-27628 is a backport of this pull request to the 3.10 branch.

@miss-islington
Copy link
Contributor

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

@miss-islington
Copy link
Contributor

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 <[email protected]>.
(cherry picked from commit 15d3c14)

Co-authored-by: Jack DeVries <[email protected]>
@bedevere-bot
Copy link

GH-27629 is a backport of this pull request to the 3.9 branch.

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 <[email protected]>.
(cherry picked from commit 15d3c14)

Co-authored-by: Jack DeVries <[email protected]>
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 <[email protected]>
(cherry picked from commit 15d3c14)

Co-authored-by: Jack DeVries <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants