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

Regression: crash on unexpected client disconnection with opened transaction [CORE4676] #4985

Closed
firebird-automations opened this issue Jan 29, 2015 · 7 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @artyom-smirnov

Only snapshot builds 26824 and 26825 are affected.

Reproducing:

Run isql and execute:
create database 'a';
create table a(id int);
insert into a values(1);

Do not commit anything. Then do:
killall -9 isql

Server will crash.

Bug probably introduced with commit 11366: This should fix CORE4558: SuperServer dies when client is disconnected abnormally during the index navigational scan.
Commit slightly changed attachment release order so now all attachment requests released before dsql_dbb instance destroying which have pointers to already destroyed requests. On second releasing of requests server crashing.

Commits: 7fe133a FirebirdSQL/fbt-repository@d250ea5

@firebird-automations
Copy link
Collaborator Author

Commented by: @artyom-smirnov

Backtrace:

#⁠0 Firebird::MemoryPool::internal_deallocate (this=this@entry=0x7ffff7e3f020, block=block@entry=0x7ffff4454ff0) at ../src/common/classes/alloc.cpp:1845
#⁠1 0x0000000000759cbd in Firebird::MemoryPool::deallocate (this=this@entry=0x7ffff7e3f020, block=0x7ffff4454ff0) at ../src/common/classes/alloc.cpp:2044
#⁠2 0x000000000075a064 in Firebird::MemoryPool::deletePool (pool=<optimized out>) at ../src/common/classes/alloc.cpp:1444
#⁠3 0x000000000067dbf2 in release_request (tdbb=0x7ffff4271090, request=0x7ffff4469040, drop=<optimized out>) at ../src/dsql/dsql.cpp:2895
#⁠4 0x00000000006805cc in Jrd::dsql_dbb::~dsql_dbb (this=0x7ffff45363d0, __in_chrg=<optimized out>) at ../src/dsql/dsql.cpp:165
#⁠5 0x000000000058d437 in release_attachment (tdbb=tdbb@entry=0x7ffff4271090, attachment=attachment@entry=0x7ffff7e46380) at ../src/jrd/jrd.cpp:5527
#⁠6 0x0000000000590142 in purge_attachment (tdbb=tdbb@entry=0x7ffff4271090, attachment=attachment@entry=0x7ffff7e46380, force_flag=<optimized out>) at ../src/jrd/jrd.cpp:6393
#⁠7 0x0000000000590cd6 in jrd8_detach_database (user_status=0x7ffff42712e0, handle=0x7ffff7e892c0) at ../src/jrd/jrd.cpp:2458
#⁠8 0x000000000043e909 in detach_or_drop_database (user_status=<optimized out>, handle=0x7ffff7e88c60, proc=<optimized out>, specCode=0) at ../src/jrd/why.cpp:2261
#⁠9 0x0000000000411ef8 in rem_port::disconnect (this=this@entry=0x7ffff7e882b8, sendL=sendL@entry=0x7ffff7e84768, receiveL=receiveL@entry=0x7ffff7e84b78)
at ../src/remote/server.cpp:1769
#⁠10 0x000000000041c769 in process_packet (port=0x7ffff7e882b8, sendL=sendL@entry=0x7ffff7e84768, receive=receive@entry=0x7ffff7e84b78, result=result@entry=0x7ffff4271dd8)
at ../src/remote/server.cpp:3391
#⁠11 0x000000000041e055 in loopThread () at ../src/remote/server.cpp:5261
#⁠12 0x00000000004311b9 in run (this=<synthetic pointer>) at ../src/jrd/ThreadStart.cpp:128
#⁠13 (anonymous namespace)::threadStart (arg=0x7ffff7fe8b90) at ../src/jrd/ThreadStart.cpp:139
#⁠14 0x00007ffff6ea60a5 in start_thread (arg=0x7ffff4272700) at pthread_create.c:309
#⁠15 0x00007ffff6bd377d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

@firebird-automations
Copy link
Collaborator Author

Modified by: @artyom-smirnov

description: Reproducing:

Run isql and execute:
create database 'a';
create table a(id int);
insert into a values('1');

Do not commit anything. Then do:
killall -9 isql

Server will crash.

Bug probably introduced with commit 11366: This should fix CORE4558: SuperServer dies when client is disconnected abnormally during the index navigational scan.
Commit slightly changed attachment release order so now all attachment requests released before dsql_dbb instance destroying which have pointers to already destroyed requests. On second releasing of requests server crashing.

=>

Reproducing:

Run isql and execute:
create database 'a';
create table a(id int);
insert into a values(1);

Do not commit anything. Then do:
killall -9 isql

Server will crash.

Bug probably introduced with commit 11366: This should fix CORE4558: SuperServer dies when client is disconnected abnormally during the index navigational scan.
Commit slightly changed attachment release order so now all attachment requests released before dsql_dbb instance destroying which have pointers to already destroyed requests. On second releasing of requests server crashing.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 2.5.4 [ 10585 ]

description: Reproducing:

Run isql and execute:
create database 'a';
create table a(id int);
insert into a values(1);

Do not commit anything. Then do:
killall -9 isql

Server will crash.

Bug probably introduced with commit 11366: This should fix CORE4558: SuperServer dies when client is disconnected abnormally during the index navigational scan.
Commit slightly changed attachment release order so now all attachment requests released before dsql_dbb instance destroying which have pointers to already destroyed requests. On second releasing of requests server crashing.

=>

Only snapshot builds 26824 and 26825 are affected.

Reproducing:

Run isql and execute:
create database 'a';
create table a(id int);
insert into a values(1);

Do not commit anything. Then do:
killall -9 isql

Server will crash.

Bug probably introduced with commit 11366: This should fix CORE4558: SuperServer dies when client is disconnected abnormally during the index navigational scan.
Commit slightly changed attachment release order so now all attachment requests released before dsql_dbb instance destroying which have pointers to already destroyed requests. On second releasing of requests server crashing.

summary: Crash on unexpected client disconnection with opened transaction => Regression: crash on unexpected client disconnection with opened transaction

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

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

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Cannot be tested

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

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

2 participants