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

后端 未结 6 809
孤街浪徒
孤街浪徒 2021-02-13 21:11

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?

相关标签:
6条回答
  • 2021-02-13 21:29

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

    0 讨论(0)
  • 2021-02-13 21:35

    Try a memory profiler like ANTS Profiler.

    0 讨论(0)
  • 2021-02-13 21:39

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

    0 讨论(0)
  • 2021-02-13 21:47

    dotTrace3.1

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

    0 讨论(0)
  • 2021-02-13 21:48

    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.

    0 讨论(0)
  • 2021-02-13 21:49

    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.

    0 讨论(0)
提交回复
热议问题