Skip to content

Intermittent runtime exists with cause Traced(...) errors. #593

Description

@masonedmison

I am using interop-catz (version=13.0.0.0 and zio version = 1.0.9) to interop with http4s. I am currently getting intermittent runtime exits errors.

c.a.d.oa.Main$ - ZIO runtime exits with cause Traced(Interrupt(Id(1659108336520,76)),ZTrace(Id(1659108336524,80),List(SourceLocation(Promise.scala,zio.Promise,await,52), SourceLocation(ZIO.scala,zio.ZIO$,effectAsyncInterrupt,2725), SourceLocation(ZIO.scala,zio.ZIO$,effectAsyncInterrupt,2725), SourceLocation(ZIO.scala,zio.ZIO$,effectSuspendTotal,2791), SourceLocation(ZIO.scala,<unknown>,<unknown>,0)),List(SourceLocation(ZIO.scala,zio.ZIO$,_IdentityFn,4233), SourceLocation(ZIO.scala,zio.ZIO,onInterrupt,1051), SourceLocation(ZIO.scala,zio.ZIO$,zio$ZIO$$_succeedRight,4417), SourceLocation(Monad.scala,cats.Monad,map,18), SourceLocation(InterruptContext.scala,fs2.internal.InterruptContext,completeWhen,52), SourceLocation(ZIO.scala,zio.ZIO,run,1730), SourceLocation(ZIO.scala,zio.ZIO,onExit,1027)),Some(ZTrace(Id(1659108336524,79),List(SourceLocation(cats.scala,zio.interop.ZioConcurrent,start,262), SourceLocation(ZRef.scala,zio.ZRef$,make,756), SourceLocation(Scope.scala,fs2.internal.Scope,acquireResource,188), SourceLocation(Monad.scala,cats.Monad,map,18), SourceLocation(ZioAsync.scala,zio.interop.ZioAsync,unique,22), SourceLocation(ScopedResource.scala,fs2.internal.ScopedResource$,create,124), SourceLocation(cats.scala,zio.interop.ZioConcurrent,ref,254), SourceLocation(ZRef.scala,zio.ZRef$,make,756), SourceLocation(ZIO.scala,zio.ZIO$,effectSuspendTotal,2791), SourceLocation(ZIO.scala,<unknown>,<unknown>,0)),List(SourceLocation(cats.scala,zio.interop.ZioConcurrent,start,263), SourceLocation(Monad.scala,cats.Monad,map,18), SourceLocation(ApplicativeError.scala,cats.ApplicativeError,attempt,96), SourceLocation(MonadError.scala,cats.MonadError,redeemWith,78), SourceLocation(ZIO.scala,zio.ZIO$,zio$ZIO$$_succeedRight,4417), SourceLocation(ZIO.scala,zio.ZIO,run,1730), SourceLocation(ZIO.scala,zio.ZIO,onExit,1027)),Some(ZTrace(Id(1659108336520,76),List(SourceLocation(cats.scala,zio.interop.ZioConcurrent,racePair,329) // ... elided

I am creating an http4s.server.Server like:

   import zio.interop.catz.implicits._
    EmberServerBuilder
      .default[Task]
      .withHost(config.httpServerConfig.host)
      .withPort(config.httpServerConfig.port)
      .withHttpApp(app)
      .build
      .toManagedZIO

Something that might of interest is that there is a Runtime being created in Main and threaded through other parts of the application - this runtime is (unfortunately) used to unsafeRun effects.

val internalRuntime = Runtime.default.mapPlatform(_.withReportFailure(logCause(logger.info, logger.info)))

I will err on the side of being vague here at first as I am not even sure where to begin in deciphering this stack trace and therefore which information to provide. That said, I am more than happy to add any relevant details that might be helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions