Subject Repeated database corruption
Author Gustavo
Hello:

I have an application installed in a network with the following technical data:

Delphi 5 with IBX
FireBird 2.1.2.18118 SS
Server: Windows 2003 Server
Clients: Windows XP SP3

There is a database that is corrupting very frequently. The problems began many monthes ago. I don´t remember any relevant change in the network by that time.

The things are like the following.

Sometimes every user is working fine and suddenly no one can access the database. Other times, the problem appears when one user is making the backup (using gbak).

Then I make a copy of the database, check it with gfix -v -full and I get an error (not always the same).

I do gbak -v -ignore -garbage -limbo and get an error and see what table was trying gbak to access when the error occured.

I do gfix -mend -full (I get the same error as in previous step)

I make a backup doing gbak -v -ignore -garbage -limbo

I restore doing gbak -c -rep

I check that no data was lost and copy the repaired database so they can use it again.

This works until the next time it fails which may be one week later or only 3 hours later.

Today I had problems one time in the morning and another time at night. And in the morning, something strange occured. I made a copy of the database, check it with gbak -v -full and I got no error. I made another copy (no one could access it at this moment), check it with gbak -v -full and I got an error.

I saw firebird.log and I see the errors and I also see there are a lot of "INET/inet_error: read errno = 10054".

At the end of this message I will copy firebird.log since yesterday at 15:26. Before this time I repaired the database.

Does anyone have any idea of what may be causing this?

Thanks in advance

Gustavo

------------------------------------
firebird.log 19/10/2009 & 20/10/2009
------------------------------------


SERVIDOR (Server) Mon Oct 19 15:26:39 2009
Database: MMGESCOMEMPRESA
internal gds software consistency check (wrong record length (183), file: vio.cpp line: 1121)


SERVIDOR (Server) Mon Oct 19 15:26:39 2009
Database: MMGESCOMEMPRESA
internal gds software consistency check (wrong record length (183), file: vio.cpp line: 1121)


SERVIDOR (Server) Mon Oct 19 15:26:39 2009
Database: MMGESCOMEMPRESA
internal gds software consistency check (wrong record length (183), file: vio.cpp line: 1121)


SERVIDOR (Server) Mon Oct 19 15:26:39 2009
Database: MMGESCOMEMPRESA
internal gds software consistency check (wrong record length (183), file: vio.cpp line: 1121)


SERVIDOR (Server) Mon Oct 19 15:31:04 2009
Shutting down the Firebird service with 28 active connection(s) to 5 database(s)


SERVIDOR (Server) Mon Oct 19 15:31:04 2009
The database C:\ARCHIVOS DE PROGRAMA\MM-FB\CONTABILIDAD\EMPRESA\2005\2005.FDB was being accessed when the server was shutdown


SERVIDOR (Server) Mon Oct 19 15:31:04 2009
The database C:\ARCHIVOS DE PROGRAMA\MM-FB\GESTIÓN COMERCIAL\EMPRESA HUGO\EMPRESA HUGO.FDB was being accessed when the server was shutdown


SERVIDOR (Server) Mon Oct 19 15:31:04 2009
The database C:\ARCHIVOS DE PROGRAMA\MM-FB\CONTABILIDAD\EMPRESA\2009\2009.FDB was being accessed when the server was shutdown


SERVIDOR (Server) Mon Oct 19 15:31:04 2009
The database C:\ARCHIVOS DE PROGRAMA\MM-FB\GESTIÓN COMERCIAL\TEMP\TEMPORARIO.FDB was being accessed when the server was shutdown


SERVIDOR (Server) Mon Oct 19 15:31:04 2009
The database C:\ARCHIVOS DE PROGRAMA\MM-FB\GESTIÓN COMERCIAL\GENERAL\GENERAL.FDB was being accessed when the server was shutdown


SERVIDOR (Server) Mon Oct 19 15:39:12 2009
Database: C:\MM\EMPRESA.FDB
Record 1120673 is wrong length in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 15:39:12 2009
Database: C:\MM\EMPRESA.FDB
Record 1120677 is wrong length in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 15:39:12 2009
Database: C:\MM\EMPRESA.FDB
Data page 76978 (sequence 4689), line 7 is bad in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 15:39:12 2009
Database: C:\MM\EMPRESA.FDB
Record 1151741 is wrong length in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 15:39:12 2009
Database: C:\MM\EMPRESA.FDB
Record 1151745 is wrong length in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 15:39:12 2009
Database: C:\MM\EMPRESA.FDB
Data page 77109 (sequence 4819), line 5 is bad in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 15:39:12 2009
Database: C:\MM\EMPRESA.FDB
Record 1166798 is wrong length in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 15:39:12 2009
Database: C:\MM\EMPRESA.FDB
Data page 77172 (sequence 4882), line 1 is bad in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 15:39:12 2009
Database: C:\MM\EMPRESA.FDB
Data page 77555 (sequence 5265), line 0 is bad in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 15:39:12 2009
Database: C:\MM\EMPRESA.FDB
Relation has -2 orphan backversions (2 in use) in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 15:39:14 2009
Database: C:\MM\EMPRESA.FDB
I/O error for file "C:\MM\EMPRESA.FDB"
Error while trying to read from file
Se ha alcanzado el final del archivo.
internal gds software consistency check (page in use during flush (210), file: cch.cpp line: 2965)


SERVIDOR (Server) Mon Oct 19 15:39:14 2009
Database: C:\MM\EMPRESA.FDB
I/O error for file "C:\MM\EMPRESA.FDB"
Error while trying to read from file
Se ha alcanzado el final del archivo.
internal gds software consistency check (page in use during flush (210), file: cch.cpp line: 2965)


SERVIDOR (Server) Mon Oct 19 15:43:31 2009
Database: C:\MM\EMPRESA.FDB
Record 1120673 is wrong length in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 15:43:31 2009
Database: C:\MM\EMPRESA.FDB
Record 1120677 is wrong length in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 15:43:31 2009
Database: C:\MM\EMPRESA.FDB
Data page 76978 (sequence 4689), line 7 is bad in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 15:43:31 2009
Database: C:\MM\EMPRESA.FDB
Record 1151741 is wrong length in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 15:43:31 2009
Database: C:\MM\EMPRESA.FDB
Record 1151745 is wrong length in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 15:43:31 2009
Database: C:\MM\EMPRESA.FDB
Data page 77109 (sequence 4819), line 5 is bad in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 15:43:31 2009
Database: C:\MM\EMPRESA.FDB
Record 1166798 is wrong length in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 15:43:31 2009
Database: C:\MM\EMPRESA.FDB
Data page 77172 (sequence 4882), line 1 is bad in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 15:43:31 2009
Database: C:\MM\EMPRESA.FDB
Data page 77555 (sequence 5265), line 0 is bad in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 15:43:31 2009
Database: C:\MM\EMPRESA.FDB
Relation has -2 orphan backversions (2 in use) in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 15:43:33 2009
Database: C:\MM\EMPRESA.FDB
I/O error for file "C:\MM\EMPRESA.FDB"
Error while trying to read from file
Se ha alcanzado el final del archivo.
internal gds software consistency check (page in use during flush (210), file: cch.cpp line: 2965)


SERVIDOR (Server) Mon Oct 19 15:43:33 2009
Database: C:\MM\EMPRESA.FDB
I/O error for file "C:\MM\EMPRESA.FDB"
Error while trying to read from file
Se ha alcanzado el final del archivo.
internal gds software consistency check (page in use during flush (210), file: cch.cpp line: 2965)


SERVIDOR (Server) Mon Oct 19 17:20:40 2009
Database: C:\MM\EMPRESA.FDB
Record 1120673 is wrong length in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 17:20:40 2009
Database: C:\MM\EMPRESA.FDB
Record 1120677 is wrong length in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 17:20:40 2009
Database: C:\MM\EMPRESA.FDB
Data page 76978 (sequence 4689), line 7 is bad in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 17:20:40 2009
Database: C:\MM\EMPRESA.FDB
Record 1151741 is wrong length in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 17:20:40 2009
Database: C:\MM\EMPRESA.FDB
Record 1151745 is wrong length in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 17:20:40 2009
Database: C:\MM\EMPRESA.FDB
Data page 77109 (sequence 4819), line 5 is bad in table CCOMLIN (250)


SERVIDOR (Server) Mon Oct 19 17:20:40 2009
Database: C:\MM\EMPRESA.FDB
I/O error for file "C:\MM\EMPRESA.FDB"
Error while trying to read from file
Se ha alcanzado el final del archivo.
internal gds software consistency check (cannot find tip page (165), file: tra.cpp line: 2494)


SERVIDOR (Server) Mon Oct 19 17:20:40 2009
bugcheck during scan of table 250 (CCOMLIN)


SERVIDOR (Server) Mon Oct 19 17:20:40 2009
Database: C:\MM\EMPRESA.FDB
I/O error for file "C:\MM\EMPRESA.FDB"
Error while trying to read from file
Se ha alcanzado el final del archivo.
internal gds software consistency check (cannot find tip page (165), file: tra.cpp line: 2494)


SERVIDOR (Server) Tue Oct 20 08:29:11 2009
Database: MMGESCOMEMPRESA
internal gds software consistency check (wrong record length (183), file: vio.cpp line: 1121)


SERVIDOR (Server) Tue Oct 20 08:29:46 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 08:29:46 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 08:29:46 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 08:29:46 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 08:29:57 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 08:29:57 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 08:29:57 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 08:29:57 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 08:30:05 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 08:30:05 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 08:30:05 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 08:30:05 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 09:07:06 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 09:07:06 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 09:07:06 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 09:07:06 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 09:07:27 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 09:07:27 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 09:07:27 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 09:08:32 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 09:08:32 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 09:08:32 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 10:03:47 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 10:06:15 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 12:54:55 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 12:54:55 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 12:54:55 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 12:54:55 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 13:25:04 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 13:25:04 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 13:25:04 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 13:25:04 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 13:33:33 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 13:33:33 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 13:33:33 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 13:33:33 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 13:43:06 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 13:43:06 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 13:43:06 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 13:43:06 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 15:34:19 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 15:34:19 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 15:34:19 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 15:34:19 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 16:43:15 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 16:43:15 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 16:43:15 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 16:43:15 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 17:49:52 2009
INET/inet_error: read errno = 10054


SERVIDOR (Server) Tue Oct 20 23:20:19 2009
Database: C:\MM\EMPRESA.FDB
Data page 39509 (sequence 3480), line 0 is bad in table PMOVCC (267)


SERVIDOR (Server) Tue Oct 20 23:20:20 2009
Database: C:\MM\EMPRESA.FDB
internal gds software consistency check (page in use during flush (210), file: cch.cpp line: 2965)


SERVIDOR (Server) Tue Oct 20 23:20:20 2009
Database: C:\MM\EMPRESA.FDB
internal gds software consistency check (page in use during flush (210), file: cch.cpp line: 2965)


SERVIDOR (Server) Tue Oct 20 23:20:35 2009
Database: C:\MM\EMPRESA.FDB
Record 2885 is wrong length in table VPRECPAG (182)


SERVIDOR (Server) Tue Oct 20 23:20:35 2009
Database: C:\MM\EMPRESA.FDB
Chain for record 2885 is broken in table VPRECPAG (182)


SERVIDOR (Server) Tue Oct 20 23:20:35 2009
Database: C:\MM\EMPRESA.FDB
Relation has -1 orphan backversions (1 in use) in table VPRECPAG (182)


SERVIDOR (Server) Tue Oct 20 23:20:37 2009
Database: C:\MM\EMPRESA.FDB
Data page 39509 (sequence 3480), line 0 is bad in table PMOVCC (267)


SERVIDOR (Server) Tue Oct 20 23:20:38 2009
Database: C:\MM\EMPRESA.FDB
I/O error for file "C:\MM\EMPRESA.FDB"
Error while trying to read from file
Se ha alcanzado el final del archivo.
internal gds software consistency check (page in use during flush (210), file: cch.cpp line: 2965)


SERVIDOR (Server) Tue Oct 20 23:20:38 2009
Database: C:\MM\EMPRESA.FDB
I/O error for file "C:\MM\EMPRESA.FDB"
Error while trying to read from file
Se ha alcanzado el final del archivo.
internal gds software consistency check (page in use during flush (210), file: cch.cpp line: 2965)


SERVIDOR (Server) Tue Oct 20 23:20:51 2009
Database: C:\MM\EMPRESA.FDB
Record 2885 is wrong length in table VPRECPAG (182)


SERVIDOR (Server) Tue Oct 20 23:20:51 2009
Database: C:\MM\EMPRESA.FDB
Chain for record 2885 is broken in table VPRECPAG (182)


SERVIDOR (Server) Tue Oct 20 23:20:51 2009
Database: C:\MM\EMPRESA.FDB
Relation has -1 orphan backversions (1 in use) in table VPRECPAG (182)


SERVIDOR (Server) Tue Oct 20 23:20:52 2009
Database: C:\MM\EMPRESA.FDB
Data page 39509 (sequence 3480), line 0 is bad in table PMOVCC (267)


SERVIDOR (Server) Tue Oct 20 23:20:53 2009
Database: C:\MM\EMPRESA.FDB
I/O error for file "C:\MM\EMPRESA.FDB"
Error while trying to read from file
Se ha alcanzado el final del archivo.
internal gds software consistency check (page in use during flush (210), file: cch.cpp line: 2965)


SERVIDOR (Server) Tue Oct 20 23:20:53 2009
Database: C:\MM\EMPRESA.FDB
I/O error for file "C:\MM\EMPRESA.FDB"
Error while trying to read from file
Se ha alcanzado el final del archivo.
internal gds software consistency check (page in use during flush (210), file: cch.cpp line: 2965)


SERVIDOR (Server) Tue Oct 20 23:21:21 2009
Database: C:\MM\EMPRESA.FDB
Data page 39509 (sequence 3480), line 0 is bad in table PMOVCC (267)


SERVIDOR (Server) Tue Oct 20 23:21:22 2009
Database: C:\MM\EMPRESA.FDB
internal gds software consistency check (page in use during flush (210), file: cch.cpp line: 2965)


SERVIDOR (Server) Tue Oct 20 23:21:22 2009
Database: C:\MM\EMPRESA.FDB
internal gds software consistency check (page in use during flush (210), file: cch.cpp line: 2965)


SERVIDOR (Server) Tue Oct 20 23:29:55 2009
Database: C:\MM\EMPRESA.FDB
internal gds software consistency check (wrong record length (183), file: vio.cpp line: 1121)


SERVIDOR (Server) Tue Oct 20 23:31:51 2009
Database: C:\MM\EMPRESA.FDB
internal gds software consistency check (wrong record length (183), file: vio.cpp line: 1121)


SERVIDOR (Server) Tue Oct 20 23:32:59 2009
Database: C:\MM\EMPRESA.FDB
Data page 39509 (sequence 3480), line 0 is bad in table PMOVCC (267)


SERVIDOR (Server) Tue Oct 20 23:33:00 2009
Database: C:\MM\EMPRESA.FDB
internal gds software consistency check (page in use during flush (210), file: cch.cpp line: 2965)


SERVIDOR (Server) Tue Oct 20 23:33:00 2009
Database: C:\MM\EMPRESA.FDB
internal gds software consistency check (page in use during flush (210), file: cch.cpp line: 2965)


[Non-text portions of this message have been removed]