Exetools

Exetools (https://forum.exetools.com/index.php)
-   General Discussion (https://forum.exetools.com/forumdisplay.php?f=2)
-   -   [DnSpy] - Find out running threads (https://forum.exetools.com/showthread.php?t=18214)

tusk 04-15-2017 22:32

[DnSpy] - Find out new launched threads (i.e. timers)
 
Hi

One of the application I'm working on will go to 99% CPU usage after a couple of minutes (always about 4/5 minutes). Even if I just launch and leave it untouched.

I guess the app has a timer, launch some parallel thread, and in this thread something is going wrong (we know this app tries to call home some times, but it also might be a local license check, or even something unrelated, no idea so far).


Question is : how can I find out which thread (+method adress) has been launched with dnSpy (or other tool ?)
The goal would be to be able to break later on the specific location to see what's going on, in DnSpy


Thanks a lot
tusk

korosh 04-16-2017 05:54

You need to do some data collection to identify the problem (threads) before using DnSpy.
Check out this articles:
http://improve.dk/debugging-in-production-part-1-analyzing-100-cpu-usage-using-windbg/
https://www.toptal.com/dot-net/hunting-high-cpu-usage-in-dot-net

tusk 04-16-2017 23:50

Thanks a lot korosh :)
I will start with this and hopefully be able to find out the method(s) responsible for the 99% Cpu

tusk 04-17-2017 03:06

korosh : that was exactly what I needed !!


I could find the method in no time.

Developer had indeed an infinite loop starting after a couple of minutes. This was triggered before the end of the main form's load after an integrity check (which of course failed because I edited the assembly many times)


Thanks again, I learned something good today
;)


All times are GMT +8. The time now is 08:14.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX