Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a simple program be responsible for a BSOD?

Tags:

windows

bsod

I've got a customer who told me that my program (simple user-land program, not a driver) is crashing his system with a Blue Screen Of Death (BSOD). He says he has never encountered that with other program and that he can reproduce it easily with mine.

The BSOD is of type CRITICAL_OBJECT_TERMINATION (0x000000F4) with object type 0x3 (process): A process or thread crucial to system operation has unexpectedly exited or been terminate.

Can a simple program be responsible for a BSOD (even on Vista...) or should he check the hardware or OS installation?

like image 969
math Avatar asked Oct 19 '09 12:10

math


People also ask

Can a program cause BSOD?

Typically, BSODs result from driver software or issues with hardware. Apps that crash sometimes cause blue screens of death if they're broken or flawed. Windows creates what's known as a minidump file when a BSOD happens.

Is a BSOD a hardware or software problem?

BSODs result from a driver software error or issues with hardware. A BSOD is a full system failure at the Windows kernel level due to an issue with Windows drivers and/or hardware. It is not an app crash. If the browser crashes, Windows continues running.

What could be causing BSOD?

BSoDs can be caused by poorly written device drivers or malfunctioning hardware, such as faulty memory, power supply issues, overheating of components, or hardware running beyond its specification limits. In the Windows 9x era, incompatible DLLs or bugs in the operating system kernel could also cause BSoDs.

Can BSOD be caused by BIOS?

An overclocked or misconfigured BIOS can cause all sorts of random issues, including BSODs.


2 Answers

Just because your program isn't a driver doesn't mean it won't use a driver.

In theory, your code shouldn't be able to BSOD the computer. It's up to the OS to make sure that doesn't happen. By definition, that means there's a problem somewhere either in hardware or in code other than your program. That doesn't preclude there being a bug in your code as well though.

like image 192
Jon Skeet Avatar answered Sep 30 '22 10:09

Jon Skeet


The easiest way to cause a BSOD with a user-space program is (afaik) to kill the Windows subsystem process (csrss.exe). This doesn't need faulty hardware nor a bug in the kernel or a driver, it only needs administrator privileges1.

What is your code exactly doing? The error message ("A process or thread crucial to system operation has unexpectedly exited or been terminate.") sounds like one of the essential system processes terminated. Maybe you are killing a process and unintentionally got the wrong process?

If somehow possible you could try to get a memory dump from that customer. Using the Debugging Tools for Windows you can then further analyze that dump as described here.

1Windows doesn't prevent you from doing so because it "keeps administrators in control of their computer". So this is by design and not a bug. Read Raymond's articles and you will see why.

like image 34
Dirk Vollmar Avatar answered Sep 30 '22 12:09

Dirk Vollmar