Jump to content

  • Log In with Google      Sign In   
  • Create Account


Debugging a system hang (entire OS freezes)

  • You cannot reply to this topic
6 replies to this topic

#1 CDProp   Members   -  Reputation: 929

Like
0Likes
Like

Posted 07 August 2014 - 01:54 PM

Hi. I have an application I'm working on that, perhaps 1 time in 500, hangs the entire system on startup. And by that, I mean that the entire OS freezes including the mouse pointer, and no input is accepted from the keyboard. I can't even imagine what I could be doing from within the confines of my program in order to cause these system-wide effects, but I assume that it's some kernel mode thing. Does anyone have any tips on debugging this sort of issue? This is a C++ OpenGL application running on Windows 7.



Sponsor:

#2 DoctorGlow   Members   -  Reputation: 781

Like
5Likes
Like

Posted 07 August 2014 - 02:57 PM

I would try to log as much as I could to a file (flush it out or close the file after each write). Then when it hangs, reboot, and look over the log file. This may give you at least approximate area where it hags.



#3 CDProp   Members   -  Reputation: 929

Like
0Likes
Like

Posted 07 August 2014 - 03:02 PM

Ok yeah, I've got trace logging, although this happens so infrequently that I'd hate to have it on all the time. I guess I really should, though. Thanks.



#4 ferrous   Members   -  Reputation: 1910

Like
2Likes
Like

Posted 07 August 2014 - 03:59 PM

attach a windbg remotely and see if you can debug it that way? =)  



#5 SeanMiddleditch   Members   -  Reputation: 5056

Like
4Likes
Like

Posted 07 August 2014 - 04:42 PM

This is a C++ OpenGL application running on Windows 7.


Update your graphics drivers first. The major proprietary OpenGL drivers are often very buggy and even simple functions or innocent combinations of functions can cause all kinds of kernel panics and freezes. This is one of the reasons both Firefox and Chrome jump through hoops to translate WebGL and their internal rendering through Direct3D instead of using OpenGL directly. Direct3D drivers are forced to use more of Microsoft's runtime and the WDDM model which also makes them more resilient to internal driver errors or hardware errors than the typical OpenGL driver (on any platform).

#6 Matias Goldberg   Crossbones+   -  Reputation: 3128

Like
3Likes
Like

Posted 07 August 2014 - 08:48 PM

Check the system logs in the Control Panel. There's often useful information there.

Check if minidumps are being generated.
If you've disabled your Swap File or its size is too low, minidumps won't be generated.

Also don't rule the possibility of hardware problems. If your application has no VSync, and the CPU is not doing anything, the GPU may be running so fast it overheats or your PSU can't deliver enough power; which is harder to witness in other programs because rarely the GPU runs 100% uninterrupted (because of VSync or because the CPU has actually some work to do, stalling the GPU)

#7 Endurion   Crossbones+   -  Reputation: 3453

Like
1Likes
Like

Posted 07 August 2014 - 11:22 PM

Are you using any libraries or systems beside OpenGL? Like playing sound during startup?

 

Sometimes it's the coincidental accessing of a resource (by your game and some other program) getting drivers bonkers

 

(I had something similar on a HP desktop where starting a sound in DirectSound and WinAmp starting a song at the same time would completely hang the machine)


Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>





PARTNERS