views:

222

answers:

2

I am faced with the following issue and at this point I feel like I'm severely lacking some sort of tool, I just don't know what that tool is, or what exactly it should be doing.

Here is the setup: I have a 3rd party DLL that has to be registered in GAC. This all works fine and good on pretty much every machine our software was deployed on before. But now we got 2 machines, seemingly identical to the ones we know work (they are cloned from the same image and stuffed with the same hardware, so pretty much the only difference is software settings, over which I went over and over, and they seem fine).

Now the problem, the DLL in GAC takes a very long time to load. At least I believe this is the issue, what I can say definitively is that instantiating a single class from that DLL is the slow part. Once it is loaded, thing fly as they always have. But while on known-good machines the DLL loads so fast that a timestamp in the log doesn't even change, on these 2 machines it take over 1min to load.

Knowns: I have no access to the source, so I can't debug through the DLL. Our app is the only one that uses it (so shouldn't be simultaneous access issues). There is only one version of this DLL in existance, so it shouldn't be a matter of version conflict. The GAC reference is being used (if I uninstall the DLL from GAC, an exception will be thrown about the missing GAC reference).

Could someone with a greater skill in debug-fu suggest what I can do to track down the root cause of this issue?

+1  A: 

I think your best bet here is to debug into the application. Source is not strictly needed to debug an application, it just makes it a heck of a lot easier. Here is the strategy that I would use

  1. Disable Just My Code (Tools -> Options -> Debugger -> General)
  2. Start the program under the debugger
  3. Wait for the hang
  4. Hit break.
  5. Open up the call stack

At this point you should be able to see where the program is currently broken at. Essentially the name of the method. This will give you some indication of what operation is taking so much time during load (even though you won't have the source).

If the method is unfamiliar post back the data here and hopefully someone will be able to help you out with tracking down the problem.

JaredPar
Thanks for the suggestion, but I've actually done that, and it is freezing in my code (where I instantiate a class from that DLL). This is what makes me believe that it is the loading of the DLL into memory that is causing the slow down. I guess what I'm looking for is a tool that I can point at a reference in GAC and it would tell me what's accessing it (I'm starting to suspect that a virus scanner could be locking it up for a check up, since I've just found out that the 2 machines don't use the same version, since they are to be shipped to a different customer)
Alex K
+1  A: 

download 2 small utilities called : 'filemon.exe' and 'regmon.exe' they show you whats going on concerning opening files & registry respectively. Whenever I can't decide if a program hangs or is just loading, these tools give me insight in what they are doing, or what they are waiting for.

Coder of Salvation

Coder of Salvation