How to use Process Monitor and Process Explorer
I was chatting with Phil Haack today about a weird little bug/feature we were seeing in GitHub for Windows. I don't have the source code for the application, but I wanted to explore what was going on and get some insight so I could give Phil a decent bug report.
He and I spent some time on Skype sharing screens today and he commented "we should be recording this." So I went back and did just that.
Please take a moment and Subscribe to my YouTube Channel here: http://youtube.com/shanselman
In this short video I remind folks how Procmon and ProcExp work, how powerful they are and I learn some interesting things about GitHub for Windows!
Let me know if you find short videos like these useful, and if you do, suggest topics in the comments!
Also, a reminder, if you've got non-technical family or friends who want help with Windows 8, give them a YouTube Playlist designed just for them! http://hanselman.com/windows8
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
I'll also add Dependency Viewer as it does give good insight on issues related to what DLLs are being found by an executable, what exports are missing etc.
I would also recommend Mark Russinovich's series Case of the Unexplained which covers a lot of common debugging scenarios in Windows (application crashes and hangs, sluggish performance, BSoDs, etc.) using a variety of tools (including both Process Monitor and Process Explorer).
Thank you for doing these videos the way you do it. :) ProcMon and ProcExp are extremely useful tools and it's the right thing to promote it.
I think a deep dive video would be instructive.
The raymond chen style guess is that a mutex is registered by the GitHub.exe process so they can check to see if one is already running. The protocol handler sees the existing mutex that's owned by the frozen/broken GitHub.exe, but obviously doesn't know that other process is borked.
The "fix" would be to send the other process a Windows message and see if it was handled within a short period of time. If it's not then the UI is frozen and it can be assumed dead.
It should be noted that this is one of those times where a reboot would have fixed the issue but we'd all be the poorer for it since we wouldn't have had the nice walkthrough of process monitor/explorer :)
As for the mutex theory, I think procexp will show such mutexes in its handles list. I do something similar in a part of our software where we sometimes want just one copy but also need multiple copies if they're launched with particular command-line arguments.
Other video love-to-sees:
- Real-world tips where the best way to do something isn't really the textbook approach but works better in real-life.
- IIS tips. I know a lot of developers like me have to stumble through IIS configurations because we don't have a dedicated server person to help with it.
- Other useful tools in your development toolchest and quick overviews on how to use them, even if they're not necessarily MS tools, like Git, HTTrack.
- Interviews with or discussions of developer blogs you find interesting.
- State of the industry or interesting developments coming in the future.
- Thoughts on products like Oculus Rift, or Minecraft especially in light of MS's acquisition of it.
Comments are closed.
Thanks for one more useful post. Just to add to it. http://processhacker.sourceforge.net/ is a free open source clone of Process explorer which has all the exact features of process explorer and some polish on top of process explorer. I always feel why the "view dll"/"view handles" is not part of process properties dialog in process explorer. Fortunately Process hacker does exactly that. Give it a shot you may like it.