Application crash without explanation

I would like to apologize in advance because this is not a good question.

I have a server application that runs as a service on a dedicated Windows server. In a very random way, this application crashes and does not indicate what caused the crash.

When it crashes, there is an entry in the event logs stating that the application failed, but does not make it clear why. It also gives some information about the fault module, but it does not seem very reliable, since the fault module usually differs with every failure. For example, the latter said that it was ntdll, the one that said before that it was libmysql, the one that said before that it was netsomething, etc.

Each thread in the application is wrapped in try/catch (...)(everything that is selected from the exception handler / not specifically caught), __try/__except(structured exceptions) and try/catch(specific C ++ exceptions). The application is compiled with / EHa, so catch will also catch structured exceptions.

All of these exception handlers do the same thing. First, an emergency reset is created. Secondly, the record is written to a new file on disk. Thirdly, the record is recorded in the application logs. In the event of these failures, none of this happens . The lowest exception handler ( try/catch (...)) does nothing, it just terminates the thread. The main thread of the application is sleeping and has no chance of throwing an exception.

Application log files simply stop logging. Soon after, the process that the server monitors notices that it is no longer responding, sends a warning, and starts it again. If the server monitor notifies that the server is still running, but simply does not respond, it takes a dump of the process and reports it, but this does not happen.

The only reason for this behavior that I can think of besides uncaught exceptions is a call exitor similar. The code search does not cause any calls for any functions that may lead to the completion of the process. I also made sure that the program did not end normally (i.e., a request to stop from the service manager).

windbg ( Visual Studio, ), .

? , , .

+5
4

, , , , ( ). :

1) catch .

2) catch (, catch(...)), . , Windows . . , . Windows , .

catch(...). . () catch(...) . , catch(...), :

" . - , . ! ZOMG!"

- -

" , , ".

- , , , - . , , , , , . , . , , .

- , , , . , - , . , , - . new, delete, CRT, , , char buf[256], go > POOF < . , . .

, , , catch , SEH. Windows SetUnhandledExceptionFilter. , , , . ( ) , , - , MiniDump . MiniDump , , - CRT . , API, , , , .

+7

, , . , Purify, , ?

+1

, , , .

, , , , Windows ( MSDN):

. , , , .

, - - , , . .

- Raymond Chen IsBadXxxPtr CrashProgramRandomly

+1

All Articles