Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database corruption after end of session : page xxx is of wrong type expected 4 found 7 [CORE3549] #3905

Closed
firebird-issue-importer opened this issue Jul 9, 2011 · 14 comments

Comments

@firebird-issue-importer
Copy link

@firebird-issue-importer firebird-issue-importer commented Jul 9, 2011

Submitted by: alainsegura (linlin13)

* When a run my software with the engine 2.5.0.26074 all is ok, in ALL cases.

* When a run my software with a "small" (100000) set of operations, and with the engine 2.5.1.26333 nothing special happen (all is ok).

* When a run my software with the engine 2.5.1.26333 with a huge number (10000000) of transactions including operations such as:
insert/update, select, create procedure, drop procedure The work end normally (no error message) while connected.

BUT after disconnection and reconnection to the database, the engine return the following error :

"page 266 is of wrong type expected 4 found 7"

and the database is corrupted and unusable !!

Same problem under various OS version (windows) and databases. The engine "itself" is the cause of the problem.

Commits: 3e9577b da874ec 4695be3

====== Test Details ======

NOTE: could NOT reproduce on official 2.5.1 (WI-V2.5.1.26351, issued 03-oct-2011).
Fix for this ticket in 2.5.1 was before official 2.5.1 release: 17-jul-2011, rev. 53327

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 9, 2011

Modified by: alainsegura (linlin13)

description: Engine version 2.5.1.26333

When a run my software with a "small" set of operations, nothing happen (all is ok).

But After running a huge number of transactions including operations such as:
insert/update, select, create procedure, drop procedure
The work end normally (no error message). But when i close the connection and then try to reconnect do the database, the engine return the following error :

"page 266 is of wrong type expected 4 found 7"

and the database is then corrupted.

At this time, i have no more information to provide, to find the origine of the problem.

=>

Engine version 2.5.1.26333 Problem

* When a run my software with the engine 2.5.0.26074 all is ok, in ALL cases.

* When a run my software with a "small" set of operations, and with the engine 2.5.1.26333 nothing special happen (all is ok).

* When a run my software with the engine 2.5.1.26333 with a huge number of transactions including operations such as:
insert/update, select, create procedure, drop procedure The work end normally (no error message) while connected.

BUT after disconnection and reconnection to the database, the engine return the following error :

"page 266 is of wrong type expected 4 found 7"

and the database is corrupted and unusable !!

Same problem under various OS version (windows) and databases. The engine "itself" is the cause of the problem.

environment: Windows 7. => Windows (XP, 7)

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 9, 2011

Commented by: alainsegura (linlin13)

The database seem to be in a correct state while the initial connection is active. When the connection is closed, impossible to reconnect to the database, the engine return the error page X is of wrong type expected 4 found 7.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 9, 2011

Modified by: alainsegura (linlin13)

description: Engine version 2.5.1.26333 Problem

* When a run my software with the engine 2.5.0.26074 all is ok, in ALL cases.

* When a run my software with a "small" set of operations, and with the engine 2.5.1.26333 nothing special happen (all is ok).

* When a run my software with the engine 2.5.1.26333 with a huge number of transactions including operations such as:
insert/update, select, create procedure, drop procedure The work end normally (no error message) while connected.

BUT after disconnection and reconnection to the database, the engine return the following error :

"page 266 is of wrong type expected 4 found 7"

and the database is corrupted and unusable !!

Same problem under various OS version (windows) and databases. The engine "itself" is the cause of the problem.

=>

Engine version 2.5.1.26333 Problem

* When a run my software with the engine 2.5.0.26074 all is ok, in ALL cases.

* When a run my software with a "small" (100000) set of operations, and with the engine 2.5.1.26333 nothing special happen (all is ok).

* When a run my software with the engine 2.5.1.26333 with a huge number (10000000) of transactions including operations such as:
insert/update, select, create procedure, drop procedure The work end normally (no error message) while connected.

BUT after disconnection and reconnection to the database, the engine return the following error :

"page 266 is of wrong type expected 4 found 7"

and the database is corrupted and unusable !!

Same problem under various OS version (windows) and databases. The engine "itself" is the cause of the problem.

environment: Windows (XP, 7) => Windows (All versions)

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 9, 2011

Modified by: alainsegura (linlin13)

description: Engine version 2.5.1.26333 Problem

* When a run my software with the engine 2.5.0.26074 all is ok, in ALL cases.

* When a run my software with a "small" (100000) set of operations, and with the engine 2.5.1.26333 nothing special happen (all is ok).

* When a run my software with the engine 2.5.1.26333 with a huge number (10000000) of transactions including operations such as:
insert/update, select, create procedure, drop procedure The work end normally (no error message) while connected.

BUT after disconnection and reconnection to the database, the engine return the following error :

"page 266 is of wrong type expected 4 found 7"

and the database is corrupted and unusable !!

Same problem under various OS version (windows) and databases. The engine "itself" is the cause of the problem.

=>

* When a run my software with the engine 2.5.0.26074 all is ok, in ALL cases.

* When a run my software with a "small" (100000) set of operations, and with the engine 2.5.1.26333 nothing special happen (all is ok).

* When a run my software with the engine 2.5.1.26333 with a huge number (10000000) of transactions including operations such as:
insert/update, select, create procedure, drop procedure The work end normally (no error message) while connected.

BUT after disconnection and reconnection to the database, the engine return the following error :

"page 266 is of wrong type expected 4 found 7"

and the database is corrupted and unusable !!

Same problem under various OS version (windows) and databases. The engine "itself" is the cause of the problem.

environment: Windows (All versions) => Windows (All versions) -- Engine version 2.5.1.26333 32Bits Superserver.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 9, 2011

Commented by: @hvlad

Reproducible test case required.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 9, 2011

Commented by: alainsegura (linlin13)

I'am investigating this problem, at this time a have found this:

*without the usage of global temporary table
...
on commit preserve rows

-> no database corrution

*with the usage of command
recreate table xxxx global temporary
on commit preserve rows

--> after hundred of transactions --> the database get corrupted.

reproductible case coming soon...

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 10, 2011

Commented by: alainsegura (linlin13)

Sorry, i have created a new issue (core 3550) for a new problem, but in fact, it's the same issue, see core-3550 for detail and a reproductible case

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 10, 2011

Commented by: @hvlad

Why do you think CORE3550 is the same issue ? Here we see the "wrong page type" error while at CORE3550 we see the crash.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 16, 2011

Modified by: @hvlad

assignee: Vlad Khorsun [ hvlad ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 17, 2011

Commented by: @hvlad

To reproduce:

1. Create GTT ON COMMIT PRESERVE ROWS and index on it in the same transaction :

set autoddl off;
create global temporary table test (x int) on commit preserve rows;
create index xtest on test (x);
commit;

2. Make engine write record into RDB$PAGES with RDB$RELATION_ID = 0. It happens when new TIP or generator page is created.
For example, start page_size * 4 transactions to create new TIP page:

execute block
as
declare variable i integer = 0;
begin
while (i < 32800) do -- i have page size 8KB
begin
in autonomous transaction do
execute statement 'insert into test values (1)';
i = i + 1;
end
end

3. Disconnect and connect again.

Error

page XXX is of wrong type expected 4 found YYY

or
Error while trying to read from file
Reached the end of the file.

will be raised.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 17, 2011

Commented by: @hvlad

The bug was introduced with patch for CORE1361 but became visible after the patch for CORE3503

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 17, 2011

Modified by: @hvlad

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5.1 [ 10333 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

Fix Version: 2.1.5 [ 10420 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 23, 2013

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 14, 2015

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: Done successfully

Test Details: NOTE: could NOT reproduce on official 2.5.1 (WI-V2.5.1.26351, issued 03-oct-2011).
Fix for this ticket in 2.5.1 was before official 2.5.1 release: 17-jul-2011, rev. 53327

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants