-
Notifications
You must be signed in to change notification settings - Fork 22
Block finalizer solved? #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What version of the MSIE JavaScript Engine are you using? Do you use this library as part of some other product? |
We are currently using 2.2.7. I downloaded the code and made this change and it seems that the finalizer is no longer being blocked. Removed the invoke. ChakraEdgeJsRtJsEngine.cs:
|
Why do you use the following construction? try
{
…
}
catch (Exception e)
{
base.Dispose(disposing);
} |
I have always been in the habit of making sure that finalizer methods handle all exceptions. Perhaps this is extraneous though? |
Yes, it is extraneous! At the weekend, I will try to assess all the risks, that may be caused by the removal of |
Much appreciated! |
Try to upgrade to version 2.2.8. |
Awesome, thanks for the quick fix! |
After doing an analysis of one of our Memory dumps, Microsoft stated this.
_However for your specific instance your finalizer thread is blocked by a ChakraEdgeJsRtJsEngine object. When looking at the amount of exceptions it seems as if there are thousands and thousands of exceptions all rooted to System.Net.Connection which are all stuck waiting to be finalized. They can't execute their finalize method because of the blocked finalizer thread below.
It's stuck on a Wait call which is part of the Dispose() method. I would recommend disposing ALL instances of the Chakra engine in your code as this will explicitly avoid the finalizer from being called. What the ChakraEngine looks like it's doing here is when this object is finalized it called a native method to reduce a ref counter to an object, this is either taking too long or never returns (I can't tell).
Here is what is it waiting on.
[[HelperMethodFrame_1OBJ] (System.Threading.WaitHandle.WaitOneNative)] System.Threading.WaitHandle.WaitOneNative(System.Runtime.InteropServices.SafeHandle, UInt32, Boolean, Boolean)
mscorlib_ni!System.Threading.WaitHandle.InternalWaitOne(System.Runtime.InteropServices.SafeHandle, Int64, Boolean, Boolean)+1b
mscorlib_ni!System.Threading.WaitHandle.WaitOne(Int32, Boolean)+2e
MsieJavaScriptEngine.ScriptDispatcher.InnnerInvoke(System.Func`1)+80
MsieJavaScriptEngine.JsRt.Edge.ChakraEdgeJsRtJsEngine.Dispose(Boolean)+58
MsieJavaScriptEngine.JsRt.Edge.ChakraEdgeJsRtJsEngine.Finalize()+d
[[DebuggerU2MCatchHandlerFrame]]
[[ContextTransitionFrame]]
[[GCFrame]]
[[DebuggerU2MCatchHandlerFrame]]
Do you know if this is fixed in your latest release?
The text was updated successfully, but these errors were encountered: