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

Connect to database that contains broken pages can lead to FB crash [CORE6528] #6755

Closed
firebird-automations opened this issue Mar 30, 2021 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pavel-zotov

Attachments:
broken.fdb.7z
dump-when-connect-to-broken-DB.7z
stack-trace-when-connect-to-broken-DB.7z

Attached .7z files can illustrate the problem:
1) broken.fdb.7z - database which has some pages with arbitrary typed characters (near the beginning of file);
2) stack-trace-when-connect-to-broken-DB.7z and dump-when-connect-to-broken-DB.7z -- stack trace and dump when trying to connect to this DB (checked on LI-V4.0.0.2394)

Commits: f507390 d3ae9f4 98fadc5 81c563d 2573f14 3c99c75

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

Test implemented but not yet committed to fbt-repo.
To be discussed further, after FB 4.x release.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

Attachment: broken.fdb.7z [ 13571 ]

Attachment: dump-when-connect-to-broken-DB.7z [ 13572 ]

Attachment: stack-trace-when-connect-to-broken-DB.7z [ 13573 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Segfault was caused cause engine code absolutely trusted index root page, i.e. offsets pointing out of page were not checked. I've added minimum correctness check when reading such page. May be other pages also require that.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

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

resolution: Fixed [ 1 ]

Fix Version: 4.0.0 [ 10931 ]

Fix Version: 3.0.8 [ 10960 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: No test => Deferred

Test Details: Test implemented but not yet committed to fbt-repo.
To be discussed further, after FB 4.x release.

@pavel-zotov
Copy link

::: test details :::
Although test that reproduces FB crash does exist it was decided to stop any investigation on this issue because there is no point in checking a huge number of possible page corruptions (main reason: performance overkill on real production systems).
Letters from Vlad: 05-apr-2021 10:08, 13:47 (benchmark related to performance affect), from dimitr: 05-apr-2021 10:38. Final letter from Alex: 21-sep-2021 10:38.

PS.
IMO, ticket must be marked as "Won't fix".

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

No branches or pull requests

3 participants