-
Notifications
You must be signed in to change notification settings - Fork 524
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
Memory leak of ts_library #1803
Labels
Comments
That's fantastic debugging! Thank you for digging into this and finding the root cause, that should help us find the time to fix it. |
Just guessing here, but it's probably the root cause of recent reports in #1027. |
alexeagle
pushed a commit
to alexeagle/rules_nodejs
that referenced
this issue
Apr 9, 2020
This causes hard-to-reproduce resource leaks as demonstrated in bazel-contrib#1803 Also we didn't fully understand this before, for example if a worker process stayed running we'd never re-link under it when deps change For now make the conservative fix to keep these two capabilities distinct Fixes bazel-contrib#1803
gregmagolan
added a commit
to gregmagolan/rules_nodejs
that referenced
this issue
Apr 9, 2020
Issue bazel-contrib#1803 was fixed by bazel-contrib#1800 which is already landed. bazel-contrib#1805 also fixes via a different mechanism and will also land soon.
alexeagle
pushed a commit
to alexeagle/rules_nodejs
that referenced
this issue
Apr 9, 2020
This causes hard-to-reproduce resource leaks as demonstrated in bazel-contrib#1803 Also we didn't fully understand this before, for example if a worker process stayed running we'd never re-link under it when deps change For now make the conservative fix to keep these two capabilities distinct Fixes bazel-contrib#1803
gregmagolan
pushed a commit
to alexeagle/rules_nodejs
that referenced
this issue
Apr 10, 2020
This causes hard-to-reproduce resource leaks as demonstrated in bazel-contrib#1803 Also we didn't fully understand this before, for example if a worker process stayed running we'd never re-link under it when deps change For now make the conservative fix to keep these two capabilities distinct Fixes bazel-contrib#1803
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🐞 bug report
Affected Rule
ts_libraryIs this a regression?
No.Description
Build lot of `ts_library` target via command such as `bazel build src/...` would cause a memory leak problem.The bazel would create a lot of node processes to compile the ts.
Then the computor memory is all ate by these node processes.
I found that this commit caused this problem.
feat(typescript): use run_node helper to execute tsc 066a52c
And I change the code like below and the problem is solved, node processes number became normal.
And I make deep debuging, found the extra arg
--bazel_node_modules_manifest=%s
to thetsc_wrapper
caused this probel, and I comment this, the problem is solved too.🔬 Minimal Reproduction
It looks great when build a single ts_library target, but not great when build lots of ts targets via
bazel build ...
.🔥 Exception or Error
🌍 Your Environment
Operating System:
Output of
bazel version
:Rules_nodejs version:
(Please check that you have matching versions between WORKSPACE file and
@bazel/*
npm packages.)Anything else relevant?
The text was updated successfully, but these errors were encountered: