views:

1334

answers:

6

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?

A: 

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

Oskar
+3  A: 

dotTrace3.1

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

MagicKat
+3  A: 

Try a memory profiler like ANTS Profiler.

artur02
A: 

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).

David B
So, you mean the hardware allocates memory without ever giving it back? Whoa! I'm frightened.
xmjx
Hardware shouldn't be able to leak memory. But poorly written drivers sure can.
Jason Baker
A: 

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.

A: 

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.

GregUzelac