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

BUG: Fix incorrect refcounting in new asarray path #22236

Merged
merged 1 commit into from Sep 9, 2022

Conversation

seberg
Copy link
Member

@seberg seberg commented Sep 9, 2022

The new path to preserve dtypes provided by creating a view got the reference counting wrong, because it also hit the incref path that was needed for returning the identity.

This fixes up gh-21995

Closes gh-22233

@charris I keep forgetting how (should note it somewhere :)). Could you retrigger the nightlies, since this seems to affect downstream CI quite annoyingly.

The new path to preserve dtypes provided by creating a view got the
reference counting wrong, because it also hit the incref path that
was needed for returning the identity.

This fixes up numpygh-21995

Closes numpygh-22233
@seberg
Copy link
Member Author

seberg commented Sep 9, 2022

(I did not add a test, mem-leak testing would have found it easily, we just don't run it regularly. And it is so massive, that everyone notices anyway :))

@rgommers
Copy link
Member

rgommers commented Sep 9, 2022

@charris I keep forgetting how (should note it somewhere :)). Could you retrigger the nightlies, since this seems to affect downstream CI quite annoyingly.

I removed the broken wheels uploaded in the last ~30 hours. For the record, this is how:

$ anaconda login  # need credentials that access the bucket
$ anaconda show scipy-wheels-nightly/numpy  # shows all releases
$ # pick the right version (double check on web UI)
$ anaconda remove scipy-wheels-nightly/numpy/1.24.0.dev0+750.ge9295bf99

Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix @seberg!

@rgommers rgommers merged commit b63d475 into numpy:main Sep 9, 2022
@rgommers rgommers added this to the 1.24.0 release milestone Sep 9, 2022
@seberg seberg deleted the fixup--21995 branch September 9, 2022 08:52
@mattip
Copy link
Member

mattip commented Sep 9, 2022

One can also remove the wheels using the gui at https://anaconda.org/scipy-wheels-nightly/numpy/files if logged in and permitted.

To run the wheel CI

  • go to Actions at the top of the page -> Wheel builder (on the left under "workflows") -> "Run workflow" button in the blue area at the top of the table. This will run the x86 and macOS wheel builds
  • go to https://app.travis-ci.com/github/numpy/numpy -> options (hamburger menu on the right) -> trigger build which will build wheels for aarch64 and others.

@seberg
Copy link
Member Author

seberg commented Sep 9, 2022

Ah, thanks! I likely don't have rights to yank the wheels from anaconda, but there is no need for that anyway. However, triggering a new build should work for me probably.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Drastic memory usage increase in recent builds
3 participants