Catastrophic Failure after some days

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
martin
Posts: 52
Joined: Mon 07 Nov 2005 09:48

Catastrophic Failure after some days

Post by martin » Mon 03 May 2010 11:49

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

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Wed 05 May 2010 07:21

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.

martin
Posts: 52
Joined: Mon 07 Nov 2005 09:48

Post by martin » Mon 10 May 2010 12:24

I will try the new version, thank you.

martin
Posts: 52
Joined: Mon 07 Nov 2005 09:48

Post by martin » Mon 17 May 2010 07:23

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 ?

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 17 May 2010 08:10

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.

martin
Posts: 52
Joined: Mon 07 Nov 2005 09:48

Post by martin » Wed 02 Jun 2010 13:29

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.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Thu 03 Jun 2010 09:29

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.

martin
Posts: 52
Joined: Mon 07 Nov 2005 09:48

Post by martin » Thu 03 Jun 2010 09:55

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 ?

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Thu 03 Jun 2010 12:56

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.

martin
Posts: 52
Joined: Mon 07 Nov 2005 09:48

Post by martin » Mon 07 Jun 2010 08:46

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 ?

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 07 Jun 2010 10:12

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.

martin
Posts: 52
Joined: Mon 07 Nov 2005 09:48

Post by martin » Mon 07 Jun 2010 10:47

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.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Tue 08 Jun 2010 09:01

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.

martin
Posts: 52
Joined: Mon 07 Nov 2005 09:48

Post by martin » Wed 16 Jun 2010 10:36

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 ?

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Wed 16 Jun 2010 13:29

We use AsProtect to compress the dll library.

Post Reply