Having read this article F# Versus Mathematics: Part One - Getting Started with BLAS and LAPACK I stumbled across the term stack imbalance in the paragraph
We just saw this the other day (marshalling with c# and c++)
I refer you to the text from an MSDN page:
The pInvokeStackImbalance managed debugging assistant (MDA) is activated when the CLR detects that the stack depth after a platform invoke call does not match the expected stack depth, given the calling convention specified in the DllImportAttribute attribute as well as the declaration of the parameters in the managed signature.
I realize this is for a specific compiler warning but the page gives some info on what a stack imbalance is, what causes it, what the symptoms are, and how to resolve it. As Daniel said it's typically due to the signatures of the managed and unmanaged not matching.
Hope this helps.