Issue Details (XML | Word | Printable)

Key: CORE-5910
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vlad Khorsun
Reporter: Roman Simakov
Votes: 0
Watchers: 0
Operations

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

Server crash after kill in EDS manager destructor

Created: 14/Sep/18 01:56 PM   Updated: 20/Sep/18 12:40 PM
Component/s: Engine
Affects Version/s: 2.5.8
Fix Version/s: 2.5.9

Environment: Ubuntu 18.04, superclassic, classic

QA Status: Cannot be tested


 Description  « Hide
To reproduce:
in terminal 1 run:
./isql -u sysdba -p masterkey
create database 'localhost:/tmp/test';
set term ^; execute block as begin execute statement 'execute procedure a;'; end^

after in terminal 2 run:
sudo killall fb_smp_server

stack is:
1 Firebird::RefPtr<Jrd::Database::Sync>::operator-> RefCounted.h 136 0x7ffff71859a0
2 EDS::EngineCallbackGuard::init ExtDS.cpp 1654 0x7ffff73fd6fb
3 EDS::EngineCallbackGuard::EngineCallbackGuard ExtDS.h 467 0x7ffff740492c
4 EDS::InternalStatement::doClose InternalDS.cpp 509 0x7ffff7403688
5 EDS::Statement::deallocate ExtDS.cpp 1046 0x7ffff73fafde
6 EDS::Statement::deleteStatement ExtDS.cpp 865 0x7ffff73fa4a4
7 EDS::Connection::clearStatements ExtDS.cpp 504 0x7ffff73f8f42
8 EDS::Connection::detach ExtDS.cpp 522 0x7ffff73f8fcf
9 EDS::Connection::deleteConnection ExtDS.cpp 318 0x7ffff73f82d6
10 EDS::Provider::clearConnections ExtDS.cpp 272 0x7ffff73f7f1a
11 EDS::Manager::~Manager ExtDS.cpp 72 0x7ffff73f7110
12 Firebird::GlobalPtr<EDS::Manager, (Firebird::InstanceControl::DtorPriority)2>::dtor init.h 121 0x7ffff7401751
13 Firebird::InstanceControl::InstanceLink<Firebird::GlobalPtr<EDS::Manager, (Firebird::InstanceControl::DtorPriority)2>, (Firebird::InstanceControl::DtorPriority)2>::dtor init.h 97 0x7ffff7401721
14 Firebird::InstanceControl::InstanceList::destructors init.cpp 199 0x7ffff75efc02
15 Firebird::InstanceControl::destructors init.cpp 180 0x7ffff75efb53
16 (anonymous namespace)::allClean init.cpp 61 0x7ffff75ef96c
17 (anonymous namespace)::Cleanup::~Cleanup init.cpp 89 0x7ffff75ef9bd
18 __cxa_finalize cxa_finalize.c 83 0x7ffff5780615
19 __do_global_dtors_aux 0x7ffff7123e63
20 ?? 0x7fffffffe300
21 _dl_fini dl-fini.c 138 0x7ffff7de5b73


In frame 11 in ~Manager we create tdbb with database = NULL. In frame 2 we try to dereference it and crash.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Vlad Khorsun added a comment - 14/Sep/18 09:21 PM
Should be fixed now, check next snapshot build, please

Roman Simakov added a comment - 18/Sep/18 03:06 PM
Yes. It looks working. Thanks.