Skip to content

Several firebird servers crash during a daily maintenance / set statistics index [CORE6433] #6670

@firebird-automations

Description

@firebird-automations

Submitted by: Alexander Muylaert (alexander_gonline.be)

Hi

I'm still investigating, but we're having some issues with our daily cleanup procedure since 3.0.7.

This method causes the server to crash completely.

SET TERM ^ ;

CREATE OR ALTER procedure SYS_RESET_INDEX_STATS (
IN_RELATION_NAME type of column RDB$INDICES.RDB$RELATION_NAME = null)
as
declare variable STMT varchar(1024);
declare variable IDX varchar(100);
begin
begin
for select 'set statistics index "' || trim(trailing from I.RDB$INDEX_NAME) || '"',
trim(trailing from I.RDB$INDEX_NAME)
from RDB$INDICES I
where I.RDB$INDEX_NAME not containing 'rdb$' and
(I.RDB$RELATION_NAME = coalesce(:IN_RELATION_NAME, I.RDB$RELATION_NAME))
into STMT,
IDX
do
begin
begin
execute statement STMT
with autonomous transaction
as user 'SYSDBA' password 'masterkey';
end
when any do
begin
DLLLOG('Set statistics "' || IDX || '" failed SQLSTATE=' || sqlstate);
end
end
end
end^

SET TERM ; ^

FAST-SERVER Fri Oct 30 09:05:42 2020
Access violation.
The code attempted to access a virtual
address without privilege to do so.
This exception will cause the Firebird server
to terminate abnormally.

Client file logs

09:05:42.915 5 ****************************** exception ******************************
09:05:42.915 5 CancelEvents
09:05:42.915 5 FbException
09:05:42.915 5 Unable to complete network request to host "
No message for error code 335544721 found.
09:05:42.915 5 IOException
09:05:42.915 5 Kan geen gegevens schrijven naar de transportverbinding: De externe host heeft een verbinding verbroken.
09:05:42.915 5 SocketException
09:05:42.915 5 De externe host heeft een verbinding verbroken
09:05:42.915 5 ErrorCode = 10054 SocketErrorCode = ConnectionReset NativeErrorCode = 10054
09:05:42.915 5 bij FirebirdSql.Data.FirebirdClient.FbRemoteEvent.CancelEvents()

Commits: c1179d7 2e092bf

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions