A few days ago I translated the first article of the Tess Debug series and introduced some basic commands for debugger tools. Today we're going to discuss Tess's second article on the Debug series. Tess in each series uses the structure of the problem + result, in order to simplify, I will bring the question and the result to everybody. In addition, everyone in their own machine reproduce these problems, due to machine differences, many of the results may be different from the Tess, this does not matter, as long as we can master the principle on it. At the same time, because of the size of the blog, the picture shows the content is not very clear, you can find from the Tess link.
One of the ASP.net Debug series: Environment matching
Windbg,sos,tinyget,adplus Common Commands
1. Recurring problems
1. Browsing page: http://localhost/BuggyBits/FeaturedProducts.aspx
It takes about 5 seconds to present the page, and you can judge from the start and end of the page.
2. Open 5 browsers and browse the page just now.
It's important to note that if you refresh the page almost at the same time, but you don't see the same start time on these 5 pages, chances are you're not running the Internetconnections.reg file. If not, double-click it to make it modify the registry, and then test again.
Question 1: What is the running time of 5 pages?
Results 1: The results of the 5 browsers were: 1-5.0s,2-9.1s,3-12.57s,4-16.07s,5-18.61s. If you see each request at intervals of 5 seconds, then you are most likely not running the Internetconnections.reg file.
What is the CPU occupancy rate of the problem 2:w3wp.exe, high or low?
Result 2: Very low CPU occupancy rate, only 0~5%.
Question 3: What are the potential reasons for this hang problem with low CPU usage?
Result 3: For this processing request time is increasing and the CPU occupancy rate is low, there are generally two reasons: 1 All request is waiting for a single thread exclusive resource, that is, this resource can only be used by 1 thread alone. In this case, all other thread will need to wait. 2 We are waiting for a resource, because the resource is still not available, causing all thread blocking that requires the resource.
2. Get dump
1. Open a command line window and switch to the installation directory of debugger tools. Enter the following command, but note that you do not press ENTER immediately.
ADPLUS–HANG–PN W3wp.exe–quiet
2. Reopen a command line window, also switch to the debugger tools directory, using the Tinyget script for concurrent access to the page.
Tinyget-srv:localhost-uri:/buggybits/featuredproducts.aspx-threads:30-loop:50
This command will launch 30 threads and send 50 requests to featuredproducts page.
3. When the request is still sent, you can press ENTER in the ADPlus window to get the dump file.
Question 1: Under the-hang parameter, what triggers the dump file generation?
Result 1: The problem is somewhat covert, and the dump file is generated immediately when you run ADPlus, unlike the-crash parameter. The-crash parameter is a dump file that is generated when the program satisfies the crash condition.