Archive for April, 2011

Who the hell killed my process?

April 17, 2011 2 comments

There is a few reasons that can make a process disappear. It can be:

  • a normal termination (you reach the end of the main function)
  • a call to ExitProcess, potentially located anywhere in your code
  • an exception walking up all through the call stack of its thread, making the process die.
Those three reasons are quite easy to debug. For the first one, just check the code logic that made the program exits. For the second one, a breakpoint put on kernel32!ExitProcess should do the trick. And of course, the third one is caught by any decent debugger because it’s what is called a Second Chance Exception, meaning that you program is about to crash.
But there is another sneaky reason: your process could have been killed by another process. Even between processes, life is hard, and as long as you have sufficient rights, killing another process is just another line of code. It can happen on production systems because of a poorly designed cleaning batch, or it can be malicious software trying to end any process that can harm it: an antivirus software, or a spying tool.
So the question is: how can you know which process killed your lovely software?

Read more…

Categories: Windows debugging tricks Tags: ,

An introduction to WinDbg for developpers

Kirk Evans from Microsoft posts a nice introduction to WinDbg for developers on his blog, I recommend anybody who wants to unleashed his true debugging power to check it out: Intro to WinDbg for .NET developpers.

WinDbg rulez.

[French] Les nouveautes du noyau de Windows 7 et de Windows 2008 R2

Bonjour, la vidéo de ma session aux TechDays 2011 est disponible ici, et il n’y toujours pas de plugin Silverlight pour WordPress (en tous cas pour ceux qui préfèrent laisser les développeurs de WordPress ‘hoster’ leur blog). La présentation est toujours disponible ici.

Bon webcast !

Categories: Message Tags:

[French] Et si Sherlock Holmes faisait du debugging

Bonjour, la vidéo de ma session aux TechDays 2011 est disponible ici (hé oui, on ne peux pas intégrer de vidéo Silverlight dans WordPress, il faut donc cliquer sur un lien…). Bien sur, la présentation est toujours disponible ici.

Bon webcast !

Categories: Message Tags: