Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Unknown Access violation in DBISAM Server 4.x
Tue, Jan 15 2008 10:19 PMPermanent Link

"Ralf Bertoldi"
I have some DBISAM Servers running on 2003 Servers.
Some times the clients get an dbsrvr Access violation (all at once)
Always it's an unknown dbsrvr error. The server must be restarted.
The error can't be tracked down to anything.. at my local environment
everything worked fine.. (one server, one client, no stress test,...)

So, I started playing around with C/S and ended up with a small sample
app. (put it to the binarys, my Home dir was c:\dbservertest)

The client app just calls some stored procedures at the server in a do
while loop ("start writing").

As long as just one client is active nothing special happens. But when
a second or third client is active with "writing"..  just start/stop a
little.. and an dbsrvr AV is raised.

A little help would be appreciated,... maybe I did some wrong codng or
it's a bug.

TIA

ralf
Wed, Jan 16 2008 12:54 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ralf,

<< I have some DBISAM Servers running on 2003 Servers. Some times the
clients get an dbsrvr Access violation (all at once)  Always it's an unknown
dbsrvr error. The server must be restarted. The error can't be tracked down
to anything.. at my local environment everything worked fine.. (one server,
one client, no stress test,...)

So, I started playing around with C/S and ended up with a small sample app.
(put it to the binarys, my Home dir was c:\dbservertest)

The client app just calls some stored procedures at the server in a do
while loop ("start writing").

As long as just one client is active nothing special happens. But when a
second or third client is active with "writing"..  just start/stop a
little.. and an dbsrvr AV is raised. >>

What are the steps that you're using to recreate this ?  The reason that I
ask is that you also have a timer button in the application, and I need to
know if this is active during this process or not.

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Jan 16 2008 1:26 PMPermanent Link

"Ralf Bertoldi"
Tim Young [Elevate Software] wrote:

> Ralf,
>
> << I have some DBISAM Servers running on 2003 Servers. Some times the
> clients get an dbsrvr Access violation (all at once)  Always it's an
> unknown dbsrvr error. The server must be restarted. The error can't
> be tracked down to anything.. at my local environment everything
> worked fine.. (one server, one client, no stress test,...)
>
> So, I started playing around with C/S and ended up with a small
> sample app. (put it to the binarys, my Home dir was c:\dbservertest)
>
> The client app just calls some stored procedures at the server in a
> do while loop ("start writing").
>
> As long as just one client is active nothing special happens. But
> when a second or third client is active with "writing"..  just
> start/stop a little.. and an dbsrvr AV is raised. >>
>
> What are the steps that you're using to recreate this ?  The reason
> that I ask is that you also have a timer button in the application,
> and I need to know if this is active during this process or not.


no, I dont't use the timer.(was just for testing purposes)
I just tested again.. all what I needed to get the AV is just the
"start writing" and "stop"

...
 for I := 0 to nCount do    // Iterate
 begin
   Label2.Caption := inttostr(i);
   application.ProcessMessages;
   if bBreak then break;

   // call RemoteProcedure
   //GetFileDateTime;  << if it's in the AV is coming faster
   WriteSomeText(myLoginID,i);

 end;    // for
...


So, all what I do is start 3 instances of the client, playing with
"start writing" and "stop".

regards,
ralf
Wed, Jan 16 2008 3:20 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ralf,

<< no, I dont't use the timer.(was just for testing purposes) I just tested
again.. all what I needed to get the AV is just the "start writing" and
"stop" >>

I'm getting a "list index out of bounds" error, but no AV.   The issue for
the error I'm getting is this:

 oQuery := TDBIsamQuery.Create(self);

and this:

 tblTemp := TDBIsamTable.Create(self);

Which is a big no-no - you're setting the owner of the component to the main
server form, which is running in an entirely different thread (the main
thread).  What you need is this:

 oQuery := TDBIsamQuery.Create(nil);

and this:

 tblTemp := TDBIsamTable.Create(nil);

Also, in the 'test' procedure you may want to add this line before creating
the resulttext parameter:

 ServerSession.RemoteParams.Clear;

Otherwise you'll end up sending back the input parameters for each call.

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Jan 16 2008 4:51 PMPermanent Link

"Ralf Bertoldi"
Tim,


>  tblTemp := TDBIsamTable.Create(self);
> Which is a big no-no -

it's good to build samples with a lot of errors... Smile
I didn't recognized this when I wrote it.
When I looked at my custom server I found 23 places where I created
tables or querys. 2 of them have had the "self" in the create.
I think these 2 errors are responsible for the av's I got from time to
time...

Thanks a lot!

Ralf
Wed, Jan 16 2008 5:00 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ralf,

<< it's good to build samples with a lot of errors... Smile I didn't
recognized this when I wrote it. When I looked at my custom server I found
23 places where I created tables or querys. 2 of them have had the "self" in
the create. I think these 2 errors are responsible for the av's I got from
time to time... >>

Yep, that would do it, and it wouldn't be very obvious at all.
Unfortunately this is one of the bad side effects of using the same TDBISAM*
components in the server-side procedures.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image