Best way to track down a memory leak (C#) only visible on one customer's box

匿名 (未验证) 提交于 2019-12-03 02:56:01

问题:

What is the best way to track down a memory leak that is only found on one customer's test/release box, and no where else?

回答1:

dotTrace3.1

(This question is kinda funny, cause I am tracking a mem leak that isn't present on my machine ...)



回答2:

Try a memory profiler like ANTS Profiler.



回答3:

If the user has the problem it consistently, take a stackdump and analyse in the standard way



回答4:

It's either code, data or configuration.

Since you say the code is not faulty 100% of the time, I would blame configuration. Take a copy of the configuration (and optionally some data) and try to replicate the problem; you won't know you've found and fixed it without reproduction.

Finally, solve it with a memory profiler.



回答5:

Here's an option: Give them a box where the leak isn't present.

Sometimes, it's not the code.

Edit: It's either the code, the data, or the configuration.

Or the .NET Framework, the OS, the drivers, IIS, or COM (automating Excel, for example), or so-on.

My assumption is that the memory leak is not reproducible except on the client's box (which the dev cannot be allowed to access for debugging).



回答6:

PerfMon can be helpful (http://dotnetdebug.net/2005/06/30/perfmon-your-debugging-buddy/). There are several counters that may help narrow down what resource is leaking, and at what rate, etc.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!