EXETOOLS FORUM  

Go Back   EXETOOLS FORUM > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 04-15-2017, 22:32
tusk tusk is offline
Friend
 
Join Date: Jun 2016
Posts: 15
Rept. Given: 0
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 4
Thanks Rcvd at 0 Times in 0 Posts
tusk Reputation: 0
[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
Reply With Quote
  #2  
Old 04-16-2017, 05:54
korosh korosh is offline
Friend
 
Join Date: May 2007
Posts: 74
Rept. Given: 99
Rept. Rcvd 25 Times in 15 Posts
Thanks Given: 7
Thanks Rcvd at 9 Times in 5 Posts
korosh Reputation: 25
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
Reply With Quote
The Following 2 Users Say Thank You to korosh For This Useful Post:
niculaita (04-16-2017), tusk (04-16-2017)
  #3  
Old 04-16-2017, 23:50
tusk tusk is offline
Friend
 
Join Date: Jun 2016
Posts: 15
Rept. Given: 0
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 4
Thanks Rcvd at 0 Times in 0 Posts
tusk Reputation: 0
Thanks a lot korosh
I will start with this and hopefully be able to find out the method(s) responsible for the 99% Cpu
Reply With Quote
  #4  
Old 04-17-2017, 03:06
tusk tusk is offline
Friend
 
Join Date: Jun 2016
Posts: 15
Rept. Given: 0
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 4
Thanks Rcvd at 0 Times in 0 Posts
tusk Reputation: 0
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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[dnSpy Extension] TraceSpy phono Community Tools 7 12-06-2016 02:11
dnSpy Plugins n00b Developer Section 2 08-29-2015 17:11
To manage Threads in DLL's El Cid General Discussion 3 05-09-2014 21:05
Need to find a pattern in a running file merlin General Discussion 14 07-20-2002 06:59


All times are GMT +8. The time now is 16:56.


ICP05004977
vBulletin Security provided by vBSecurity v2.2.0 (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX