Open honggyukim opened 5 years ago
Last error message:
uftrace stopped tracing with remaining functions
================================================
task: 1881
[7] <0>
[6] v8::internal::MarkCompactCollector::IsSweepingCompleted
[5] v8::internal::MarkCompactCollector::EnsureSweepingCompleted
[4] v8::internal::Isolate::Deinit
[3] v8::internal::Isolate::TearDown
[2] v8::Isolate::Dispose
[1] node::Start
[0] main
task: 1884
[2] v8::platform::TaskQueue::GetNext
[1] v8::platform::WorkerThread::Run
[0] v8::base::ThreadEntry
task: 1885
[2] v8::platform::TaskQueue::GetNext
[1] v8::platform::WorkerThread::Run
[0] v8::base::ThreadEntry
task: 1886
[2] v8::platform::TaskQueue::GetNext
[1] v8::platform::WorkerThread::Run
[0] v8::base::ThreadEntry
task: 1887
[2] v8::platform::TaskQueue::GetNext
[1] v8::platform::WorkerThread::Run
[0] v8::base::ThreadEntry
bool MarkCompactCollector::IsSweepingCompleted() {
if (!pending_sweeper_tasks_semaphore_.WaitFor(
base::TimeDelta::FromSeconds(0))) {
return false;
}
pending_sweeper_tasks_semaphore_.Signal();
return true;
}
void MarkCompactCollector::EnsureSweepingCompleted() {
DCHECK(sweeping_in_progress_ == true);
// If sweeping is not completed or not running at all, we try to complete it
// here.
if (!FLAG_concurrent_sweeping || !IsSweepingCompleted()) {
SweepInParallel(heap()->paged_space(OLD_SPACE), 0);
SweepInParallel(heap()->paged_space(CODE_SPACE), 0);
SweepInParallel(heap()->paged_space(MAP_SPACE), 0);
}
if (FLAG_concurrent_sweeping) {
pending_sweeper_tasks_semaphore_.Wait();
pending_sweeper_tasks_semaphore_.Wait();
pending_sweeper_tasks_semaphore_.Wait();
}
ParallelSweepSpacesComplete();
sweeping_in_progress_ = false;
heap()->old_space()->RefillFreeList();
heap()->code_space()->RefillFreeList();
heap()->map_space()->RefillFreeList();
#ifdef VERIFY_HEAP
if (FLAG_verify_heap && !evacuation()) {
VerifyEvacuation(heap_);
}
#endif
}
void Isolate::Deinit() {
TRACE_ISOLATE(deinit);
debug()->Unload();
FreeThreadResources();
if (concurrent_recompilation_enabled()) {
optimizing_compile_dispatcher_->Stop();
delete optimizing_compile_dispatcher_;
optimizing_compile_dispatcher_ = NULL;
}
if (heap_.mark_compact_collector()->sweeping_in_progress()) {
heap_.mark_compact_collector()->EnsureSweepingCompleted();
}
...
}
void Isolate::TearDown() {
TRACE_ISOLATE(tear_down);
// Temporarily set this isolate as current so that various parts of
// the isolate can access it in their destructors without having a
// direct pointer. We don't use Enter/Exit here to avoid
// initializing the thread data.
PerIsolateThreadData* saved_data = CurrentPerIsolateThreadData();
DCHECK(base::NoBarrier_Load(&isolate_key_created_) == 1);
Isolate* saved_isolate =
reinterpret_cast<Isolate*>(base::Thread::GetThreadLocal(isolate_key_));
SetIsolateThreadLocals(this, NULL);
Deinit();
{
base::LockGuard<base::Mutex> lock_guard(thread_data_table_mutex_.Pointer());
thread_data_table_->RemoveAllThreads(this);
}
delete this;
// Restore the previous current isolate.
SetIsolateThreadLocals(saved_isolate, saved_data);
}