-
-
Notifications
You must be signed in to change notification settings - Fork 629
Memory leaks #2394
Copy link
Copy link
Closed
Description
Hi, we've been hit by a memory leak in fs2:
lazy val catsVersion = "2.6.0"
lazy val catsEffectVersion = "3.1.0"
lazy val fs2Version = "3.0.2"Simplest example to reproduce:
package example
import cats.effect.IOApp
import cats.effect.{ExitCode, IO}
import fs2.Stream
import fs2.Pull
import scala.concurrent.duration._
object Hello extends IOApp {
override def run(args: List[String]): IO[ExitCode] =
Stream
.awakeEvery[IO](2.milli)
.map(identity _)
.foreach(_ => IO.unit)
.compile
.drain
.as(ExitCode.Success)
}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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
