mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 14:03:02 +01:00
Fixed CORE-2942: Huge (>10Gb) memory consumption by some fb_inet_server processes
This commit is contained in:
parent
7c5447a930
commit
2e4fea1c04
@ -214,7 +214,10 @@ LockManager::LockManager(const Firebird::string& id)
|
||||
LockManager::~LockManager()
|
||||
{
|
||||
const SRQ_PTR process_offset = m_processOffset;
|
||||
{ // guardian's scope
|
||||
Firebird::MutexLockGuard guard(m_localMutex);
|
||||
m_processOffset = 0;
|
||||
}
|
||||
|
||||
ISC_STATUS_ARRAY local_status;
|
||||
|
||||
@ -1463,7 +1466,9 @@ void LockManager::blocking_action_thread()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
m_localMutex.enter();
|
||||
SLONG value;
|
||||
{ // guardian's scope
|
||||
Firebird::MutexLockGuard guard(m_localMutex);
|
||||
|
||||
// See if the main thread has requested us to go away
|
||||
if (!m_processOffset || m_process->prc_process_id != PID)
|
||||
@ -1475,7 +1480,7 @@ void LockManager::blocking_action_thread()
|
||||
break;
|
||||
}
|
||||
|
||||
const SLONG value = ISC_event_clear(&m_process->prc_blocking);
|
||||
value = ISC_event_clear(&m_process->prc_blocking);
|
||||
|
||||
DEBUG_DELAY;
|
||||
|
||||
@ -1506,13 +1511,10 @@ void LockManager::blocking_action_thread()
|
||||
atStartup = false;
|
||||
m_startupSemaphore.release();
|
||||
}
|
||||
|
||||
m_localMutex.leave();
|
||||
}
|
||||
|
||||
ISC_event_wait(&m_process->prc_blocking, value, 0);
|
||||
}
|
||||
|
||||
m_localMutex.leave();
|
||||
}
|
||||
catch (const Firebird::Exception& x)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user