Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

When performing MultiGet, unloading AppDomain crashes the host #103

Open
onyxmaster opened this Issue · 4 comments

5 participants

@onyxmaster

This is due to EventWaitHandles already being destroyed, and mre.Set() being called in a finally block -- it leads to unhandled ObjectDisposedException that kills the host application (IIS pool in our case). Encasing mre.Set() with try/catch(ObjectDisposedException) block in async callbacks (MultiGet, Stats, maybe in other places) should alleviate this problem.

@vchekan

I have the same issue.

@apeeater

We have the same issue. As the following code fragment in 'PerformMultiGet' executes on a ThreadPool thread, there is no way for an application to recover from this.

...
finally
{
manualResetEvent.Set();
}
...

An edited crash report :

System.ObjectDisposedException was unhandled
Message="Safe handle has been closed"
Source="mscorlib"
ObjectName=""
StackTrace:
at System.StubHelpers.StubHelpers.SafeHandleC2NHelper(...)
at Microsoft.Win32.Win32Native.SetEvent(SafeWaitHandle handle)
at System.Threading.EventWaitHandle.Set()
at Enyim.Caching.MemcachedClient.<>c__DisplayClass14`1.b__11(IAsyncResult iar)
...
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(...)
...

@hidori

I have the same issue. too

@jeffrymorris

We are going to fix this on the Couchbase fork of this project: http://www.couchbase.com/issues/browse/NCBC-198

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.