cats-effect
cats-effect copied to clipboard
Some dumped fiber have no trace
Run the simple app https://github.com/jilen/fiber-trace-loss (use sbt runProd to trigger app).
Can see following dumps
cats.effect.IOFiber@2fd9bf76 RUNNING
├ delay @ controllers.DumpController.obtainDump(DumpController.scala:19)
├ delayBy @ controllers.DumpController.peoridicDump(DumpController.scala:15)
╰ flatMap @ controllers.DumpController.peoridicDump(DumpController.scala:15)
cats.effect.IOFiber@2774b73d WAITING
cats.effect.IOFiber@27f9edcb WAITING
cats.effect.IOFiber@64869333 WAITING
cats.effect.IOFiber@1a080051 WAITING
cats.effect.IOFiber@2e3e643a WAITING
cats.effect.IOFiber@6d2919e7 WAITING
Those fibers exists even no http request has been sent, don't know what those fibers are.
@jilen mentioned on Discord, and I suspect too, that at least some of those fibers are "system" fibers, e.g. started by CE itself. For example creating a dispatcher will start a supervisory fiber, and IIUC even though the fiber was started by code invoked by userland code, that fiber will only run CE code and thus its trace will always be omitted. This is like the two extra fibers in Node.js dumps. So maybe we need a way to indicate these system fibers?
Or at lease keep the last stack trace element