Page 1 of 2

Catastrophic Failure after some days

Posted: Mon 03 May 2010 11:49
by martin
Hello !

We are randomy getting "Catastrophic Failure: " when executing queries (when calling Open respectively), but only after several days of application runtime. It seems like something is leaking or adding up over the days.

Queries are really simple like "SELECT TOP 1 * FROM TABLE WHERE x=y"

We are using:

Delphi 6.02
dbexpsda 4.45.0.16
Windows 2008 64-bit Enterprise
SQL Server 2008 64-bit Enterprise

After closing and restarting the application, everything works again.
Server has enough free physical memory.

Any help greatly appreciated.

Kind regards
Martin

Posted: Wed 05 May 2010 07:21
by Dimon
We have fixed one problem with memory leak in the latest DbxSda build. Please, try to download the DbxSda build version 4.55.22 and check if this problem still exists.

Posted: Mon 10 May 2010 12:24
by martin
I will try the new version, thank you.

Posted: Mon 17 May 2010 07:23
by martin
Dimon wrote:We have fixed one problem with memory leak in the latest DbxSda build. Please, try to download the DbxSda build version 4.55.22 and check if this problem still exists.
The problem still occurs.

We have replaced the dbxsda.dll on the client system but not recompiled the host application itself. Do we have to do this as well ?

Posted: Mon 17 May 2010 08:10
by Dimon
You don't need to recompile the application. Please make sure that you use the latest version dbxsda.dll.
If it doesn't solve the problem, then try to compose a small sample to demonstrate the problem and send it to dmitryg*devart*com.

Posted: Wed 02 Jun 2010 13:29
by martin
I failed to compose a small sample to demonstrate/reproduce/isolute the problem. The project where it happens has 200K Lines.

This error happens after a few days only. It seems that it does only happen on 64-bit systems and not on 32-bit systems. Same executable.

We have a serious productive issue with this now !!

We need your help.

PS: Latest driver is in use.

Posted: Thu 03 Jun 2010 09:29
by Dimon
Unfortunately, the information you have provided is not enough to reproduce your issue.
Please, check if the problem can be reproduced if standard dbExpress drivers supplied by Borland are used.

Posted: Thu 03 Jun 2010 09:55
by martin
Are "Catastrophic Failure" in your sql server dbexpress driver always related to an out of memory problem ?

Process explorer shows enough memory, so I assume only fragmentation could be a problem or some driver internal memory management problem ?

Also I have asked this question in another thread but got no reply from you: what memory manager do you use inside your driver ? Some kind of optimized MM like NexusMM, SafeMM or EasyMM ?

Posted: Thu 03 Jun 2010 12:56
by Dimon
We are using standard Delphi memory manager.
The "Catastrophic Failure" error may be raised by many causes, and we can't conjecture this cause because we did not encounter this with other users.

Posted: Mon 07 Jun 2010 08:46
by martin
Production Sites crashed again this weekend with catastrophic failure.

All I can say is that we are regularely opening queries with really huge result sets.
Dimon wrote:We are using standard Delphi memory manager.
Does this mean FastMM4 ? Which Delphi Version are you compiling the driver with ?

Do you see any correlation on using the application under x64 ? Does this make any difference to your driver ?

Posted: Mon 07 Jun 2010 10:12
by Dimon
dbexpsda.dll is compiled with Delphi 6, dbexpsda30.dll - with Delphi 2006, dbexpsda40.dll - with CodeGear RAD Studio 2009.
On Windows x64 all versions of dbExpress drivers, and Delphi applications work only in the 32-bit mode.

Posted: Mon 07 Jun 2010 10:47
by martin
Dimon wrote:dbexpsda.dll is compiled with Delphi 6
OK, does this mean, that the dbexpsda.dll does use the original Delphi 6 Memory Manager, which is known to be very slow in multithreaded environments and also prone to memory fragementation ?

We use the Nexus Memory Manager (NexusMM) in the host application to prevent this problems.

Main question: Does the dbexpsda.dll then use the hooked in Nexus Memorx Manager used in the host as well or it's own Orginial Delphi 6 Memory Manager ?

PS: While I understand that host and drivers run in 32-bit mode under x64 Windows, there could be a difference in the way, the memory management works under 32-bit and 64-bit/WOW64.

Posted: Tue 08 Jun 2010 09:01
by Dimon
Please contact us by dmitryg*devart*com email and specify your developer license number. We'll send you a custom build with the FastMM Memory Manager.

Posted: Wed 16 Jun 2010 10:36
by martin
Dimon wrote:Please contact us by dmitryg*devart*com email and specify your developer license number. We'll send you a custom build with the FastMM Memory Manager.
We have rebuilt the DLL with the Nexus Memory Manager we are using in the host application. The resulting DLL is 477 KB in size, whereas the one provided as compiled version is only 277 KB in size. What could be the reason for this ?

Posted: Wed 16 Jun 2010 13:29
by Dimon
We use AsProtect to compress the dll library.