Skip to content

BUG: Fix incorrect refcounting in new asarray path#22236

Merged
rgommers merged 1 commit intonumpy:mainfrom
seberg:fixup--21995
Sep 9, 2022
Merged

BUG: Fix incorrect refcounting in new asarray path#22236
rgommers merged 1 commit intonumpy:mainfrom
seberg:fixup--21995

Conversation

@seberg
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

@seberg
Copy link
Copy Markdown
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