The problem turned out to be IClientChannel
.
We forgot to dispose the channel after use and called Dispose()
from the finalizer thread.
My guess is that IClientChannel uses unmanaged resources that have to be released from the same thread that created them.
After calling Dispose()
from the same thread the issue went away.