Server crash after kill in EDS manager destructor
-------------------------------------------------

                 Key: CORE-5910
                 URL: http://tracker.firebirdsql.org/browse/CORE-5910
             Project: Firebird Core
          Issue Type: Bug
          Components: Engine
    Affects Versions: 2.5.8
         Environment: Ubuntu 18.04, superclassic, classic
            Reporter: Roman Simakov


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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to