-
Notifications
You must be signed in to change notification settings - Fork 607
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
Memory leaks #2394
Comments
@svalaskevicius Good afternoon, Sarunas. We would like to help you fix this issue as soon as possible, although of course we may need some help. For some convenience, could you please open a Pull Request adding a test, or an executable program with that leak? That would help us work on it. Also, on which version of |
Hi! Both the fs2 version and the program are in the description, as snippets of text. That is the full program that can replicate it. I can ofc upload the whole project as well - will do as a pr, as you've suggested |
@diesalbla |
I cannot recall why it was kept outside of the unit tests folder |
@diesalbla , please see #2395 for the example project. I have added |
Well, not the whole project, but if you can clone We have been doing some changes to the pull structure and the interpreter over the last months, so we may be look (bisect) for a version in the |
@diesalbla I pushed a reproduction to
|
Interestingly, the project this problem occurred does not use awake every, it instead reads via http4s stream and decodes the stream to messages.. Also, if the foreach line is done before map identity - all seems ok |
Here's a simpler reproduction that doesn't use Stream.constant(()).flatMap(_ => Stream(())).map(identity).flatMap(_ => Stream.empty) Problem appears to be related to the interleaving of |
This was found when we used: |
the results from bisect: e25a6e1 is the first bad commit
core/shared/src/main/scala/fs2/Pull.scala | 56 ++++++++++++-------------------
|
Hi, we've been hit by a memory leak in fs2:
Simplest example to reproduce:
The fs2 pull/bind etc objects keep being accumulated in memory and never freed, also, they seem to form a cycle:
Also, a colleague mentioned, that Stream.repeat method also leaks, and while I haven't looked at that, it may be related.
Needless to say, this is a rather serious issue and is a blocker for us.
The text was updated successfully, but these errors were encountered: