Skip to content

Nested GC callback #44046

@theanarkh

Description

@theanarkh

Version

v19.0.0-pre

Platform

Darwin Kernel Version 20.3.0

Subsystem

perf_hooks

What steps will reproduce the bug?

The example code that triggers this bug has not been found. I found this bug in my project. I add some logs into node_perf.cc.

image

and found the log as follows.

image

This will make the value of gc duration inaccurate (node_perf.cc). The 4 and 16 is defined in GCType.

enum GCType {
  kGCTypeScavenge = 1 << 0,
  kGCTypeMinorMarkCompact = 1 << 1,
  kGCTypeMarkSweepCompact = 1 << 2,
  kGCTypeIncrementalMarking = 1 << 3,
  kGCTypeProcessWeakCallbacks = 1 << 4,
};

How often does it reproduce? Is there a required condition?

it is difficult to reproduce currently.

What is the expected behavior?

it should be 4 4 16 16.

What do you see instead?

4 16 16 4.

Additional information

cc @bnoordhuis

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions