FirebirdSQL / firebird

Firebird server, client and tools
https://www.firebirdsql.org/
1.22k stars 213 forks source link

Memory leak in FB 3.0 while doing reconnects with valid user/password [CORE4683] #4991

Open firebird-automations opened 9 years ago

firebird-automations commented 9 years ago

Submitted by: @pavel-zotov

Attachments: fb-memo-watch-while-reconnects.zip

FB: WI-T3.0.0.31603 (both client & server)

OS: Windows XP SP3

Aux. utilities being used in this test: 1) psList (from SysInternals package - shows list of running processes) 2) mtee (Stream Splitter, can be taken here: http://www.commandline.co.uk/mtee/ )

Main batch:

@echo off @cls @rem makes infinite loop with CONNECT & DISCONNECT

setlocal enabledelayedexpansion enableextensions

set fbc=C:\1INSTALL\FB30SNAP set host=localhost set port=3333 set dbnm=oltp30

set err=connect.err :m1 echo select current_transaction from rdb$database;quit; | %fbc%\isql %host%/%port%:%dbnm% -nod -n 1>nul 2>>%err% goto m1 exit

Batch for watching + logging memory:

@echo off setlocal enabledelayedexpansion enableextensions cls

set log=memowatch.log set intv=5

del %log% 2>nul set /a intv=%intv%+1 pslist -m 2>nul | findstr /i /c:"name" | mtee /t /+ %log% :m1 pslist -m 2>nul | findstr /i /c:"firebird" | mtee /t /+ %log% ping -n %intv% 127.0.0.1>nul goto m1

:end

Window-1: start watching batch Window-2: start main batch.

After short time one may see in the log or on concole of window-1 that memory consumption grows for 'firebird' process.

See in attach: 1) memowatch.log 2) screenshot from PE

PS.

FB config:

DefaultDbCachePages = 64K LockHashSlots = 22111 TempCacheLimit = 2147483647

RemoteServicePort = 3333

MaxUnflushedWrites = -1 MaxUnflushedWriteTime = -1

ExternalFileAccess = Restrict C:\1INSTALL\FBTEST MaxUserTraceLogSize = 99999

FileSystemCacheThreshold = 65536K AuthServer = Legacy_Auth,Srp AuthClient = Legacy_Auth,Srp,Win_Sspi WireCrypt = Disabled UserManager = Legacy_UserManager

BugcheckAbort = 1

FB service ImagePath:

C:\1INSTALL\FB30SNAP\firebird.exe -s FB30 -m

PPS. Seems that NO such problem when change to SuperClassic - it's only in SuperServer.

Commits: FirebirdSQL/firebird@39a137e9136aa9eeba2a2ec396c3df1851163641 FirebirdSQL/firebird@1470f7a61ec822a8aa82f4efebf2af075974a236 FirebirdSQL/firebird@660f5b0cc513302aefd7081f98c0aca1b00725a9 FirebirdSQL/firebird@24112e118ec9175337fa76b70101df135441117a FirebirdSQL/firebird@79b760b4ac0a0881039cda1ac9b375bc88f2a6db FirebirdSQL/firebird@e21e534e30f7bab98e8d65a46d6c29def8a0e36d FirebirdSQL/firebird@d15830d15aa8c112d389dfd0150f00cc99c01cb9 FirebirdSQL/fbt-repository@636d0edfdcdeac6901f4dce65151a9376a0aab60 FirebirdSQL/fbt-repository@c17100aa67caf584bf2f1bd7218c10a93dc93747 FirebirdSQL/fbt-repository@cdebadaf068fcc3a92f4b169fa10c80ea5bd37d9 FirebirdSQL/fbt-repository@28aa5230e0158e534f182c74eed4a67667399d70 FirebirdSQL/fbt-repository@d02033f44acb668923edca42a064f76c2abaaa2e FirebirdSQL/fbt-repository@6b272fbb2c81bca8cf638d523b5ebcee55c8e723 FirebirdSQL/fbt-repository@5eaa05a01a3a3a3ce646233bd77e59ccb12bbdf2

firebird-automations commented 9 years ago
Modified by: @pavel-zotov Attachment: fb\-memo\-watch\-while\-reconnects\.zip \[ 12672 \]
firebird-automations commented 9 years ago
Modified by: @pavel-zotov description: FB: WI\-T3\.0\.0\.31603 \(both client & server\) OS: Windows XP SP3 Aux\. utilities being used in this test: 1\) psKill \(from SysInternals package\) 2\) mtee \(Stream Splitter, can be taken here: \) Main batch: ========= @echo off @cls @rem makes infinite loop with CONNECT & DISCONNECT setlocal enabledelayedexpansion enableextensions set fbc=C:\\1INSTALL\\FB30SNAP set host=localhost set port=3333 set dbnm=oltp30 set err=connect\.err :m1 echo select current\_transaction from rdb$database;quit; \| %fbc%\\isql %host%/%port%:%dbnm% \-nod \-n 1\>nul 2\>\>%err% goto m1 exit Batch for watching \+ logging memory: ============== @echo off setlocal enabledelayedexpansion enableextensions cls set log=memowatch\.log set intv=5 del %log% 2\>nul set /a intv=%intv%\+1 pslist \-m 2\>nul \| findstr /i /c:"name" \| mtee /t /\+ %log% :m1 pslist \-m 2\>nul \| findstr /i /c:"firebird" \| mtee /t /\+ %log% ping \-n %intv% 127\.0\.0\.1\>nul goto m1 :end Window\-1: start watching batch Window\-2: start main batch\. After short time one may see in the log or on concole of window\-1 that memory consumption grows for 'firebird' process\. See in attach: 1\) memowatch\.log 2\) screenshot from PE PS\. FB config: ======== DefaultDbCachePages = 64K LockHashSlots = 22111 TempCacheLimit = 2147483647 RemoteServicePort = 3333 MaxUnflushedWrites = \-1 MaxUnflushedWriteTime = \-1 ExternalFileAccess = Restrict C:\\1INSTALL\\FBTEST MaxUserTraceLogSize = 99999 FileSystemCacheThreshold = 65536K AuthServer = Legacy\_Auth,Srp AuthClient = Legacy\_Auth,Srp,Win\_Sspi WireCrypt = Disabled UserManager = Legacy\_UserManager BugcheckAbort = 1 FB service ImagePath: ================== C:\\1INSTALL\\FB30SNAP\\firebird\.exe \-s FB30 \-m =\> FB: WI\-T3\.0\.0\.31603 \(both client & server\) OS: Windows XP SP3 Aux\. utilities being used in this test: 1\) psList \(from SysInternals package \- shows list of running processes\) 2\) mtee \(Stream Splitter, can be taken here: \) Main batch: ========= @echo off @cls @rem makes infinite loop with CONNECT & DISCONNECT setlocal enabledelayedexpansion enableextensions set fbc=C:\\1INSTALL\\FB30SNAP set host=localhost set port=3333 set dbnm=oltp30 set err=connect\.err :m1 echo select current\_transaction from rdb$database;quit; \| %fbc%\\isql %host%/%port%:%dbnm% \-nod \-n 1\>nul 2\>\>%err% goto m1 exit Batch for watching \+ logging memory: ============== @echo off setlocal enabledelayedexpansion enableextensions cls set log=memowatch\.log set intv=5 del %log% 2\>nul set /a intv=%intv%\+1 pslist \-m 2\>nul \| findstr /i /c:"name" \| mtee /t /\+ %log% :m1 pslist \-m 2\>nul \| findstr /i /c:"firebird" \| mtee /t /\+ %log% ping \-n %intv% 127\.0\.0\.1\>nul goto m1 :end Window\-1: start watching batch Window\-2: start main batch\. After short time one may see in the log or on concole of window\-1 that memory consumption grows for 'firebird' process\. See in attach: 1\) memowatch\.log 2\) screenshot from PE PS\. FB config: ======== DefaultDbCachePages = 64K LockHashSlots = 22111 TempCacheLimit = 2147483647 RemoteServicePort = 3333 MaxUnflushedWrites = \-1 MaxUnflushedWriteTime = \-1 ExternalFileAccess = Restrict C:\\1INSTALL\\FBTEST MaxUserTraceLogSize = 99999 FileSystemCacheThreshold = 65536K AuthServer = Legacy\_Auth,Srp AuthClient = Legacy\_Auth,Srp,Win\_Sspi WireCrypt = Disabled UserManager = Legacy\_UserManager BugcheckAbort = 1 FB service ImagePath: ================== C:\\1INSTALL\\FB30SNAP\\firebird\.exe \-s FB30 \-m PPS\. Seems that NO such problem when change to SuperClassic \- it's only in SuperServer\.
firebird-automations commented 9 years ago
Modified by: @hvlad assignee: Vlad Khorsun \[ hvlad \]