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

Remove vector for memory leak #268

Merged
merged 1 commit into from
Nov 2, 2021
Merged

Conversation

hannahhoward
Copy link
Collaborator

Goals

We pass one a "Block" interface for subscribers for BlockQueued and BlockSent hooks. The interface has no access to the data, but right now we hold a reference the raw block data in the implementing struct, and use it to calculate values. There's no need for this and ... eek... this could be a huge memory leak vector. It would also explain partly why we've had trouble replicating memory leaks in testplans -- it would be dependent on the behavior of the subscriber.

Anyway, can't hurt, and defensive programming

Copy link
Member

@whyrusleeping whyrusleeping left a comment

Choose a reason for hiding this comment

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

This seems like it should solve the issue i was suspicious of (and generally seems like a good change for memory pressure in any case), but if it does fix what i was seeing, then that still means that these block operations are getting stuck in the subscriber thingy and we still need to figure that bit out

@hannahhoward
Copy link
Collaborator Author

@whyrusleeping I agree, and unfortunately I believe the subscriber with the issue may be go-data-transfer :(

@hannahhoward hannahhoward merged commit 763fa44 into main Nov 2, 2021
@aschmahmann aschmahmann mentioned this pull request Dec 1, 2021
80 tasks
@mvdan mvdan deleted the feat/no-data-block-operation branch December 15, 2021 14:17
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.

2 participants