[Dbi-interbase-devel] Leak, but no leak (was: Re: DBD::InterBase Leaking?)
Status: Beta
Brought to you by:
edpratomo
From: Edwin P. <ed....@co...> - 2000-10-06 11:58:12
|
Edwin Pratomo wrote: > > Michael Samanov wrote: > > > > > I'm not thinking it's a deal of SS or classic server: you are client > > and it is server, and you are both different processes communicating > > via TCP/IP. If IBPerl code shows the same problem then it means that > > some leakage is in the Interbase client library - gds.a (or, more > > likely, gds.so). Silly question: where is the libgds.a? > > I've just tried this test using DSQL C API, and it seems that _both_ > drivers, mine and IBPerl has leaks. ^^^^^^^^ whoops, IBPerl is not a driver. sorry. > For now I haven't found where exactly it leaks. Need investigate this > further. > After spending hours observing this behavior, finally I've located the problem. I've attached the test sources and the result files as well for you to see. My conclusion is the problem is not in the driver (I dont know about IBPerl, haven't taken a closer look at that), because the _same_ behaviour is also observed when directly using InterBase's DSQL_API, with the same logic flow as in the driver. My leak.c works like the driver in AutoCommit on, and noauto.c works like in AutoCommit off. From the log file created by leak.pl, we can see how the ibserver process growing. comparing the top_autocommit_1.txt and top_autocommit_2.txt, seems a bit confusing. the second log shows a fixed size increment of 4 KB at every 16304 loop (what is this mysterious number?), after the first increment at the 12349-th loop. After repeating the test many times, I see that ibserver starts growing after the 10000-th loop. The size is restored after disconnection. So we may encountered serious problem if we are running DBD::InterBase or more exactly, any client, in a persistent database connection such as Apache::DBI if we make such loops (more than 10000 loops) many times, before the connection is disconected (and reconnected) due to timeout. Rgds, Edwin. > > > I just have tested - FreeBSD has the same problem. > > |