惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Tenable Blog
K
Kaspersky official blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
T
The Exploit Database - CXSecurity.com
Cisco Talos Blog
Cisco Talos Blog
P
Palo Alto Networks Blog
Latest news
Latest news
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Privacy International News Feed
The Hacker News
The Hacker News
T
Tor Project blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Cisco Blogs
阮一峰的网络日志
阮一峰的网络日志
Recent Commits to openclaw:main
Recent Commits to openclaw:main
博客园_首页
N
News and Events Feed by Topic
W
WeLiveSecurity
罗磊的独立博客
GbyAI
GbyAI
T
Troy Hunt's Blog
Y
Y Combinator Blog
Recorded Future
Recorded Future
The Cloudflare Blog
TaoSecurity Blog
TaoSecurity Blog
爱范儿
爱范儿
美团技术团队
Attack and Defense Labs
Attack and Defense Labs
C
Check Point Blog
Engineering at Meta
Engineering at Meta
Cyberwarzone
Cyberwarzone
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
F
Fortinet All Blogs
The GitHub Blog
The GitHub Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Apple Machine Learning Research
Apple Machine Learning Research
Know Your Adversary
Know Your Adversary
AWS News Blog
AWS News Blog
D
DataBreaches.Net
Recent Announcements
Recent Announcements
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
M
MIT News - Artificial intelligence
Webroot Blog
Webroot Blog
Security Latest
Security Latest
T
Tailwind CSS Blog
V2EX - 技术
V2EX - 技术
aimingoo的专栏
aimingoo的专栏
S
Security @ Cisco Blogs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed

博客园 - lixiong

关于调试,有一个真实的故事我要讲一讲 疑似CPU或者内存故障导致进程崩溃 Web服务的性能,和BCrypt性能问题的解决方法 md5/sha1+salt和Bcrypt 从Win8回顾微软平台的各种技术 为什么EXE不能超过4GB 其实.NET的确慢, 微软推的这一套的确不适合很多地方 微软平台UI自动化(UIA)经验集 今天在InfoQ看到一个google关于test的演讲, 非常精彩 来来来, 我也来发发我大二时候的作品 Windows用户态程序高效排错 全文PDF 回顾下COM+提供的服务,就明白啥是中间层了, 我把绝招贡献给你们吧 招聘职位:赴微软软件测试开发工程师(产品: Windows 7) 《Windows 高效排错》 可以在CSDN读书频道预览了 三个关键命令找出ASP.NET程序内存分片的原因 除了memory leak和handle leak外的其它资源泄露 一些重要的计数器 IE的leak useful log options in .Net
handle leak ts steps in chinese
lixiong · 2006-11-06 · via 博客园 - lixiong

2006-11-06 14:16  lixiong  阅读(2817)  评论()    收藏  举报


1. 安装Windbg到C:\Debuggers目录
2. 安装Application Verifier。对需要调试的程序激活“Handles - Detect invalid handle usage”
3. 确保编译的时候生成了目标程序的symbol文件,并且统一部署到自定义的symbol目录。
4. 启动目标程序
5. 启动性能监视器开始监视目标程序,添加
Process
Processor
Memory
System
6. 启动windbg,设定好symbol路径,开始监视目标程序
7. 在windbg命令窗口输入:
.logopen c:\log.txt
记录windbg输出到文本文件
8. 运行!handle和!htrace命令,等待命令执行完成
9. 输入下列命令避免1st chance exception干扰问题的重现
SXN *
SXN av
SXN clr
SXN eh
SXN cc
10. 输入g命令,让目标程序开始运行
11. 重现问题,问题发生后用windbg挂起程序
12. 再次输入!handle和!htrace,保存handle信息
13. 运行.dump命令抓取问题发生后的dump文件
14. 输入.logclose关闭log文件
15. 收集性能日志文件

通过分析C:\log.txt文件中问题发生前后的差异,找到发生泄漏的handle是在什么callstack中分配的,以及handle的类型。在结合源代码定位。