Skip to content

Memory Leak in V8 CpuProfiler #23070

@Flarna

Description

@Flarna
  • Version: 8.12.0, 10.11.0, Master
  • Platform: Windows, Linux
  • Subsystem: V8

It seems there is a memory leak in V8 CPU Profiler. If have seen that RSS steadily increases but V8 heap stays constant. I did a fast heap profiling with MSVC and got following stack frames which seem to point to the leak:

v8::internal::Runtime_StackGuard
v8::internal::StackGuard::HandleInterrupts
v8::internal::OptimizingCompileDispatcher::InstallOptimizedFunctions
v8::internal::Compiler::FinalizeCompilationJob
v8::internal::`anonymous namespace'::FinalizeOptimizedCompilationJob
v8::internal::`anonymous namespace'::RecordFunctionCompilation
v8::internal::CodeEventDispatcher::CodeCreateEvent
	v8::internal::ProfilerListener::RecordDeoptInlinedFrames
	v8::internal::ProfilerListener::RecordInliningInfo
	v8::internal::JITLineInfoTable::SetPosition
	v8::internal::ProfilerListener::NewCodeEntry

Stopping profiling doesn't release the memory.
I did also a fast test with NodeJS 10.11.0 and it seems the issue is not present there.

I will continue my investigations but any hint which fix in V8 would be needed to be backported to get this fixed is welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.memoryIssues and PRs related to the memory management or memory footprint.v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions