Skip to content

Asynchronous exceptions can put the external interpreter into an unrecoverable state #342

Description

@Saizan

Tracking relevant GHC issue https://gitlab.haskell.org/ghc/ghc/-/work_items/18852

If the host received an async exception while waiting for an external interpreter reply it will try to terminate the interpreter.

Ben's summary from the ticket:

As far as I can tell, there are three orthogonal issues here:

  1. GHC is too aggressive in tearing down iserv when an exception is seen. Asynchronous exceptions cancelling computation are not a critical failure and shouldn't be treated as such.
  2. If iserv does somehow fail then we don't correctly revert the iserv state to IservPending.
  3. Even if (2) were fixed, we also fail to purge the linker state on failure.

We should fix all three of these.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GHCRequires changing GHC and/or the RTSlinker

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions