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

Firebird server segfaults in the end of database backup [CORE5936] #6192

Closed
firebird-automations opened this issue Oct 5, 2018 · 9 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Saulius Vabalas (savas_glds.com)

Once per 3-5 days fb_inet_server process dies in the end of gbak's backup. Core files analysis shows that all of them contain the following frames:

#⁠0 TRA_state (bit_vector=0x7f325d78800c '\377' <repeats 200 times>..., oldest=<optimized out>, number=795364748) at ../src/jrd/tra.cpp:1793
#⁠1 0x00007f3269dc9973 in extend_cache (number=795364748, tdbb=0x7fffac5830f0) at ../src/jrd/tpc.cpp:561
#⁠2 TPC_snapshot_state (tdbb=0x7fffac5830f0, number=795364748) at ../src/jrd/tpc.cpp:362
#⁠3 0x00007f3269dcbc20 in TRA_snapshot_state (tdbb=0x7fffac5830f0, trans=0x7f3265cee090, number=795364748) at ../src/jrd/tra.cpp:1641

Commits: 8d9f399 676a526

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

"...in the end of database backup" -- where is BACKUP in this ticket ? May be title has to be changed in order to properly reflect reason of crash ?

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

assignee: Vlad Khorsun [ hvlad ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

reporter: Alexander Peshkov [ alexpeshkoff ] => Saulius Vabalas [ mailto:savas@glds.com ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Steps to reproduce is very similar to CORE5935, but a bit differs.

Run Firebird 2.5 in Classic or SuperClassic mode and open two terminals.

1) in terminal 1
isql
create database 'core-5936.fdb' page_size 8192;
create table a (id int);
create index idx_a on a computed by (id);

set term ^;

create procedure p_gen_tx(n int)
as
declare i int = 0;
begin
while (i < n) do
in autonomous transaction do
i = i + 1;
end
^

set term ;^
exit;

gfix -write async core-5936.fdb

2) in terminal 1:
isql core-5936.fdb -n
commit;
select current_transaction, rdb$get_context('SYSTEM', 'ISOLATION_LEVEL') from rdb$database;

3) in terminal 2:
isql core-5936.fdb -n
execute procedure p_gen_tx (33000);
commit;

insert into a values (current_transaction);
commit;
set statistics index idx_a;
commit;

select * from a where id > 0;
commit;

execute procedure p_gen_tx (33000);
commit;

4) in terminal 1:
commit;
select * from a where id > 0;

here we get
Statement failed, SQLSTATE = 08006
Error reading data from the connection.

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

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

resolution: Fixed [ 1 ]

Fix Version: 2.5.9 [ 10862 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Fix is frontported into v3

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

Fix Version: 3.0.5 [ 10885 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: No test => Done successfully

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

Test Details: "...in the end of database backup" -- where is BACKUP in this ticket ? May be title has to be changed in order to properly reflect reason of crash ?

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

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