-
Notifications
You must be signed in to change notification settings - Fork 654
MSBuild crashes with an out-of-memory exception when updating GitVersionTask from 4.0.0-beta0013 to 4.0.0 #1638
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
Comments
adding @stazz, @dazinator |
I know @stazz has an ongoing PR which will change the way gitversiontask works. Once his PR is stable it would be good to try that version to see if memory consumption remains an issue |
Hi, the UtilPack currently used by GitVersion invokes the GitVersion directly in-process. It also uses some additional caching and other things, which might not be cleaned up on continuously running MSBuild instances like in VS. If this happens also when building normally from commandline, then it is quite weird. In any case, as @dazinator mentioned, there is PR going on which will affect this issue dramatically. I've changed UtilPack to invoke the target package (e.g. GitVersionTask) in a separate process, which hopefully will help to mitigate any possible memory leaks. The PR currently is going on in #1634 . |
@stazz Thanks for the feedback. It sounds good. I cloned your fork and wanted to test the resulting |
@ruhullahshah I tested by running With the |
@stazz Thanks, I took the
|
Hmm, if you put your verbosity to detailed ( |
@stazz It fails with the same exception. The output obtained with |
Yeah I was hoping for included log files, since they would show some additional output (i.e. full paths for task factory DLL, and other useful information). If you can't provide the detailed log output, maybe a minimal files for repro case? The error message looks familiar, and I've fixed one thing related to that before 2.0.1 release, so I'm wondering if the fix was complete. It was related to auto-detecting .NET Desktop framework version. Edit: And yes, I've tested with both |
So, after some further investigation, I have the following findings:
We use |
Interesting, I had to explicitly set property |
@stazz Thank you. Waiting to hear from you. |
I've published version |
@stazz Thanks for the fix. I tried it out and do not observe the OOM issue anymore. The peak memory consumption of the I am not sure if this can be improved in the future releases of your package, but for now I think your PR should be merged so that this fix becomes available. |
I am sure this is something that can be improved. The I will also add some diagnostic output for all situations |
Hey - sorry on commenting on closed issue, but I've updated the GitVersionTask in my PR to use newer
Using this information, I hope it will be easier to analyze what exactly is going on and taking time in the build. I also noticed that actually the EDIT: I've made the amount of invocations of the |
I'm sorry too to comment in this closed issue, but the slowdown may also be caused by #1636. |
Uh oh!
There was an error while loading. Please reload this page.
Problem:
MSBuild.exe crashes with an out-of-memory exception frequently when we try to upgrade
GitVersionTask
from4.0.0-beta0013
to4.0.0
.Preconditions:
VS2015
.Observations:
GitVersionTask-4.0.0
consumes about1.2GB
of memory, whereasGitVersionTask-4.0.0-beta-0013
consumes200MB
.GitVersion.CommandLine
continues to consume the same amount of memory in both the versions. So we believe that updates toGitVersionTask
between these two versions causes the problem.GitVersionTask-4.0.0
relies onUtilPack.NuGet.MSBuild
, could this cause the problem somehow?This issue is preventing us from upgrading GitVersion and we would really appreciate some feedback or workarounds for this issue.
The text was updated successfully, but these errors were encountered: