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

src: make NearHeapLimitCallback() more robust #44581

Merged
merged 1 commit into from Sep 13, 2022

Commits on Sep 9, 2022

  1. src: make NearHeapLimitCallback() more robust

    Instead of removing the callback before generating heap snapshot
    and then adding it back after the heap snapshot is generated,
    just remove it once the heap snapshot limit is reached.
    Otherwise if the worker callback kicks in and sets the heap
    limit to higher value during the heap snapshot generation,
    the current_heap_limit in the heap snapshot callback becomes
    invalid, and we might return a heap limit lower than the current
    one, resulting in OOM.
    
    In addition add more logs and checks in Worker::NearHeapLimit()
    to help us catch problems.
    joyeecheung committed Sep 9, 2022
    Copy the full SHA
    e19cc1f View commit details
    Browse the repository at this point in the history