mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 20:43:02 +01:00
Fixed bug #8149 : The hung or crash could happen when connection fires TRACE_EVENT_DETACH event and new trace session created concurrently
This commit is contained in:
parent
25f3ebcd10
commit
0220cd109c
@ -188,6 +188,10 @@ void TraceManager::update_sessions()
|
||||
{ // scope
|
||||
ConfigStorage* storage = getStorage();
|
||||
|
||||
// don't attach going attachment to the new trace sessions, it allows
|
||||
// to avoid problems later - when mapping uses this going attachment
|
||||
const bool noNewSessions = attachment && (attachment->att_purge_tid);
|
||||
|
||||
StorageGuard guard(storage);
|
||||
storage->restart();
|
||||
|
||||
@ -199,7 +203,7 @@ void TraceManager::update_sessions()
|
||||
FB_SIZE_T pos;
|
||||
if (trace_sessions.find(session.ses_id, pos))
|
||||
liveSessions.add(session.ses_id);
|
||||
else
|
||||
else if (!noNewSessions)
|
||||
{
|
||||
storage->getSession(session, ConfigStorage::ALL);
|
||||
newSessions.add(FB_NEW_POOL(pool) TraceSession(pool, session));
|
||||
|
Loading…
Reference in New Issue
Block a user