The host computer software at the customer site said after a period of time that there was no response after operation, but the host computer did not die, and some strange phenomena occurred:
- The time in the upper left corner does not move (originally it runs once every 1 second)
- Use the task manager to view it. The memory occupies 1.5G and there are more than 3000 threads. Under normal circumstances, there should be about 400 threads and the memory is within 500M (there are many devices).
This analysis is more concerned about thread leaks and why threads keep increasing.
Solution:
1. Manual snapshot memory Dump file
2. Directly use VS2022 to analyze the Dump file
Select the stored dmp file, it will load symbols online
Click on the top right 运行分析诊断
:
Click the分析
button
and some analysis appears below. Then click on each one for details.
From here you can probably find some clues indicating which function has the problem.
The probable reason for the final analysis is the extensive use of asynchronous code in threads. The code will be posted later.