You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Rem where FB console utilities are:
set fbc=C:\1INSTALL\FB30SNAP
@Rem Settings for connect:
set host=192.168.0.220
set port=3333
set dbnm=oltp30
set sql=tmp-brute-force.sql @Rem Dummy command for isql immediately quit when login fails:
echo set list on; select * from mon$database;>%sql%
for /l %%i in (1, 1, %winq%) do (
start /min brute-force-worker.bat %%i %fbc% %host% %port% %dbnm% %sql%
)
----- end of brute-force.bat -----
Worker batch that launches single ISQL (NB: env. variable %TEMP% has to be defined):
----- brute-force-worker.bat ----- @echo off
set sn=%1
set fbc=%2
set host=%3
set port=%4
set dbnm=%5
set sql=%6
set logdir=%temp%\hack30
md %logdir% 2>nul
set /a k=1000+%sn
set log=%logdir%\hack_%k:~1,3%.log
del %log% 2>nul
:m1
echo window # %sn%
echo #############
echo.>>%log%
set usr=%random%
set pwd=%random%
echo %time% before attempt to hack with usr=%usr% and pwd=%pwd%>>%log% @echo on
%fbc%\isql %host%/%port%:%dbnm% -i %sql% -user %usr% -pas %pwd% 2>>%log% 1>>&2 @echo off
echo after attempt to hack: %time%>>%log%
goto m1
----- end of brute-force-worker.bat -----
Test:
brute-force.bat 150
Shell sctipt running on Linux for getting memory consumption of process 'firebird' (subdirectory 'logs' has to be exist):
$ cat fb_memo_watch.sh
fbn=firebird
log=./logs/$fbn.memo_usage.$(date +'%y%m%d_%H%M%S').log
rm -f $log
relax=5
while :
do
supertee -a -n $log echo $(date +'%y%m%d_%H%M%S') $(pmap -d $(pgrep $fbn)|tail -1)
sleep $relax
done
After brute-force.bat running several hours one may see that memory usage grows - see in attach files 'firebird-*.memo_usage*.log'.
I've run this test both on Release and Debug builds. The latter creates special debugu file 'memdebug' - it's also in attach.
PS. There is NO such problem on LI-V6.3.4.26821 Firebird 2.5.
The text was updated successfully, but these errors were encountered:
Submitted by: @pavel-zotov
Attachments:
fb30-memory-usage-under-bfa.zip
LI-T6.3.0.31474 Firebird 3.0 Beta 2
Batch for opening N windows with ISQLs, each generates random pair {login, password} and tries to connect:
----- brute-force.bat -----
@echo off
@cls
setlocal enabledelayedexpansion enableextensions
set winq=%1
@Rem default number of windows:
if .%1.==.. set winq=10
@Rem Replace with your own:
@Rem where FB console utilities are:
set fbc=C:\1INSTALL\FB30SNAP
@Rem Settings for connect:
set host=192.168.0.220
set port=3333
set dbnm=oltp30
set sql=tmp-brute-force.sql
@Rem Dummy command for isql immediately quit when login fails:
echo set list on; select * from mon$database;>%sql%
for /l %%i in (1, 1, %winq%) do (
start /min brute-force-worker.bat %%i %fbc% %host% %port% %dbnm% %sql%
)
----- end of brute-force.bat -----
Worker batch that launches single ISQL (NB: env. variable %TEMP% has to be defined):
----- brute-force-worker.bat -----
@echo off
set sn=%1
set fbc=%2
set host=%3
set port=%4
set dbnm=%5
set sql=%6
set logdir=%temp%\hack30
md %logdir% 2>nul
set /a k=1000+%sn
set log=%logdir%\hack_%k:~1,3%.log
del %log% 2>nul
:m1
echo window # %sn%
echo #############
echo.>>%log%
set usr=%random%
set pwd=%random%
echo %time% before attempt to hack with usr=%usr% and pwd=%pwd%>>%log%
@echo on
%fbc%\isql %host%/%port%:%dbnm% -i %sql% -user %usr% -pas %pwd% 2>>%log% 1>>&2
@echo off
echo after attempt to hack: %time%>>%log%
goto m1
----- end of brute-force-worker.bat -----
Test:
brute-force.bat 150
Shell sctipt running on Linux for getting memory consumption of process 'firebird' (subdirectory 'logs' has to be exist):
$ cat fb_memo_watch.sh$log echo $ (date +'%y%m%d_%H%M%S') $(pmap -d $ (pgrep $fbn)|tail -1)
fbn=firebird
log=./logs/$fbn.memo_usage.$(date +'%y%m%d_%H%M%S').log
rm -f $log
relax=5
while :
do
supertee -a -n
sleep $relax
done
After brute-force.bat running several hours one may see that memory usage grows - see in attach files 'firebird-*.memo_usage*.log'.
I've run this test both on Release and Debug builds. The latter creates special debugu file 'memdebug' - it's also in attach.
PS. There is NO such problem on LI-V6.3.4.26821 Firebird 2.5.
The text was updated successfully, but these errors were encountered: