Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

fix: periodically reset v8 session to prevent memory leak #957

Merged
merged 5 commits into from
May 31, 2021

Conversation

Louis-Ye
Copy link
Contributor

@Louis-Ye Louis-Ye commented May 18, 2021

This patch makes the cloud debugger reset the v8 debugger session to
prevent the memory leak caused by v8 breakpoint hits whenenever the
number of breakpoint hits reach the threshold.

The threshold can be set through upon the agent is started during initialization.

Fixes #811

This patch makes the cloud debugger reset the v8 debugger session to
prevent the memory leak caused by v8 breakpoint hits whenenever the
number of breakpoint hits reach the threshold.

The threshold can be set through environment variable.

Fixes googleapis#811
@Louis-Ye Louis-Ye requested a review from a team as a code owner May 18, 2021 23:33
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label May 18, 2021
@product-auto-label product-auto-label bot added the api: clouddebugger Issues related to the googleapis/cloud-debug-nodejs API. label May 18, 2021
@codecov
Copy link

codecov bot commented May 18, 2021

Codecov Report

Merging #957 (8d09782) into master (b312004) will increase coverage by 0.33%.
The diff coverage is 90.62%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #957      +/-   ##
==========================================
+ Coverage   66.02%   66.36%   +0.33%     
==========================================
  Files          20       20              
  Lines        1619     1638      +19     
  Branches      334      336       +2     
==========================================
+ Hits         1069     1087      +18     
- Misses        472      473       +1     
  Partials       78       78              
Impacted Files Coverage Δ
src/agent/config.ts 100.00% <ø> (ø)
src/agent/v8/inspector-debugapi.ts 85.32% <90.62%> (+0.89%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b312004...8d09782. Read the comment docs.

src/agent/config.ts Outdated Show resolved Hide resolved
src/agent/debuglet.ts Outdated Show resolved Hide resolved
@JustinBeckwith JustinBeckwith added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 19, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 19, 2021
@mctavish mctavish added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 31, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 31, 2021
@mctavish mctavish merged commit 7735425 into googleapis:master May 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: clouddebugger Issues related to the googleapis/cloud-debug-nodejs API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Potential Memory Leak
6 participants