Skip to content
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

Intermittent crash with profiling enabled on Node v4 #44

Closed
tunniclm opened this issue Nov 6, 2015 · 2 comments
Closed

Intermittent crash with profiling enabled on Node v4 #44

tunniclm opened this issue Nov 6, 2015 · 2 comments

Comments

@tunniclm
Copy link
Contributor

tunniclm commented Nov 6, 2015

Crashes with stacks like the following:

Example failure on Linux ppc64le:

#0  0x0000000010a26928 in v8::internal::TemplateHashMapImpl<v8::internal::FreeStoreAllocationPolicy>::LookupOrInsert(void*, unsigned int, v8::internal::FreeStoreAllocationPolicy) [clone .isra.110] ()
#1  0x0000000010a2b0fc in v8::internal::ProfileTree::AddPathFromEnd(v8::internal::Vector<v8::internal::CodeEntry*> const&, int) ()
#2  0x0000000010a2b7a0 in v8::internal::CpuProfilesCollection::AddPathToCurrentProfiles(v8::base::TimeTicks, v8::internal::Vector<v8::internal::CodeEntry*> const&, int) ()
#3  0x0000000010a2bb94 in v8::internal::ProfileGenerator::RecordTickSample(v8::internal::TickSample const&) ()
#4  0x000000001071001c in v8::internal::ProfilerEventsProcessor::ProcessOneSample() ()
#5  0x0000000010710108 in v8::internal::ProfilerEventsProcessor::Run() ()
#6  0x0000000010ec6264 in v8::base::ThreadEntry(void*) ()
#7  0x00003fff826d89d8 in start_thread (arg=0x3fff8023f180)
#8  0x00003fff8262ef00 in clone ()

Example failure on Linux x64:

#0  0x0000000000c681ba in v8::internal::TemplateHashMapImpl<v8::internal::FreeStoreAllocationPolicy>::LookupOrInsert ()
#1  0x0000000000c6b5c9 in v8::internal::ProfileTree::AddPathFromEnd(v8::internal::Vector<v8::internal::CodeEntry*> const&, int) ()
#2  0x0000000000c6bb64 in v8::internal::CpuProfilesCollection::AddPathToCurrentProfiles(v8::base::TimeTicks, v8::internal::Vector<v8::internal::CodeEntry*> const&, int) ()
#3  0x0000000000c6be5f in v8::internal::ProfileGenerator::RecordTickSample(v8::internal::TickSample const&) ()
#4  0x0000000000a2e040 in v8::internal::ProfilerEventsProcessor::ProcessOneSample() ()
#5  0x0000000000a2e0d8 in v8::internal::ProfilerEventsProcessor::Run() ()
#6  0x0000000000fc2650 in v8::base::ThreadEntry(void*) ()
#7  0x00000032f90079d1 in start_thread () 
#8  0x00000032f8ce89dd in clone () 
@tunniclm tunniclm added the bug label Nov 6, 2015
@tunniclm
Copy link
Contributor Author

tunniclm commented Dec 8, 2015

This has been narrowed down to a bug in V8 where the profiling processor thread is not stopped before the CpuProfiler object is deleted. This leads to problems when the thread accesses the freed object.

The issue only occurs during shutdown and can be avoided if the appmetrics API is being used by calling stop() on the base API object before exit.

The bug has been reported to V8 upstream project.

@tunniclm
Copy link
Contributor Author

tunniclm commented Apr 8, 2016

Fixed in v8 and backported to Node v4.4.0.

@tunniclm tunniclm closed this as completed Apr 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant