PLS HELP: application consumes 60minutes 100%CPU after exit

forum.advanced.programming (1998-2005)
peftraun
Austria
Posts: 56
Joined: 17 Nov 2018, 09:58
Location: Austria

PLS HELP: application consumes 60minutes 100%CPU after exit

Post by peftraun » 04 Mar 2005, 10:33

 Posted by:  Fritz Peinbauer 

hi,

in my application i make extensive use of classes, inheritance, dynamic
instantiation ( new ... ).
I experience 2 issues and I wonder if someone out there has/had similar
problems and maybe any hint for me:

1) during runtime of the application memory allocation contantly encreases
(up to hundreds MB), I have carefully checked the lifetime of the variables
and I think that I made no coding mistakes. Two weeks ago I have posted a
small sample apl (CTD 3.1) to this forum which reproduces the
(mis)behaviour. (see posting Subject: "Strange memory consmption")

2) After closing applications it take sometimes a long time until the
application disappears from the task list and it consumes 100% cpu.
Yesterdeay I saw my application for 60 minutes (!) in the task list after
the user had closed it. And for all the 60 minutes the process consumed one
cpu on a dual Xeon 3GHz machine with 2GB memory.

What could be the reason this? Where can I get any help to get this problems
solved?
Any answers will be higly appriciated.

thanks
fritz

peftraun
Austria
Posts: 56
Joined: 17 Nov 2018, 09:58
Location: Austria

PLS HELP: application consumes 60minutes 100%CPU after exit

Post by peftraun » 04 Mar 2005, 11:02

 Posted by:  Fritz Peinbauer 

Additional information:

I do NOT use any external resources like ActiveX, COM, no external functions
except vti..dll (Vis...). It pure Sal-Code.

Environment:
CTD-Version: 2.1 PTF4
OS-Version: win2000, XP, 2003-Server
Database: Oracle 10, 9i, 8i

Franz Josef Herbers

PLS HELP: application consumes 60minutes 100%CPU after exit

Post by Franz Josef Herbers » 04 Mar 2005, 14:24

 Posted by:  Franz Josef Herbers 

Hi Fritz,

just recently we had (and still have) a similiar case with a small database
(SQLBase) application. It's a simple utility extracting data out of some
tables and writing selected contents to flat .CSV files sequentially. The
extraction mechanism was basically taken from an IceTeaGroup sample
application (thanks to Frank Boettcher for that) and hence makes extensive
use of internal arrays (and not all the fancy stuff you mention). It's also
pure Sal-Code, no external functions except VT.

The symptoms are exactly are as you described (but not to that extent):

1. Memory consumption goes up and up
On bigger tables we sometimes get a crash (it occurs randomly, no pattern)

2. After exiting the application it stays a long time in memory (you can
watch it in Task Manager)
Slowly memory consumption goes down. In our case it takes typically 5 up to
10 minutes before the application is completely gone.
During this time it's a bad idea to start a second instance of the
application, as in most cases this causes a sure crash on the second
instance.

From this we concluded that the culprit is the array handling.

We are not really sure to call this a bug. We are aware of the problem and
live with it.

Thanks

Franz Josef Herbers

Lubos Vnuk

PLS HELP: application consumes 60minutes 100%CPU after exit

Post by Lubos Vnuk » 04 Mar 2005, 17:11

 Posted by:  Lubos Vnuk 

1) I think this is a bug (maybe even a known one). It is something to do
with not decreasing reference counters when a function gets a valid HUDV
parameter but fills it in with a newly allocated one via a call to another
function. Check out the latest PTF listings or try to "Log a bug".

2) TD may be trying to close all the handles that stay open, e.g. those from
1) or Sql Handles... Generally speaking, a decent application should take
care of this before it exists.

HTH,
Lubos.

peftraun
Austria
Posts: 56
Joined: 17 Nov 2018, 09:58
Location: Austria

PLS HELP: application consumes 60minutes 100%CPU after exit

Post by peftraun » 04 Mar 2005, 18:19

 Posted by:  F.Peinbauer 

Thanx very much to Lubos and FranzJosef for your responses.

1) you are right, this one is a bug and in the meantime I got a feedback to
my request from Gupta and they will "log a bug".

2) I will further investigate on that. I always relied on something called
reference counter which should care about destruction of objects and
deallocation of memory when the lifetime of the last referencing variable is
over. Have I missed anything important?

fritz

Return to “advanced.programming”

Who is online

Users browsing this forum: [Ccbot] and 0 guests