1
Vote

[BUG] Hang on Application pool recycle

description

Hi,

Using React.NET 3.0.1 which uses ClearScript.V8 5.4.8 following hang is observed on recycling application pool
.NET Call Stack


.SharedPtr.Release(SharedPtr*)+d7 
[[InlinedCallFrame] (.Decrement)] .RefCount.Decrement(RefCount*) 
Microsoft.ClearScript.V8.V8ContextProxyImpl.!V8ContextProxyImpl()+4e 
Microsoft.ClearScript.V8.V8ContextProxyImpl.Dispose(Boolean)+1f 
[[DebuggerU2MCatchHandlerFrame]] 
[[ContextTransitionFrame]] 
[[GCFrame]] 
[[DebuggerU2MCatchHandlerFrame]] 

Full Call Stack

ntdll!NtWaitForSingleObject+14 
KERNELBASE!WaitForSingleObjectEx+8f 
v8_x64!v8::Extension::dependencies+329ac 
v8_x64!v8::ExternalResourceVisitor::VisitExternalString+28187 
v8_x64!v8::ExternalResourceVisitor::VisitExternalString+1a3 
v8_x64!v8::ExternalResourceVisitor::VisitExternalString+533b 
ClearScriptV8_64+14216 
ClearScriptV8_64+120e4 
ClearScriptV8_64+13e3f 
ClearScriptV8_64+50a8 
<Module>.SharedPtr<V8Context>.Release(SharedPtr<V8Context>*)+d7 
[[InlinedCallFrame] (<Module>.Decrement)] <Module>.RefCount.Decrement(RefCount*) 
Microsoft.ClearScript.V8.V8ContextProxyImpl.!V8ContextProxyImpl()+4e 
Microsoft.ClearScript.V8.V8ContextProxyImpl.Dispose(Boolean)+1f 
clr!FastCallFinalizeWorker+6 
clr!ETW::GCLog::SendFinalizeObjectEvent+c9 
clr!MethodTable::CallFinalizer+b5 
clr!CallFinalizer+5e 
clr!FinalizerThread::DoOneFinalization+95 
clr!FinalizerThread::FinalizeAllObjects+133 
clr!FinalizerThread::FinalizeAllObjects_Wrapper+18 
clr!Frame::Push+59 
clr!PEDecoder::GetNativeCodeManagerTable+170 
clr!PEDecoder::GetNativeCodeManagerTable+99 
[[DebuggerU2MCatchHandlerFrame]] 
clr!Thread::ShouldChangeAbortToUnload+45 
clr!Thread::DoADCallBack+109 
[[ContextTransitionFrame]] 
clr!Frame::Push+a2 
clr!FinalizerThread::DoOneFinalization+1f9 
[[GCFrame]] 
clr!FinalizerThread::FinalizeAllObjects+133 
clr!FinalizerThread::FinalizerThreadWorker+bb 
clr!Frame::Push+59 
clr!PEDecoder::GetNativeCodeManagerTable+170 
clr!PEDecoder::GetNativeCodeManagerTable+99 
[[DebuggerU2MCatchHandlerFrame]] 
clr!FinalizerThread::FinalizerThreadStart+10a 
clr!Thread::intermediateThreadProc+86 
kernel32!BaseThreadInitThunk+14 
ntdll!RtlUserThreadStart+21 

comments

ClearScript wrote Mar 20 at 1:26 AM

Hello!

Some questions:
  1. Can you describe your recycling configuration? For example, how is recycling triggered?
  2. Does the hang happen every time, or is it intermittent?
  3. As you may have noticed, some of the top stack frames above are missing or bogus, making diagnosis difficult if not impossible. Would you be able to deploy the relevant ClearScript and V8 PDB files for a cleaner stack? You might be able to get them from the owner of this NuGet project. Another possibility might be to generate all the files yourself by building ClearScript locally. The build procedure is outlined in the ClearScript ReadMe.
Thanks!

wolfeno wrote Mar 20 at 12:18 PM

Hi,
  1. Recycle is triggered by configuration file change
  2. Hang is intermittent
  3. I will try to get debug symbols for additional info