-
Notifications
You must be signed in to change notification settings - Fork 255
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
OutOfMemoryException when using Package Manager UI #8352
Comments
From the solution that reproduces the issue, there's 138 projects (although about 4 wouldn't load on my computer), 20 package sources and 290 packages used in the solution. The first time I loaded the solution, Visual Studio was using about 700MB of memory and when I opened the Package Manager UI and changed the package source to "All", memory ballooned until the process crashed. When analyzing the original crash dump, there were nearly a million NuGetVersion objects in memory (possibly more, the memory dump was partially corrupt due to a GC running at the time it was captured), which is unreasonable, even given the number of packages, projects and sources. I don't know how relevant it is, but other times when I open the solution and otherwise do absolutely nothing (no windows open within VS), VS would be very sluggish and frequently would have the "(not responding)" message. I assume it's related to automatic restore and design time build. |
@zivkan can you share me your solution with 138 projects if possible? I don't know how to recreate this issue on my local. I used VS2017 with many different projects for 2 years never had that issue, so hard to reason what is wrong there. |
Think we'll do this in S172 (or maybe reevaluate in S171 if we decide so.) |
So far below things I found out for investigation of this bug.
|
Currently I am working on point 5. |
Thanks for the update @erdembayar A few notes on your 5 points. Point 1: This will affect the network throughput rather than OOM. We have a tracking issue on NuGetGallery side. Keep in mind, protocol changes take more scrutiny. Point 2: Can you clarify this? Point 3: I think it's a recommendation. We can communicate it to them, but won't change much in the grand scheme given today's resource usage. See #8058 and #4448. Point 4:Can you elaborate more on this? The context is meant to be the schema. Point 5: Sounds great, maybe we need a particular issue for that given that this particular task is investigative and composed of many layers. Point 6: The registration index is never pruned. Most http servers don't have the concept to completely remove a version. You can only unlist a version. Think we need to do better by doing #8058. |
Re #8058 |
I just to give update on this ticket since I highlighted 6 points.
|
I've converted this issue to an epic. |
In case it helps: for a (simpler) repro of this issue with only 20 projects, open the
Now go to I've had a few times that it shows a generic error in that window instead of a crash, that nonetheless everything got extremely slow, and then during analyzing the issue, I saw that all memory was used (3GB+). Why this window needs 2.5GB memory or more is beyond me, and I don't really understand where the cause lies, in the end, only a fraction of that should suffice, I guess, for polling partial display lists etc etc. Originally reported here: dotnet/fsharp#9518 PS: I'm very happy to see that work is underway on this complex issue! |
@abelbraaksma Looking at fsharp's nuget.config, it uses .NET Core's sleet feed. Since sleet is a static feed generator, and blob storage is a static file server, and given how many packages are in the feed, this means the search results url is a 230 megabyte json file, despite the fact that the HTTP get parameters ask for 25 results (afterall, it's a static file). When you open the package manager UI, if you do not use "dotnet-core" or "all" in the source dropdown, you shouldn't have out of memory crashes. This PR fixed that issue (and should be available in the next Visual Studio 2017 16.7 preview, if it's not in the current preview), by ignoring any search results over the number expected in the result. This will mean, however, that only the first 25 package ids will be browseable, and will be the search results regardless of search query. The NuGet protocol wasn't designed for purely static feeds, the search service at a minimum needs to be dynamic. But I'm reasonably confident it will fix the crash you're experiencing. |
2019, I hope? 😄
Ouch! I had no idea! So they should fix this on MS's side to make it non-static? Though I guess that's not gonna happen anytime soon. @zivkan, many thanks for your quick and insightful comment. I'll be sure to test the next Preview release soon. Loading 230MB on each GET request sounds massive, no wonder it took so long (and then crashed)! |
Reducing priority as we've addressed the highest impacting issues. |
Closing this for now. We've done a bunch of work, and while we're never perfect, I don't see value in tracking this issue anymore, given that the traces in 16.7 are going to be vastly different. For anyone reading this issue and running into this problem, please try it with VS 2019, Update 7 (shipping soon), and if you are still having issues, we'd be happy to hear about your scenario. |
Using VS nuget GUI to consolodate different versions of a package crashes the instance of VS. Occurs in 2017, 2019 and 2019 int preview.
This issue has been moved from https://developercommunity.visualstudio.com/content/problem/608137/crash-when-consolodating-nuget-packages.html
VSTS ticketId: 918791
These are the original issue comments:
Fiona Niu[MSFT] on 6/17/2019, 01:10 AM (31 days ago):
Thank you for taking the time to log this issue!
I've tried to reproduce and investigate using the description, and attachments already provided. Unfortunately those aren't enough and more information is needed in order to investigate it further.
The easiest way to provide all the information is to use the Visual Studio Feedback Tool. This will ensure that we collect the needed information for you without worrying about what to provide (recording, dump file or ETL trace).
Since this issue is now marked as Need More Info, that workflow is enabled in the Feedback Tool:
For the full instructions, please see: https://docs.microsoft.com/en-us/visualstudio/ide/how-to-report-a-problem-with-visual-studio-2017?view=vs-2017#when-further-information-is-needed-need-more-info . For information about what data is collected, see https://docs.microsoft.com/en-us/visualstudio/ide/developer-community-privacy?view=vs-2017#data-we-collect
We look forward to hearing from you!
brynhr [MSFT] on 6/17/2019, 02:25 AM (31 days ago):
Recording of crash attached. Please let me know if it uploaded.
Fiona Niu[MSFT] on 6/17/2019, 06:48 PM (30 days ago):
Thanks a lot for providing the information. We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
These are the original issue solutions:
(no solutions)
Internal issue with data
The text was updated successfully, but these errors were encountered: