Subject | Firebird crashes |
---|---|
Author | Lele Gaifax |
Post date | 2003-10-30T10:37:17Z |
Hi all,
we are experiencing a very strange situation where the firebird server
crashes with an ISC ERROR CODE of 335544741. We have tried almost
everything, and with every FB recent release (ie, 1.0.3 thru 1.5RC4),
but without luck. We are still wondering if it's a FB related bug or
if it's raised by a client app with a bad behaviour.
The context: the client app is very complicated, but we were able to
isolate the query that apparently trash the server:
SELECT IDOperazione, IDOperazioneCiclo, IDTipologia, IDFamiglia
FROM AM$Operazioni o
LEFT JOIN AM$CicloVariante(:IDVARMOD, o.idoperazione, null) on 1=1
WHERE o.zona=:CODZONA and o.operazione=:CODOPZ
AM$CicloVariante is a selectable SP, that basically expand a tree of
linked objects into a tabular data set.
The client app loops over that result, with this kind of code:
with fqc.get(qry_jsDatiOpzCiclo) do
begin
//Close;
paramByname('CODZONA').asInteger := StrToInt(Zona);
paramByname('CODOPZ').asInteger := StrToInt(Opz);
paramByname('IDVARMOD').asInteger := IdVarianteModello;
ServicePublic.fhis.putlevel(5,format('jsDatiOpzCiclo param: %s %s %d',[Zona,Opz,IdVarianteModello]) );
Open;
ServicePublic.fhis.putlevel(5,'jsDatiOpzCiclo open' );
cnt:=0;
idOpzComeModello:=0;
idOpzComeSugg:=0;
idOpzT0:=0;
unicaOpz:=0;
ServicePublic.fhis.putlevel(5,'first' );
while (not EOF) do
begin
ServicePublic.fhis.putlevel(5,'not eof' );
tmpOpz:=FieldByName('IdOperazioneCiclo').asInteger;
idtp:=FieldByName('idTipologia').asInteger;
dummyFamiglia:=FieldByName('idFamiglia').asInteger;
if (tmpOpz>0) then
begin
inc(cnt);
if idtp = CodTip then
begin
idOpzComeModello:=tmpOpz;
end;
if (idtp = CodTipSugg) and (IsTipSugg) then
begin
idOpzComeSugg:=tmpOpz;
end;
unicaOpz:=tmpOpz;
end
else //essendo Anagraficata se è una improduttiva
if (StrToIntDef(Opz,0)<0) then
begin
//se la tipologia opz è 0 allora
if idtp=0 then
begin
idOpzT0:=FieldByName('IdOperazione').asInteger;
end;
end;
next;
ServicePublic.fhis.putlevel(5,'next' );
end;
Close;
end;
At some point, where the SP returns just three records, we get
29/10/2003 17.22.19 - jsDatiOpzCiclo param: 105 10 828
29/10/2003 17.22.19 - jsDatiOpzCiclo open
29/10/2003 17.22.19 - first
29/10/2003 17.22.19 - not eof
... [working on data]
29/10/2003 17.22.19 - next
29/10/2003 17.22.19 - not eof
29/10/2003 17.22.19 - jsDatiOpzCiclo ISC ERROR CODE:335544741 ISC
ERROR MESSAGE: connection lost to database
So it seems that the problem is raised after a next and before the eof
condition...
I tried very hard, digging here and there, to find out the reason, but
as said without any luck. The very same SP AM$CicloVariante is used a
lot in other part of the infrastructure, without problems.
Any hint will be *very* appreciated! :)
thanks&bye,
lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
email: lele@... | -- Fortunato Depero, 1929.
we are experiencing a very strange situation where the firebird server
crashes with an ISC ERROR CODE of 335544741. We have tried almost
everything, and with every FB recent release (ie, 1.0.3 thru 1.5RC4),
but without luck. We are still wondering if it's a FB related bug or
if it's raised by a client app with a bad behaviour.
The context: the client app is very complicated, but we were able to
isolate the query that apparently trash the server:
SELECT IDOperazione, IDOperazioneCiclo, IDTipologia, IDFamiglia
FROM AM$Operazioni o
LEFT JOIN AM$CicloVariante(:IDVARMOD, o.idoperazione, null) on 1=1
WHERE o.zona=:CODZONA and o.operazione=:CODOPZ
AM$CicloVariante is a selectable SP, that basically expand a tree of
linked objects into a tabular data set.
The client app loops over that result, with this kind of code:
with fqc.get(qry_jsDatiOpzCiclo) do
begin
//Close;
paramByname('CODZONA').asInteger := StrToInt(Zona);
paramByname('CODOPZ').asInteger := StrToInt(Opz);
paramByname('IDVARMOD').asInteger := IdVarianteModello;
ServicePublic.fhis.putlevel(5,format('jsDatiOpzCiclo param: %s %s %d',[Zona,Opz,IdVarianteModello]) );
Open;
ServicePublic.fhis.putlevel(5,'jsDatiOpzCiclo open' );
cnt:=0;
idOpzComeModello:=0;
idOpzComeSugg:=0;
idOpzT0:=0;
unicaOpz:=0;
ServicePublic.fhis.putlevel(5,'first' );
while (not EOF) do
begin
ServicePublic.fhis.putlevel(5,'not eof' );
tmpOpz:=FieldByName('IdOperazioneCiclo').asInteger;
idtp:=FieldByName('idTipologia').asInteger;
dummyFamiglia:=FieldByName('idFamiglia').asInteger;
if (tmpOpz>0) then
begin
inc(cnt);
if idtp = CodTip then
begin
idOpzComeModello:=tmpOpz;
end;
if (idtp = CodTipSugg) and (IsTipSugg) then
begin
idOpzComeSugg:=tmpOpz;
end;
unicaOpz:=tmpOpz;
end
else //essendo Anagraficata se è una improduttiva
if (StrToIntDef(Opz,0)<0) then
begin
//se la tipologia opz è 0 allora
if idtp=0 then
begin
idOpzT0:=FieldByName('IdOperazione').asInteger;
end;
end;
next;
ServicePublic.fhis.putlevel(5,'next' );
end;
Close;
end;
At some point, where the SP returns just three records, we get
29/10/2003 17.22.19 - jsDatiOpzCiclo param: 105 10 828
29/10/2003 17.22.19 - jsDatiOpzCiclo open
29/10/2003 17.22.19 - first
29/10/2003 17.22.19 - not eof
... [working on data]
29/10/2003 17.22.19 - next
29/10/2003 17.22.19 - not eof
29/10/2003 17.22.19 - jsDatiOpzCiclo ISC ERROR CODE:335544741 ISC
ERROR MESSAGE: connection lost to database
So it seems that the problem is raised after a next and before the eof
condition...
I tried very hard, digging here and there, to find out the reason, but
as said without any luck. The very same SP AM$CicloVariante is used a
lot in other part of the infrastructure, without problems.
Any hint will be *very* appreciated! :)
thanks&bye,
lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
email: lele@... | -- Fortunato Depero, 1929.