The fix for duplex handle finalizers ... where GHC.Handle has the finalizer attached to the read side addMVarFinalizer read_side (handleFinalizer read_side), and it should be on the write side (as the read side points to the write side using haOther...) Without this fix hGetContents leaks file handles... Keean Schupke