New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak when doing a lot of iterations FBSVCMGR with action_trace_start, _list and _stop [CORE3969] #4302
Comments
Modified by: @pavel-zotovAttachment: pslist_m.zip [ 12249 ] |
Modified by: @hvladassignee: Vlad Khorsun [ hvlad ] |
Modified by: @hvladVersion: 2.5.2 [ 10450 ] Fix Version: 2.5.3 [ 10461 ] Fix Version: 2.5.2 [ 10450 ] => |
Commented by: @hvlad Fix is committed. Please, test next snapshot build and confirm. |
Commented by: @pavel-zotov > Please, test next snapshot build and confirm. I've tested on build WI-2.5.3.26551 and all OK: no more memory leaks in columns VM and WS can be found (test was running over 1.5 hour). |
Commented by: @hvlad Thanks for the testing and confirmation ! |
Commented by: @hvlad Fix was Windows only but should be platform independent. Reopen to complete fix. |
Commented by: @pavel-zotov Vlad, I've tested build of 19-nov-2012 in LINUX environment and it seems that the problem is gone. So, I can confirm that this bug was resolved. Thank you very much. |
Commented by: @hvlad Pavel, thank you for the reporting bugs, testing fixes and patience |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @pavel-zotov
Attachments:
pslist_m.zip
Votes: 1
I run infinite loop with the following actions:
1) FBSVCMGR action_trace_start
2) connect to .fdb via ISQL and make a simplest query, e.g.: select current_connection from rdb$database; quit;
3) FBSVCMGR action_trace_list (obtain the ID of active trace sesssion)
4) FBSVCMGR action_trace_stop
Under such circumstances memory leak of process fb_inet_server (tested on SC) occurs.
The following batch file illustrate the problem (some 3rd part utilities need for this test: mtee.exe for duplicating output and psList by SysInternals to output memory consumprion by processes):
@echo off
cls
@Rem file = 'trc_toggle.bat'
@Rem restart FB for each trace session number will be always 1
@Rem net stop "Firebird Server - fb25_3050"
@Rem net start "Firebird Server - fb25_3050"
pslist -m | findstr /i /c:"name" | mtee /t pslist_m.log
pslist -m | findstr /i /c:"fb_inet_server" | mtee /t /+ pslist_m.log
set inp=.\tmp_sql.tmp
set out=.\tmp_log.tmp
set i=1
:beg
if exist %inp% del %inp%
if exist %out% del %out%
echo select current_connection,current_timestamp from rdb$database;>>%inp%
@Rem echo out nul; select * from rdb$fields,rdb$fields; out;>>%inp%
echo quit;>>%inp%
@echo off
@echo -----------------------
@echo Start of iter # %i%.
@echo on
start /min %FIREBIRD%\bin\fbsvcmgr localhost:service_mgr action_trace_start trc_cfg zaudit.conf 1>tmp_trace_start.tmp 2>&1
@echo off
ping -n 2 127.0.0.1 >nul
%FIREBIRD%\bin\isql localhost:test_alias -n -i %inp% -o %out% -m
ping -n 3 127.0.0.1 >nul
%FIREBIRD%\bin\fbsvcmgr localhost:service_mgr action_trace_list | findstr /i /c:"Session ID" 1>tmp_trace_list.tmp 2>&1
@Rem get content of file with trace id:
set /p trc_id=<tmp_trace_list.tmp
@Rem extract digits:
set trc_id=%trc_id:~12,5%
@echo on
%FIREBIRD%\bin\fbsvcmgr localhost:service_mgr action_trace_stop trc_id %trc_id% 1>tmp_trace_stop.tmp 2>&1
@Rem check that no trace sessions still alive:
%FIREBIRD%\bin\fbsvcmgr localhost:service_mgr action_trace_list
@echo off
@echo End of iter # %i%.
pslist -m | findstr /i /c:"fb_inet_server" | mtee /t /+ pslist_m.log
ping -n 2 127.0.0.1 >nul
set /a i=i+1
goto beg
The cumulative log of this batch (results of psList -m) is in attach.
Commits: c08c25a e1481ec
The text was updated successfully, but these errors were encountered: