out of memory

I see that out of memory is a fairly common problem, and I'm seeing it now.  I'm willing to work with support to provide memory dump, etc.

I'm on win7, 64bit, 8 GB memory.  Resharper 6.1 trial version. Visual Studio 2010.  About 30 projects, about 200K lines of code.

When I enable resharper it churns at 30-60% cpu until it reach about 2.5GB private working set and then dies.   During this time I'm not doing anything in VS, just watching task manager with a sense of doom. <s>

Just let me know what you need.

28 comments
Comment actions Permalink

Hello Leo
     Thank you for reporting this problem! We appreciate your desire to help us fix this problem. First of all, you can strip down your solution to a small sample that exhibits the same problem (by consequently removing projects and files while keeping the problem reproducible). It would be great if you could send the solution to me (andrew dot serebryansky at jetbrains dot com).

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

PS

I am obvioulsy NOT ALONE

0
Comment actions Permalink

I will tediously but meticulously winnow away the projects in the solution until the behavior improves.  But I I have a question.

In each iteration of this process I can "resume" resharper, watch it churn away for 30 minutes to an hour or more, using 25-50% cpu and gigs of memory, and wait for it to fail.  Could I cut this process short by concluding sooner that it is broken?  Say, when it reaches 2GB memory?  Or 15 minutes of high cpu?  Or must I wait for a crash every time?

0
Comment actions Permalink

Hello Leo
     Normally, memory usage growth should stop after ReSharper has loaded and code analysis for the currently opened file has finished (if you have solution-wide analysis turned off). If it doesn't and Visual Studio still uses CPU for a minute or two, then you can safely cut the process short and make next reduction step. Thank you!

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

I've been running with "Analyze errors in whole solution".  Is that the same as "solution-wide analysis"?
Is it the default?  I don't remember changing it but others have touched this machine.

Should I be doing all my testing with the option turned off?

In other news, after I removed 30+ (in steps of 10) projects from my 50-project solution the memory use suddenly stabilized at about 500MB, but the cpu usage stays at 13% (1 of my 8 cpus) for 30mins before I killed it.

0
Comment actions Permalink

Andrey,

I have also been complaining of this issue for over a year, and am also very frustrated.   Having a large solution with large code files in it makes Resharper completely unusable.  I try every single new release hoping for a resolution.  I have 35 developers that I would buy a license for immediately if we could actually use it on our solution (it's large, we want to refactor it!)

I have been in contact a couple of times, starting with version 5. Each time I get this same response that you have posted.   I have always expressed my desire to help you guys work through this.  Most recently I tweeted my disappointment with 6.1, and Kirill and Hadi both initially responded.  However, I can never receive a follow up from you guys regarding this issue.  I do not even know if Kirill downloaded my most recent dump file, as he will not respond, either by email or twitter, despite two follow-up attempts by me.

You have tickets in your tracker system from 3 years ago still open on this issue.

The communication always seems to stop at "send us your dump file, we will take a look".   Can we please get a real update on this issue?   If Resharper will just never work with large solutions, can you just state that?

0
Comment actions Permalink

I turned off "Analyze errors in whole solution" and the behavior is now acceptable.

0
Comment actions Permalink

I always run with it turned off ,any other situation makes R# unusable , so its a feature you use occasionally to check the state of play . Not as its designed to be an on line tool

You may as well just use StyleCop by itsself every hour or so without the R# integration, this somewhat defeats the object.

I assume your success is attributable to butch hardware and probably 64 bit processing . On a i7 / win 32/ ssd / 4Gb Ram it is still an issue as my previous posts have indicated.

Mike

0
Comment actions Permalink

Enough said

I have tried the most recent nightly build (27 Jan) and I opened one of our big Database Projects and wham , out of memory.

I have had this debate , if it won't cope with Win 32 and 4 gb of RAM the please say so and we can look for an alterative.

There is a second thread runnng on this , I simply have given up R# is uninstalled , and Jet Brains have lost my confidence, for what its worth.

Mike

0
Comment actions Permalink

Hello Leo
     Thank you for this information! Now we know that this behavior is caused by the solution-wide analysis feature. Could you please describe what kinds of projects (class library, silverlight, web etc) were among those 10, removing which has helped to stabilize memory usage?

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

Hello
     I completely understand your frustration and we'll try our best to address this problem. There are numerous causes for memory problems (not only the project size) and we're trying to eliminate them one by one. Could you please tell me the names of the dump files that you've uploaded? Could you please also describe precisely what happens when you're working in Visual Studio with ReSharper enabled? How does the memory usage change and when do you get an OOM error? Thank you!

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

Hi

In my case teh value of the Managed Memory in the bottom RH corner doesn't change much , its the value I see in the Task Manager that increases.

I assume the one in the VS2010 IDE is the size of the "database" of symbols etc , in that case I would not expect that to change much once a solution is loaded.

I have uninstalled now , so its diffiucclt to provide actual numbers , but from memeory its running 120- 150 MB shown in VS 2010 , comapred with the Task Manager starting at 400 and increasing to 700 and more

Mike

0
Comment actions Permalink

Hi Andrey,

Here was my most recent email to Kirill, after he and Hadi responded to my tweet re:OOME's in 6.1:

Hi Kirill,

I've got a 1.2GB dump file of the very latest EAP version of Resharper (Dec 30) crashing with "Out of Memory" exceptions, when trying to load our solution file.  I tried the release version of 6.1 last week and it had the same behavior.  Here is a link to the dump file:
http://dl.dropbox.com/u/41299086/devenv3788.dmp


Using the devenv2008_wrap.exe with the latest EAP allows the solution file to load, but as soon as I compile, I again get OOM exceptions.


Some background on the solution:  it's 195 projects, most of them are .Net 3.5 including web applications, libraries, web services, "solution folders", and then a handful of C++ projects.   There are a handful of individual .cs files that are over 60,000 lines of code.

Running VS2008 without resharper, I never run into OOM problems in a normal day.   


Let me know how else I can possibly help.  At my previous job two years ago, we had Resharper 5 and it was great.   I have been frustrated to no end with the codebase at this job, and would really really like to pull the trigger on getting a bunch of licenses so we can start refactoring in a meaningful way....


Here are my most recent tweets, asking for followup:

https://twitter.com/#!/wompeter


Here is an email from a year ago (Jan 21 2011), of which I also got no reply to.  (At that point, Resharper was actually usuable for tiny windows of time, but as it stands today, I can't even compile once with our solution file).

Re: ReSharper 5.1.2 OOM exception


Hi Kirill,

I don't think I can send you the files, but I can describe the setup.

Due to reliance on old 32-bit stuff, a lot of our devs run visual studio in VMWare virtual machines, including myself.  The VM is Windows XP with 4GB of RAM and 2 processors assigned to it.

I was using the Resharper 30-day trial  - the last one I tried was 5.1.1758.9, which I think was an EAP of 5.1.2, I can't remember.

Additionally, I downloaded the source for xUnit contrib and recompiled the xUnit runner plugin to reference that version of Resharper, so I could utilize the plugin to run tests.  As well, I was using the devenv2008_wrap.exe to launch visual studio.

I would end up restarting VS probably 6 times a day due to exceptions being thrown by Resharper.  As I recall, a "Rebuild All" was especially problematic, and I think changing configurations from Debug to Release also caused issues occasionally.  I think running unit tests caused issues as well.  I'd have to get it running again to be sure.

Let me be the first to say - our code organization is not good.   The system was started in 2002 by an eccentric engineer who "worked around" a lot of the out-of-the-box functionality of ASP.Net 1.1.  He was very smart, but not good at organizing code.   We have multiple files in the solution that have more than 20,000 lines of code - the biggest one tops out at 65,869 lines of code.    I think he liked to put vast numbers of classes in files just to spite people with a Java background, I'm not sure.  
The codebase is slated for refactoring and reorganization this fall, we'll see how it goes.

One of our developers that use Resharper 5 has told me that he avoids a lot of problems with Resharper exceptions by turning off analysis for the larger files on a file-by-file basis.

My trial is expired, but I would be happy to log the OOM exceptions I encounter if I could extend it somehow.   I'm willing to try the R#6 nightlies but the ratings haven't been high so I've been holding off.

Hope that helps.   

Morgan


From: Kirill Falk <***>

To: ***
Sent: Mon, January 17, 2011 1:19:00 AM
Subject: ReSharper 5.1.2 OOM exception

Hi,

You have commented our blogpost related to R# 5.1.2 release http://blogs.jetbrains.com/dotnet/2010/12/resharper-6-eap-is-open-details-on-javascript-support/#comment-323716 . You said that you have OOM on minimal solution which consists of large files. Is it possible to create a simple demo solution which could demonstrate this behavior or probably send us your working solution for investigation? We could sign any NDA if necessary. It's really awful behavior but I can't reproduce it on my side. And of course we will try to fix this in the R# 6.0 release.

Great thanks in advance!

-- --
Kirill Falk
.NET Team QA Lead
twitter : masterqa
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"



So, I've provided descriptions of our setup, and a dump file, and I'm standing by ready to give whatever information I can provide.  It might be one problem, it might be multiple separate problems - but from my perspective, it's just an unusable product at this point.   I *want* to help you fix it (if it's fixable!) so I can buy it.  All I really need is for someone to take this seriously.


0
Comment actions Permalink

I can trigger an OutOfMemory exception by running Optimize References on a two-project solution.  Environment is Win Server 2003 R2 32-bit w/4GB RAM.  I sent this info to support.

---------------------------
ReSharper – Runtime Error – Technical Data
---------------------------
JetBrains ReSharper has encountered a runtime error.
Technical data follows.
Hint: Ctrl+C copies the text of system message boxes to Clipboard.
________________________________________________________________

Exception of type 'System.OutOfMemoryException' was thrown.

--- EXCEPTION #1/2 [OutOfMemoryException]
“ERROR RENDERING EXCEPTION” = “Exception of type 'System.OutOfMemoryException' was thrown.”

--- Outer ---

--- EXCEPTION #2/2 [LoggerException]
Message = “Exception of type 'System.OutOfMemoryException' was thrown.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
InnerException = “Exception #1 at Root.InnerException”
HResult = -2146232832
StackTraceString = “
  at JetBrains.Application.Threading.MultiCoreFibersPool.Fibers.<>c__DisplayClassa.<EnqueueJobImpl>b__8()
     at JetBrains.Application.Threading.MultiCoreFibersPool.FiberProc()
     at JetBrains.Util.Logger.Catch(Action action)
     at JetBrains.Application.Threading.MultiCoreFibersPool.<.ctor>b__1()
     at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
     at System.Threading.ThreadHelper.ThreadStart()


---------------------------
OK   
---------------------------

0
Comment actions Permalink

Hello
     Sorry for delayed response! I'll take a look at the dumps. Meanwhile, do I understand correctly that you're still developing the solution you've described under virtual machines running 32-bit Windows XP? Thank you!

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

Hello Shawn
     How many files does that solution contain? Could you please check if using the /3GB switch helps to avoid this problem? Thank you!

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

Hi Andrey,

Yes, this is with Windows XP 32-bit VMWare virtual machines with VS 2008.

I am happy to provide more dumps if you require.   My experience has been that if I run VS 2008 without the devenv2008_wrap.exe, then I will get crashes before the solution finishes loading.

If I run it with the wrapper, then the solution can load (albeit slowly), but the first time I try to compile, it begins throwing OOM exceptions.

Cheers
Morgan

0
Comment actions Permalink

The solution has 2 projects, with 7948 files, 117201 c# code lines, 750 classes, 20103 aspx code lines.  I just submitted another out of memory error screen.

---------------------------
ReSharper – Runtime Error – Technical Data
---------------------------
JetBrains ReSharper has encountered a runtime error.
Technical data follows.
Hint: Ctrl+C copies the text of system message boxes to Clipboard.
________________________________________________________________

Exception of type 'System.OutOfMemoryException' was thrown.

--- EXCEPTION #1/2 [OutOfMemoryException]
ExceptionPath = Root.InnerException
ClassName = System.OutOfMemoryException
HResult = COR_E_OUTOFMEMORY=E_OUTOFMEMORY=8007000E
Source = PresentationCore
StackTraceString = “
  at System.Windows.Media.BoundsDrawingContextWalker.PushTypeStack(PushType pushType)
     at System.Windows.Media.BoundsDrawingContextWalker.PushGuidelineY1(Double coordinate)
     at System.Windows.Media.RenderData.DrawingContextWalk(DrawingContextWalker ctx)
     at System.Windows.Media.RenderData.GetContentBounds(BoundsDrawingContextWalker ctx)
     at System.Windows.Media.DrawingVisual.GetContentBounds()
     at System.Windows.Media.Visual.CalculateSubgraphBoundsInnerSpace(Boolean renderBounds)
     at System.Windows.Media.Visual.CalculateSubgraphBoundsOuterSpace(Boolean renderBounds)
     at System.Windows.Media.Visual.CalculateSubgraphBoundsInnerSpace(Boolean renderBounds)
     at System.Windows.Media.Visual.CalculateSubgraphBoundsOuterSpace(Boolean renderBounds)
     at System.Windows.Media.Visual.CalculateSubgraphBoundsInnerSpace(Boolean renderBounds)
     at System.Windows.Media.Visual.CalculateSubgraphBoundsOuterSpace(Boolean renderBounds)
     at System.Windows.Media.Visual.CalculateSubgraphBoundsInnerSpace(Boolean renderBounds)
     at System.Windows.Media.Visual.CalculateSubgraphBoundsOuterSpace(Boolean renderBounds)
     at System.Windows.Media.Visual.CalculateSubgraphBoundsInnerSpace(Boolean renderBounds)
     at System.Windows.Media.Visual.CalculateSubgraphBoundsOuterSpace(Boolean renderBounds)
     at System.Windows.Media.Visual.CalculateSubgraphBoundsInnerSpace(Boolean renderBounds)
     at System.Windows.Media.Visual.get_VisualDescendantBounds()
     at JetBrains.UI.Avalon.HwndSourceEx.GetElementBoundsInWindowPixels(UIElement uielement)
     at JetBrains.UI.PopupWindowManager.AvalonAnchoringRect.UiElementLocalAnchoringRect.<.ctor>b__6()
     at JetBrains.UI.PopupWindowManager.AvalonAnchoringRect.UiElementLocalAnchoringRect.<>c__DisplayClassd.<.ctor>b__7(Object , EventArgs )
     at System.Windows.ContextLayoutManager.fireLayoutUpdateEvent()
     at System.Windows.ContextLayoutManager.UpdateLayout()
     at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
     at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
     at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
     at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
     at System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(Object resizedCompositionTarget)
     at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
     at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)


--- Outer ---

--- EXCEPTION #2/2 [LoggerException]
Message = “Exception of type 'System.OutOfMemoryException' was thrown.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
  at JetBrains.Application.Env.Components.ReportUnhandledExceptions.<.ctor>b__6(Object sender, DispatcherUnhandledExceptionEventArgs args)
     at System.Windows.Threading.DispatcherUnhandledExceptionEventHandler.Invoke(Object sender, DispatcherUnhandledExceptionEventArgs e)
     at System.Windows.Threading.Dispatcher.CatchException(Exception e)
     at System.Windows.Threading.Dispatcher.CatchExceptionStatic(Object source, Exception e)
     at System.Windows.Threading.ExceptionWrapper.CatchException(Object source, Exception e, Delegate catchHandler)
     at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
     at System.Windows.Threading.DispatcherOperation.InvokeImpl()
     at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
     at System.Threading.ExecutionContext.runTryCode(Object userData)
     at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
     at System.Windows.Threading.DispatcherOperation.Invoke()
     at System.Windows.Threading.Dispatcher.ProcessQueue()
     at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
     at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
     at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
     at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
     at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
     at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
     at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)


---------------------------
OK   
---------------------------


0
Comment actions Permalink

Hello Morgan and Shawn
     Could you please check if using the /3GB switch (http://msdn.microsoft.com/en-us/library/windows/hardware/ff556232(v=vs.85).aspx) helps to reduce the number of OOM exceptions? Thank you!

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

Still no luck with the /3GB switch.  I just uploaded a video and error message (Resharper Memory Error.zip) to the ftp site for you to view.

0
Comment actions Permalink

Andrey:   In my case, the /3GB switch has actually helped greatly, at least on one of my VM's.   I can use the IDE for at least a few hours now, compiling multiple times, without an OOM so far.  

Windows Task Manager shows the IDE as using greater than 1.4 GB of memory constantly.

I will monitor over the next few days, I have userdump running, so if it gets another one, I will post a new dump.

0
Comment actions Permalink

I hate to be sarcastic but WOW a whole 2 hours without a crash

Sadly I abandoned R# and am now using a competitor product(s) , and strangely I haven't had a OOM error since I uninstalled R#. I can only draw one conclusion.

I see lots of perfomance and memory errors being addressed ( I am getting fedback from Auto Error Logs sent back to Jet Brains) , but these are going into V7 , Are we to hope that V 7 will have all these things fixed and skip V6 as a bad dream. Unless we have the same pain bedding V7 down as we had bedding 6.0 down before big issues were addressed in 6.1

I am coming around to teh conclusion that small is beautiful , trying to cram all finctionality into one  tool may well be the issue.

Mike

;)

0
Comment actions Permalink

Hello Morgan
     Thank you for the update! I'm glad that this solution has helped you.

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

Hello Shawn
     I see, we'll keep looking into this problem then. Thank you!

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

Did you get my upload and see that the /3GB switch didn't help me?

Update: sorry, I posted too fast and before I got your response to me above.

0
Comment actions Permalink

Hello Shawn
     However, I'm afraid I wasn't able to play the video that you've uploaded. Perhaps there was some upload error. How big should the .zip file be? For me it's only 619kb.

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

Once uncompressed, it should be 4.88MB.  Do you have different players to try with?

0
Comment actions Permalink

Andrey, Did you get the video to play after un-zipping it?  I'm getting the same error on a different machine and a different project.  This is a much smaller project - only 144 aspx files, and 58 .vb files in a single project.  I was able to capture a memory crash using the memory profiler and I've uploaded it.  Filename is ResharperProfile.zip

0

Please sign in to leave a comment.