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

FIX: Remove potentially leaky continuation passing of EKGForwarder #34

Merged
merged 2 commits into from
Sep 20, 2024

Conversation

mgmeier
Copy link
Contributor

@mgmeier mgmeier commented Sep 17, 2024

This PR aims to fix space leaks that have presented themselves during info table profiling (see attachment):

  1. leaking EKGForward constructor - in the module indicated by the profiling results
  2. recvMsgDone / leaking () thunks

Additionally, package dependencies are bumped (typed-protocols ~ 0.1.1 and ouroboros-network-framework ~ 0.13.x) and maintenance info is updated.

image (1)

@mgmeier mgmeier marked this pull request as ready for review September 18, 2024 07:22
@mgmeier mgmeier requested a review from coot September 18, 2024 07:22
Comment on lines +47 to +49
MsgReq req -> Effect $ do
resp <- recvMsgReq req
return $ Yield (ServerAgency TokBusy) (MsgResp resp) go
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't really change when resp is evaluated to WHNF, maybe you'd like to add a !?

Copy link
Contributor Author

@mgmeier mgmeier Sep 18, 2024

Choose a reason for hiding this comment

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

Does that really change anything?

  1. resp hasn't shown to be leaky
  2. resp is basically a [(MetricName, MetricValue)], so eval'ing to WHNF here wouldn't make much difference
  3. the list gets always fully evaluated when the response is sent over the wire

However, if you think it makes a difference, I can add the bang - you decide.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's fine then. Thanks @mgmeier.

Copy link
Contributor

@coot coot left a comment

Choose a reason for hiding this comment

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

LGTM

@mgmeier mgmeier added this pull request to the merge queue Sep 20, 2024
Merged via the queue into master with commit 180df58 Sep 20, 2024
3 checks passed
@coot coot deleted the mkarg/fix-space-leak branch September 20, 2024 13: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