Skip to content
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

bpo-40928: notify users of osx malloc warnings #26783

Merged
merged 7 commits into from Aug 6, 2021

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

github-actions bot commented Jul 19, 2021

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

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

Lib/test/support/__init__.py Outdated Show resolved Hide resolved
Lib/test/support/__init__.py Outdated Show resolved Hide resolved
@bedevere-bot
Copy link

bedevere-bot commented Aug 2, 2021

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

jdevries3133 commented Aug 2, 2021

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

@jdevries3133
Copy link
Contributor Author

jdevries3133 commented Aug 2, 2021

I have made the requested changes; please review again

@bedevere-bot
Copy link

bedevere-bot commented Aug 2, 2021

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 Aug 2, 2021
@github-actions github-actions bot removed the stale Stale PR or inactive for long period of time. label Aug 3, 2021
@ambv ambv merged commit 15d3c14 into python:main Aug 6, 2021
13 checks passed
@miss-islington
Copy link
Contributor

miss-islington commented Aug 6, 2021

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

miss-islington commented Aug 6, 2021

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

miss-islington commented Aug 6, 2021

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

bedevere-bot commented Aug 6, 2021

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

@miss-islington
Copy link
Contributor

miss-islington commented Aug 6, 2021

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

miss-islington commented Aug 6, 2021

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

bedevere-bot commented Aug 6, 2021

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 <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>
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.

None yet

5 participants