We are hoping that an implementation of linear types in GHC could provide an ultimate solution. The stop gap is to do runtime analysis by collecting traces of execution to check that reference counts remain bounded. This could make use of DWARF support in GHC to use traces, but given that it is still experimental, we could fallback to having the user insert tracing messages when entering and leaving functions to provide enough context to locate the leaks.
Perhaps we could make a story for using OpenTracing here since we will need to support tracing across multiple processes.
We are hoping that an implementation of linear types in GHC could provide an ultimate solution. The stop gap is to do runtime analysis by collecting traces of execution to check that reference counts remain bounded. This could make use of DWARF support in GHC to use traces, but given that it is still experimental, we could fallback to having the user insert tracing messages when entering and leaving functions to provide enough context to locate the leaks.
Perhaps we could make a story for using OpenTracing here since we will need to support tracing across multiple processes.