Profiler crash

51 views
Skip to first unread message

Damien Gleizes

unread,
Mar 7, 2013, 8:39:15 AM3/7/13
to v8-u...@googlegroups.com
Hi all,

I am trying to work with the profiler API but I get an unexpected crash: I am probably doing something wrong but I can't figure what.. any help or hints would be appreciated!
From the main thread I create an isolate and a context. Another thread is started that enters the created isolate and context, and then compiles/executes a script.
I have my own locking system that prevent using one isolate from differents threads at same time (before entering v8, or starting the profiler). I also tried to switch to v8::lockers but I have the same issue.

If I start the CpuProfiler from the main thread before starting my execution thread, I get an internal v8 crash from the v8::CpuProfiler thread while it iterates the stackframe.

Here is the stack where the crash occurs: 

 v8.dll!v8::internal::StandardFrame::IsArgumentsAdaptorFrame(unsigned char * fp)  Line 186 + 0xe bytes C++
 v8.dll!v8::internal::StackFrame::ComputeType(v8::internal::Isolate * isolate, v8::internal::StackFrame::State * state)  Line 443 + 0xe bytes C++
v8.dll!v8::internal::StackFrame::GetCallerState(v8::internal::StackFrame::State * state)  Line 469 C++
 v8.dll!v8::internal::SafeStackFrameIterator::IsValidCaller(v8::internal::StackFrame * frame)  Line 353 + 0x41 bytes C++
 v8.dll!v8::internal::SafeStackFrameIterator::Advance()  Line 306 + 0x4c bytes C++
 v8.dll!v8::internal::JavaScriptFrameIteratorTemp<v8::internal::SafeStackFrameIterator>::Advance()  Line 308 C++
 v8.dll!v8::internal::JavaScriptFrameIteratorTemp<v8::internal::SafeStackFrameIterator>::JavaScriptFrameIteratorTemp<v8::internal::SafeStackFrameIterator>(v8::internal::Isolate * isolate, unsigned char * fp, unsigned char * sp, unsigned char * low_bound, unsigned char * high_bound)  Line 829 + 0x1b bytes C++
 v8.dll!v8::internal::SafeStackTraceFrameIterator::SafeStackTraceFrameIterator(v8::internal::Isolate * isolate, unsigned char * fp, unsigned char * sp, unsigned char * low_bound, unsigned char * high_bound)  Line 371 + 0x4e bytes C++
 v8.dll!v8::internal::StackTracer::Trace(v8::internal::Isolate * isolate, v8::internal::TickSample * sample)  Line 143 + 0x48 bytes C++
 v8.dll!v8::internal::Ticker::DoSampleStack(v8::internal::TickSample * sample)  Line 185 C++
 v8.dll!v8::internal::Sampler::SampleStack(v8::internal::TickSample * sample)  Line 756 C++
 v8.dll!v8::internal::SamplerThread::SampleContext(v8::internal::Sampler * sampler)  Line 2080 C++
 v8.dll!v8::internal::SamplerThread::DoCpuProfile(v8::internal::Sampler * sampler, void * raw_sampler_thread)  Line 2050 C++
 v8.dll!v8::internal::SamplerRegistry::IterateActiveSamplers(void (v8::internal::Sampler *, void *)* func, void * param)  Line 1785 C++
 v8.dll!v8::internal::SamplerThread::Run()  Line 2037 C++
 v8.dll!v8::internal::ThreadEntry(void * arg)  Line 1602 C++


While the execution thread stack is:

v8.dll!v8::internal::ExitFrame::FillState(unsigned char * fp, unsigned char * sp, v8::internal::StackFrame::State * state)  Line 565 + 0x1 bytes C++
 v8.dll!v8::internal::ExitFrame::GetStateForFramePointer(unsigned char * fp, v8::internal::StackFrame::State * state)  Line 556 C++
 v8.dll!v8::internal::StackFrameIterator::Reset()  Line 168 + 0x1e bytes C++
 v8.dll!v8::internal::StackFrameIterator::StackFrameIterator()  Line 97 + 0xa bytes C++
 v8.dll!v8::internal::IC::IC(v8::internal::IC::FrameDepth depth, v8::internal::Isolate * isolate)  Line 131 + 0xa bytes C++
 v8.dll!v8::internal::LoadIC::LoadIC(v8::internal::IC::FrameDepth depth, v8::internal::Isolate * isolate)  Line 345 + 0x2e bytes C++
 v8.dll!v8::internal::LoadIC_Miss(v8::internal::Arguments args, v8::internal::Isolate * isolate)  Line 1870 + 0x14 bytes C++
...


Any idea on how to debug the issue?
Thanks


Jim Acquavella

unread,
Apr 6, 2015, 7:47:04 PM4/6/15
to v8-u...@googlegroups.com
Were you able to solve this?  I'm seeing the same.
Reply all
Reply to author
Forward
0 new messages