We help IT Professionals succeed at work.

External Exception C0000006

wipnav
wipnav asked
on
Medium Priority
11,485 Views
Last Modified: 2013-12-03
Hi,

I wrote an application (in Delphi) that is used by hundreds of NT users over an internal network. The .exe file is about 2161KB in size, and resides on an NT server that all of the clients access. There are no DLLs involved. Nothing installed on the clients.

My application is written to log all exceptions to a shared network directory. I review the exceptions daily. A number of the exceptions that I get are 'External Exception C0000006' errors. Quite often a number of people get this error around the same time, but sometimes it is only one person.

I know that when we had a problem with one of the network switches that many people received this exception. Normally though, the network doesn't have any problems (or so I am told).

All that I've been able to find about this exception is:

STATUS_IN_PAGE_ERROR = $C0000006;

"An 0xc000006 exception error occurs when the system attempts to retrieve a swapped-out page and fails."

So, what causes this exception? Is it something that is isolated to the NT client? Some virtual memory problem related to swapping? If this is the case I wouldn't expect many clients to get the error around the same time ever. Or is it always due to some sort of network problem related to users having problems communicating with the .exe file on the NT server? Or is it a problem with the NT server itself? Maybe the NT server has a swapping problem.

Regards,

Bill
Comment
Watch Question

Commented:
>>There are no DLLs involved

That is very unlikely!  You mean, I assume, that you have no EXPLICIT DLLs used.  If you run this through the Windows SDK DEPENDS tool you'll see that there are probably dozens of DLLs in the dependency list for this application.

The STATUS_IN_PAGE_ERROR is not something you should be able to cause in a user-mode application.  It's a kernel fault.  Is this strictly a user mode application?  Does it use or directly interface with devices?  Perhaps via the DeviceIoControl() API?

Author

Commented:
Your assumption is correct. There are no explicit DLLs used.

I don't know exactly what it means to be a user mode application, so I can't really answer that question. My application connects to a database server through ODBC. It reads and writes disk files. It has a GUI. It sends jobs to the printer. That's about it.
Commented:
Windows doesn't write code-pages to the swap file, because it can just read them again from the exe file.
If you have network problems when it needs to do this, you will get the STATUS_IN_PAGE_ERROR excption.

You can move the exe to the client disk to avoid this, which can also improve the performance of our program, and reduce network traffic (if the clients often has to re-read code from the exe file).
But this will make it difficult to upgrade your program.

Adding more memory to the clients can also solve the problem, because then they don't have to re-read the exe file (so often).

If it is a one-time problem, and you are just looking for an explanation, I wouldn't change anything.
If your program needs access to something on the network (like a database), then there is no point in solving this, because you will just get another error.

Author

Commented:
Thank you. "Windows doesn't write code-pages to the swap file, because it can just read them again from the exe
file." That is what that I needed to know.