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

Fix handle leak for killed worker checker #2197

Merged
merged 2 commits into from
Aug 10, 2021
Merged

Conversation

cmdcolin
Copy link
Collaborator

@cmdcolin cmdcolin commented Aug 9, 2021

The current code for checking if a worker was killed would progressively create more watchers over time because the resolve was never called. I mistakenly thought that Promise.race might kill the watcher promise

This was found because I saw the code freeze, and clicking the pause tab in the source debugger always ended up at the worker=='killed' line which seemed odd, and console.logging around this line indicated that it could be called thousands of times a second

@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Aug 9, 2021
@codecov
Copy link

codecov bot commented Aug 9, 2021

Codecov Report

Merging #2197 (2442de6) into main (ba45e95) will increase coverage by 0.00%.
The diff coverage is 88.88%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2197   +/-   ##
=======================================
  Coverage   62.71%   62.72%           
=======================================
  Files         484      484           
  Lines       22641    22646    +5     
  Branches     5141     5142    +1     
=======================================
+ Hits        14200    14205    +5     
  Misses       8171     8171           
  Partials      270      270           
Impacted Files Coverage Δ
packages/core/rpc/BaseRpcDriver.ts 84.90% <88.88%> (-0.25%) ⬇️
...r-view/src/BaseChordDisplay/components/Loading.tsx 100.00% <0.00%> (+5.00%) ⬆️

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 ba45e95...2442de6. Read the comment docs.

@cmdcolin cmdcolin added bug Something isn't working and removed needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) labels Aug 9, 2021
@cmdcolin cmdcolin merged commit f6f719e into main Aug 10, 2021
@cmdcolin cmdcolin deleted the killed_worker_checker_cleanup branch August 10, 2021 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant