Board index » delphi » Interbase server shutdown

Interbase server shutdown


2006-07-28 10:10:57 PM
delphi264
I'm having a problem with IBServer 7.5.1.16x
The server shutdown when i insert in a table and in the log i get the error
MAAT (Server) Fri Jul 28 15:49:23 2006
insert into pet_pcr ( IDPETPCR, IDPRUPCR, IDLABORATORIO, FECHA, COMENTARIO,
IDESTADO ) values ( ?, ?, ?, ?, ?, ? )
Access violation.
The code attempted to access a virtual
address without privilege to do so.
This exception will cause the InterBase server
to terminate abnormally.
MAAT (Client) Fri Jul 28 15:49:23 2006
F:\InterBase\bin\ibserver.exe: terminated abnormally (-1)
How can a simple insert make the server shutdown, of course i have triggers
in tables, but make the server shutdown is what i can belive.
It only happens when i insert some values in the fields.
Regards
 
 

Re:Interbase server shutdown

Jesus,
1. Do you use have ANY UDFs in your triggers? You could have a poorly
written UDF.
2. Do you have any recursion going on? This is where trigger 1 on
table A will update table 2 and fire trigger B. Trigger B will then
update table A and cause the whole sequence to run again. It will run
until it pops the stack on the server. To test this, disable all the
triggers on table 1 (where you are inserting) and see if your problem
goes away.
Tom
Jesus Angel Garcia Zarco writes:
Quote
I'm having a problem with IBServer 7.5.1.16x

The server shutdown when i insert in a table and in the log i get the error

MAAT (Server) Fri Jul 28 15:49:23 2006
insert into pet_pcr ( IDPETPCR, IDPRUPCR, IDLABORATORIO, FECHA, COMENTARIO,
IDESTADO ) values ( ?, ?, ?, ?, ?, ? )


Access violation.
The code attempted to access a virtual
address without privilege to do so.
This exception will cause the InterBase server
to terminate abnormally.

MAAT (Client) Fri Jul 28 15:49:23 2006
F:\InterBase\bin\ibserver.exe: terminated abnormally (-1)

How can a simple insert make the server shutdown, of course i have triggers
in tables, but make the server shutdown is what i can belive.

It only happens when i insert some values in the fields.

Regards


 

Re:Interbase server shutdown

Curious, for the record
in this table in the trigger after insert, there was a while loop that tries
to insert some records in another table in
for select IDPETICION, NPRUEBA
from Pet_PCR_Peticion_Pendiente
where IDPRUPCR = new.IDPRUPCR
order by IDPRUPCR, IDPETICION
into :IDPeticion, :NPrueba do begin
if( NPeticion < MaxPeticion )then begin
NReplicado = 1;
while( NReplicado <= 5 )do begin
insert into Pet_PCR_Peticion( IDPETPCR, IDPETICION, NPRUEBA )
values( new.IDPETPCR, :IDpeticion, :NPrueba );
NReplicado = NReplicado + 1;
end
NPeticion = NPeticion + 1;
end
end
well a record can be inserted in a table (Pet_PCR_Peticion) more than once,
if in this insert of the same record several times, a condition is meet,
then the insert in the table (Pet_PCR_Peticion) throws an exception, but in
this case, in the next loop tries to insert again the same record, and
another exception is thrown, and in this case interbase stops.
if i delete the while loop the my application get the exception and the
database is not shutdown.
for select IDPETICION, NPRUEBA
from Pet_PCR_Peticion_Pendiente
where IDPRUPCR = new.IDPRUPCR
order by IDPRUPCR, IDPETICION
into :IDPeticion, :NPrueba do begin
if( NPeticion < MaxPeticion )then begin
NReplicado = 1;
insert into Pet_PCR_Peticion( IDPETPCR, IDPETICION, NPRUEBA )
values( new.IDPETPCR, :IDpeticion, :NPrueba );
NReplicado = NReplicado + 1;
end
end
I hope you understand me.
Regards
"Jesus Angel Garcia Zarco" <XXXX@XXXXX.COM>escribi?en
el mensaje news:XXXX@XXXXX.COM...
Quote
I'm having a problem with IBServer 7.5.1.16x

The server shutdown when i insert in a table and in the log i get the
error

MAAT (Server) Fri Jul 28 15:49:23 2006
insert into pet_pcr ( IDPETPCR, IDPRUPCR, IDLABORATORIO, FECHA,
COMENTARIO, IDESTADO ) values ( ?, ?, ?, ?, ?, ? )


Access violation.
The code attempted to access a virtual
address without privilege to do so.
This exception will cause the InterBase server
to terminate abnormally.

MAAT (Client) Fri Jul 28 15:49:23 2006
F:\InterBase\bin\ibserver.exe: terminated abnormally (-1)

How can a simple insert make the server shutdown, of course i have
triggers in tables, but make the server shutdown is what i can belive.

It only happens when i insert some values in the fields.

Regards

 

Re:Interbase server shutdown

Jesus,
After quickly reading this, it sounds like you found the circumstances
that create the problem. Congratulations! Perhaps there is another way
to write this procedure using a Temp table or some other approach.
Maybe you can add a custom EXCEPTION and a WHENEVER (?) statement to
stop execution if a condition is met. Whatever the solution is, it
really sounds like you can program to avoid this problem if you are
diligent.
FWIW, I do not think that this should make the InterBase server crash.
It might be worth adding this as a defect and a test case into QC.
Jesus Angel Garcia Zarco writes:
Quote
Curious, for the record

in this table in the trigger after insert, there was a while loop that tries
to insert some records in another table in

for select IDPETICION, NPRUEBA
from Pet_PCR_Peticion_Pendiente
where IDPRUPCR = new.IDPRUPCR
order by IDPRUPCR, IDPETICION
into :IDPeticion, :NPrueba do begin
if( NPeticion < MaxPeticion )then begin
NReplicado = 1;
while( NReplicado <= 5 )do begin
insert into Pet_PCR_Peticion( IDPETPCR, IDPETICION, NPRUEBA )
values( new.IDPETPCR, :IDpeticion, :NPrueba );
NReplicado = NReplicado + 1;
end
NPeticion = NPeticion + 1;
end
end


well a record can be inserted in a table (Pet_PCR_Peticion) more than once,
if in this insert of the same record several times, a condition is meet,
then the insert in the table (Pet_PCR_Peticion) throws an exception, but in
this case, in the next loop tries to insert again the same record, and
another exception is thrown, and in this case interbase stops.

if i delete the while loop the my application get the exception and the
database is not shutdown.

for select IDPETICION, NPRUEBA
from Pet_PCR_Peticion_Pendiente
where IDPRUPCR = new.IDPRUPCR
order by IDPRUPCR, IDPETICION
into :IDPeticion, :NPrueba do begin
if( NPeticion < MaxPeticion )then begin
NReplicado = 1;
insert into Pet_PCR_Peticion( IDPETPCR, IDPETICION, NPRUEBA )
values( new.IDPETPCR, :IDpeticion, :NPrueba );
NReplicado = NReplicado + 1;
end
end

I hope you understand me.

Regards

"Jesus Angel Garcia Zarco" <XXXX@XXXXX.COM>escribi?en
el mensaje news:XXXX@XXXXX.COM...
>I'm having a problem with IBServer 7.5.1.16x
>
>The server shutdown when i insert in a table and in the log i get the
>error
>
>MAAT (Server) Fri Jul 28 15:49:23 2006
>insert into pet_pcr ( IDPETPCR, IDPRUPCR, IDLABORATORIO, FECHA,
>COMENTARIO, IDESTADO ) values ( ?, ?, ?, ?, ?, ? )
>
>
>Access violation.
>The code attempted to access a virtual
>address without privilege to do so.
>This exception will cause the InterBase server
>to terminate abnormally.
>
>MAAT (Client) Fri Jul 28 15:49:23 2006
>F:\InterBase\bin\ibserver.exe: terminated abnormally (-1)
>
>How can a simple insert make the server shutdown, of course i have
>triggers in tables, but make the server shutdown is what i can belive.
>
>It only happens when i insert some values in the fields.
>
>Regards
>


 

Re:Interbase server shutdown

I have solved the problem, doing a test before insert in the table and not
selecting records that may cause the exception, but as you say, it doesn't
have to make Interbase crash.
Thanks
"Tom Wilk" <XXXX@XXXXX.COM>escribi?en el mensaje
Quote
Jesus,

After quickly reading this, it sounds like you found the circumstances
that create the problem. Congratulations! Perhaps there is another way
to write this procedure using a Temp table or some other approach. Maybe
you can add a custom EXCEPTION and a WHENEVER (?) statement to stop
execution if a condition is met. Whatever the solution is, it really
sounds like you can program to avoid this problem if you are diligent.

FWIW, I do not think that this should make the InterBase server crash. It
might be worth adding this as a defect and a test case into QC.

Jesus Angel Garcia Zarco writes:
>Curious, for the record
>
>in this table in the trigger after insert, there was a while loop that
>tries to insert some records in another table in
>
>for select IDPETICION, NPRUEBA
>from Pet_PCR_Peticion_Pendiente
>where IDPRUPCR = new.IDPRUPCR
>order by IDPRUPCR, IDPETICION
>into :IDPeticion, :NPrueba do begin
>if( NPeticion < MaxPeticion )then begin
>NReplicado = 1;
>while( NReplicado <= 5 )do begin
>insert into Pet_PCR_Peticion( IDPETPCR, IDPETICION, NPRUEBA )
>values( new.IDPETPCR, :IDpeticion, :NPrueba );
>NReplicado = NReplicado + 1;
>end
>NPeticion = NPeticion + 1;
>end
>end
>
>
>well a record can be inserted in a table (Pet_PCR_Peticion) more than
>once, if in this insert of the same record several times, a condition is
>meet, then the insert in the table (Pet_PCR_Peticion) throws an
>exception, but in this case, in the next loop tries to insert again the
>same record, and another exception is thrown, and in this case interbase
>stops.
>
>if i delete the while loop the my application get the exception and the
>database is not shutdown.
>
>for select IDPETICION, NPRUEBA
>from Pet_PCR_Peticion_Pendiente
>where IDPRUPCR = new.IDPRUPCR
>order by IDPRUPCR, IDPETICION
>into :IDPeticion, :NPrueba do begin
>if( NPeticion < MaxPeticion )then begin
>NReplicado = 1;
>insert into Pet_PCR_Peticion( IDPETPCR, IDPETICION, NPRUEBA )
>values( new.IDPETPCR, :IDpeticion, :NPrueba );
>NReplicado = NReplicado + 1;
>end
>end
>
>I hope you understand me.
>
>Regards
>
>"Jesus Angel Garcia Zarco" <XXXX@XXXXX.COM>escribi?
>en el mensaje news:XXXX@XXXXX.COM...
>>I'm having a problem with IBServer 7.5.1.16x
>>
>>The server shutdown when i insert in a table and in the log i get the
>>error
>>
>>MAAT (Server) Fri Jul 28 15:49:23 2006
>>insert into pet_pcr ( IDPETPCR, IDPRUPCR, IDLABORATORIO, FECHA,
>>COMENTARIO, IDESTADO ) values ( ?, ?, ?, ?, ?, ? )
>>
>>
>>Access violation.
>>The code attempted to access a virtual
>>address without privilege to do so.
>>This exception will cause the InterBase server
>>to terminate abnormally.
>>
>>MAAT (Client) Fri Jul 28 15:49:23 2006
>>F:\InterBase\bin\ibserver.exe: terminated abnormally (-1)
>>
>>How can a simple insert make the server shutdown, of course i have
>>triggers in tables, but make the server shutdown is what i can belive.
>>
>>It only happens when i insert some values in the fields.
>>
>>Regards
>>
>
 

Re:Interbase server shutdown

As Tom said, if you can create a test case please enter this in QC so
it can be fixed.
--
Bill Todd (TeamB)
 

Re:Interbase server shutdown

I have a BCB6 client app, using IBX6.08.
The client PC has "gds32" version 8 installed.
I can connect to the remote IB7.1 Server ok, and run the client app
perfectly ok.
When I close the client app [and Database connection] - it causes the remote
server to shutdown!
( in fact, if I have IBConsole open on the Server, it throws an immediate
error
"Interbase Server has encountered a problem and needs to close....." ).
When I run the Client app locally on the Server - all is fine.
This makes me think there is a incompatibility problem using gds32 v8 on the
client, and gds32 v7 on the server?
Can anyone help on this matter, or what causes the server to shutdown.
Thanks
 

Re:Interbase server shutdown

Get InterBase 2007 SP2. That should fix your problem.
Jim Norris writes:
Quote
I have a BCB6 client app, using IBX6.08.
The client PC has "gds32" version 8 installed.

I can connect to the remote IB7.1 Server ok, and run the client app
perfectly ok.
When I close the client app [and Database connection] - it causes the remote
server to shutdown!

( in fact, if I have IBConsole open on the Server, it throws an immediate
error
"Interbase Server has encountered a problem and needs to close....." ).

When I run the Client app locally on the Server - all is fine.

This makes me think there is a incompatibility problem using gds32 v8 on the
client, and gds32 v7 on the server?

Can anyone help on this matter, or what causes the server to shutdown.
Thanks


 

Re:Interbase server shutdown

Thanks for the info..
So I need to upgrade to IB207 SP2 on the Client?
No upgrade required on the IB7.1 Server?
"Quinn Wildman (CodeGear Developer Support)" <XXXX@XXXXX.COM>
writes news:482c5190$XXXX@XXXXX.COM...
Quote
Get InterBase 2007 SP2. That should fix your problem.

Jim Norris writes:
>I have a BCB6 client app, using IBX6.08.
>The client PC has "gds32" version 8 installed.
>
>I can connect to the remote IB7.1 Server ok, and run the client app
>perfectly ok.
>When I close the client app [and Database connection] - it causes the
>remote server to shutdown!
>
>( in fact, if I have IBConsole open on the Server, it throws an immediate
>error
>"Interbase Server has encountered a problem and needs to close....." ).
>
>When I run the Client app locally on the Server - all is fine.
>
>This makes me think there is a incompatibility problem using gds32 v8 on
>the client, and gds32 v7 on the server?
>
>Can anyone help on this matter, or what causes the server to shutdown.
>Thanks
>
>

 

Re:Interbase server shutdown

Correct.
Jim Norris writes:
Quote
Thanks for the info..

So I need to upgrade to IB207 SP2 on the Client?
No upgrade required on the IB7.1 Server?
 

Re:Interbase server shutdown

Thanks - that worked.
"Quinn Wildman (CodeGear Developer Support)" <XXXX@XXXXX.COM>
writes news:482cbb02$XXXX@XXXXX.COM...
Quote
Correct.

Jim Norris writes:
>Thanks for the info..
>
>So I need to upgrade to IB207 SP2 on the Client?
>No upgrade required on the IB7.1 Server?