App crashes but no exceptions are loggged - isolated case

delphi package - automated exception handling

App crashes but no exceptions are loggged - isolated case

Postby santiago » Tue Jan 10, 2017 3:33 pm

Hello madschi!

Happy new year!!

We have one customer who has run into the following problem often. It is not reproducible, but there can be days where it does not ocurr at all, on other days it happen a couple of times or even more than 10 times.
What is happening is that our app is crashing but no exception is being logged - so we are kind of clueless as to what the cause of the problem could be.

We have been using madExcept for several months now and this is so far the only case where this is happening. One of my colleagues did a postmortem debug session with WinDbg after such a crash occurred on the customers machine and looking at the callstack it seems that there madExcept did intercept the exception but ended up in an endless loop?

Here is a screenshot of the callstack
Image

This is a screenshot of the windows event viewer
Image

Here is a link to the WinDbg dump file if it be of any use to you.
https://www.dropbox.com/s/6qbbb0wesvmhymt/madExcept_dump100120171500.dmp?dl=0

Please let us know if there is anything useful/helpful you can gain from this.

Have you had similar cases in the past, where an unhandeled exception occurs but is somehow not logged?

Thank you!
santiago
 
Posts: 33
Joined: Thu May 05, 2016 6:01 pm

Re: App crashes but no exceptions are loggged - isolated cas

Postby madshi » Mon Jan 30, 2017 12:33 pm

Hello,

and sorry for the late reply!

Hmmmm... This looks pretty bad. It seems madExcept wants to analyze the exception, but some internal data lookup crashes. My best guess right now is that either some memory was overwritten with random data (e.g. by a buffer overrun, or by writing to an already freed memory block), or that a random memory block was accidently freed which shouldn't have been freed.

Have you tried activating the "instantly crash on buffer overrun" feature in madExcept to check for buffer overruns etc?
madshi
Site Admin
 
Posts: 9314
Joined: Sun Mar 21, 2004 5:25 pm

Re: App crashes but no exceptions are loggged - isolated cas

Postby santiago » Mon Jan 30, 2017 1:49 pm

Thanks for the info!

Could this happen if the process runs out of memory?

We will look into the crash on buffer overrun switch.
santiago
 
Posts: 33
Joined: Thu May 05, 2016 6:01 pm

Re: App crashes but no exceptions are loggged - isolated cas

Postby madshi » Mon Jan 30, 2017 2:27 pm

Running out of memory usually produces a proper EOutOfMemory exception, but not memory corruption. I don't think that's a likely explanation.

Please note that the "instantly crash" feature currently only works in 32bit, and it consumes a lot of extra RAM. So if we've bad luck, it might not work for your process if it allocates a lot.
madshi
Site Admin
 
Posts: 9314
Joined: Sun Mar 21, 2004 5:25 pm

Re: App crashes but no exceptions are loggged - isolated cas

Postby santiago » Thu Feb 02, 2017 10:28 pm

madschi,

I guess it is not possible to enable the 'Instantly Crash on Buffer overrun' feature at runtime.
I tried:
MESettings.CrashOnOverrun := True;
MESettings.CrashOnUnderrun := True;

But those properties are read-only.

So they have to be set at compile time, correct? Unless I missed some other way to activate them at runtime.
santiago
 
Posts: 33
Joined: Thu May 05, 2016 6:01 pm

Re: App crashes but no exceptions are loggged - isolated cas

Postby madshi » Thu Feb 02, 2017 10:31 pm

Yes, they need to be set at compile time. The whole memory manager needs to be replaced, which is hard to do at runtime because at the time madExcept is initialized, some allocations may already have been made in system units.
madshi
Site Admin
 
Posts: 9314
Joined: Sun Mar 21, 2004 5:25 pm


Return to madExcept

Who is online

Users browsing this forum: Baidu [Spider] and 3 guests

cron