Subject Firebird server 1.03 Hangs on client disconnect
Author Jason Berry
Hi

I have a repeatable problem with a database, the scenario is as follows:

-The database table contains about 1500000 records
-A delete statement is run deleting for example 15000 records. (takes a few
seconds)
-The statement is committed without a noticeable problem
-Other select statements are possible.
-The Client program attempts to disconnect from the database.
-The Client program hangs.
-New Client connections to the database hang.
-The firebird log reports errors INet/inet_error:read errno = 10054 only
after the client hung programs are terminated using task manager.

I have observed this using different client programs IBEXPERT, IBCONSOLE,
IBSQL, ect
The firebird server is running on Windows 2000 Professional.
The database has been backed up and restored before the test is run.
The Firebird Server is not using any noticeable CPU after the first
disconnect attempt.
The Firebird Server cannot be stopped afterwards using the service manager.
Its status says stopping.

The same test run against Firebird 1.5 RC3 works fine.

An example of the delete statement is as follows:
delete from accesslog where accesslog.timeref < '20 jan 2004'

The DDL
****************************************************************************
**
ACCESS_KEY NUMERIC(18,0) LOG_KEY
NOT NULL

CREATE GENERATOR ACCESSLOG_GEN;

CREATE TABLE ACCESSLOG (
ACCESS_KEY LOG_KEY,
TIMEREF TIMEREFERENCE,
OUTSTATION ID6,
OUTSTATIONNAME TEXT32,
"EVENT" VARCHAR(16),
CARD VARCHAR(8),
CARDTYPE CARD_TYPE,
SURNAME VARCHAR(40),
FORENAME VARCHAR(20),
LOCATION SMALLINT,
LOCATIONNAME TEXT32,
OPERATOR OPERATORID,
REASON TEXT32,
DATE1 DATE,
TEXT1 TEXT32,
TEXT2 TEXT32,
TEXT3 TEXT32,
TEXT4 TEXT32,
TEXT5 TEXT32,
TEXT6 TEXT32,
SITENUM SITENUMBER,
REPLICATED BOOL
);
ALTER TABLE ACCESSLOG ADD PRIMARY KEY (ACCESS_KEY);

ALTER TABLE ACCESSLOG ADD FOREIGN KEY (SITENUM) REFERENCES SITE (SITENUM) ON
DELETE SET DEFAULT ON UPDATE CASCADE;

CREATE INDEX IDX_ACCESS_FULLNAME ON ACCESSLOG (SURNAME, FORENAME);
CREATE INDEX IDX_ACCESS_TIMEREF ON ACCESSLOG (TIMEREF);

/* Trigger: ACCESS_KEY */
CREATE TRIGGER ACCESS_KEY FOR ACCESSLOG
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
NEW.ACCESS_KEY = GEN_ID(ACCESSLOG_GEN, 1);
END
^
****************************************************************************
**

This database is used in the following manner:
-An event happens an insert statement is executed and then commited.

-Users are provided with report screens which run select statements to
return a dataset, as soon screen is closed the select is committed.

-Each day a delete statement is run deleting any record older than e.g 90
days.

The difference between the OIT and OAT is never very high,

My questions are:

1) What could cause the server lockup described earlier?

2)Will a sweep ever run. I suspect not?

3) Without a sweep running will the deleted records space be reused by new
inserts?

4) If the deleted record space is used what would a manual sweep do for the
database?

5) When will 1.5 be realised fully.


Regards
Jason Berry



This message has been sent from Initial Electronic Security Systems Ltd.

Initial Electronic Security Systems
Shadsworth Road
Blackburn
BB1 2PR
United Kingdom
Tel +44(0) 1254 688688

This e-mail message and any attachments are confidential
and are intended for the use of the addressee only. If you
are not the addressee you should not copy or use them for
any purpose, nor disclose their contents to anyone else.
If you believe you have received this e-mail by mistake please
notify us immediately by telephoning +44 (0) 1254 688688.
_____________________________________________________________________
This message has been checked for all known viruses by the MessageLabs Virus Scanning Service.