Issue Details (XML | Word | Printable)

Key: CORE-2285
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Peshkov
Reporter: michalk1
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Database with many grants gets corrupted after backup + restore

Created: 21/Jan/09 09:22 AM   Updated: 23/Feb/11 06:13 PM
Component/s: Engine, GBAK
Affects Version/s: 2.1.1, 2.1.2
Fix Version/s: 2.5 Beta 1

Time Tracking:
Not Specified

File Attachments: 1. File 2285.tgz (0.4 kB)
2. Zip Archive GrantTest.zip (334 kB)
3. Zip Archive GrantTest2.zip (76 kB)

Environment:
Windows XP, FB 2.1.2.18116 RC Superserver, 32-bit
Issue Links:
Relate
 

Planning Status: Unspecified


 Description  « Hide
May be related to CORE-1957 or CORE-2223, but persists in 2.1.2 RC1.

1) Create database with 300 tables and grant them to 100 users (30 000 grants in total)

2) Backup + restore the database

3) Revoke all grants from one user in single transaction (300 revocations in total). After commit there is an error:

internal gds software consistency check (cannot find record back version (291), file: vio.cpp line: 5029)



   



 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
michalk1 added a comment - 21/Jan/09 09:23 AM
I attach a simple testcase. Database backup + restore is done through services api in this case, but it doesn't make a difference.

Alexander Peshkov added a comment - 30/Jan/09 10:43 AM
Sorry, I could not reproduce this bug.
I've used ISQL to perform all actions, cause Delphi is not acceptable to me. May be this is clearly windows case?

michalk1 added a comment - 02/Feb/09 08:51 AM
In my original comment I exchanged count of tables and users (I updated it later). I create 300 tables and grant them to 100 users in the testcase, it seems that when the numbers are exchanged, the error is less likely. Try it again please with the replaced numbers, you may use a new script I attach. I can reproduce the error both at Windows and Linux servers (32-bit, default configuration) on condition the server variant is Superserver (can't reproduce it with Clasic). Remember to backup and restore the database before you revoke the grants.

Alexander Peshkov added a comment - 05/Feb/09 03:08 PM
Issue confirmed.
Sooner of all fix will be available only in 2.5, cause error is rare enough, but changes needed to fix it reliably are rather massive. You can make error much less possible on 2.1 setting
GCPolicy = cooperative
in firebird.conf.

PS. It's not related with CORE-1957 or CORE-2223.

Alexander Peshkov added a comment - 06/Feb/09 08:10 AM
dfw.epp is keeping is task_table[] pointer to it's internal static routines. The only exception from this rule is GRANT_privileges, which therefore was left not fixed in 1770.

Alexander Peshkov added a comment - 06/Feb/09 08:16 AM
Now all DB modifications in grant.epp happen in user (not system) transaction.