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
Write-lock of database file is cleared ("W" disappears from output of lsof <db_name>) when remote machine obtains DB header running "fbsvcmgr <remote_host>/port:service_mgr action_db_stats <remote_dbname>" [CORE5056]
#5343
1) database on LINUX server (host/port:database = 192.168.0.220/3333:/var/db/fb30/oltp30.fdb );
2) FB binaries, including fbsvcmgr, present on Windows machine which serves now as client;
3) time values on both machines are very close.
Consider batch that is launched on Windows machine:
@echo off
setlocal enabledelayedexpansion enableextensions
echo !time! starting ISQL...
echo select count(*) from rdb$types; | isql 192.168.0.220/3333:/var/db/fb30/oltp30.fdb -user sysdba -pas masterkey >nul
echo !time! return from ISQL, start small delay...
ping -n 3 127.0.0.1 >nul
echo !time! finish small delay, starting obtaining DB header info...
fbsvcmgr 192.168.0.220/3333:service_mgr -user SYSDBA -password masterkey action_db_stats sts_hdr_pages dbname /var/db/fb30/oltp30.fdb
echo !time! finish obtaining DB header info...
Before this batch will be run, start following .sh on Linux host:
log=./lsof_$(date +'%Y%m%d_%H%M%S').log
rm -f $log
while :
do
supertee -tan $log lsof /var/db/fb30/oltp30.fdb
sleep 0.5
done
21:06:33.71 starting ISQL...
21:06:34.85 return from ISQL, start small delay...
21:06:36.88 finish small delay, starting obtaining DB header info...
21:06:36.98 finish obtaining DB header info...
Between points [1] and [2] lock-state of database was changed from "9uW" to "9u".
It is "fbsvcmgr action_db_stats" command that was run on Windows host that lead to this change.
Submitted by: @pavel-zotov
Environment:
1) database on LINUX server (host/port:database = 192.168.0.220/3333:/var/db/fb30/oltp30.fdb );
2) FB binaries, including fbsvcmgr, present on Windows machine which serves now as client;
3) time values on both machines are very close.
Consider batch that is launched on Windows machine:
@echo off
setlocal enabledelayedexpansion enableextensions
echo !time! starting ISQL...
echo select count(*) from rdb$types; | isql 192.168.0.220/3333:/var/db/fb30/oltp30.fdb -user sysdba -pas masterkey >nul
echo !time! return from ISQL, start small delay...
ping -n 3 127.0.0.1 >nul
echo !time! finish small delay, starting obtaining DB header info...
fbsvcmgr 192.168.0.220/3333:service_mgr -user SYSDBA -password masterkey action_db_stats sts_hdr_pages dbname /var/db/fb30/oltp30.fdb
echo !time! finish obtaining DB header info...
Before this batch will be run, start following .sh on Linux host:
log=./lsof_$(date +'%Y%m%d_%H%M%S').log
rm -f $log
while :
do
supertee -tan $log lsof /var/db/fb30/oltp30.fdb
sleep 0.5
done
-- and then run windows batch.
Log of .sh will be following:
[root@oel64 21:06:51 /var/db/fb30/logs]$ head -1 lsof_20151225_210630.log; grep -iv "COMMAND" lsof_20151225_210630.log
Fri Dec 25 21:06:35 2015: COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
Fri Dec 25 21:06:35 2015: firebird 15993 firebird 9u REG 8,4 3510632448 6554793 /var/db/fb30/oltp30.fdb
Fri Dec 25 21:06:35 2015: firebird 15993 firebird 9uW REG 8,4 3510632448 6554793 /var/db/fb30/oltp30.fdb
Fri Dec 25 21:06:36 2015: firebird 15993 firebird 9uW REG 8,4 3510632448 6554793 /var/db/fb30/oltp30.fdb
Fri Dec 25 21:06:36 2015: firebird 15993 firebird 9uW REG 8,4 3510632448 6554793 /var/db/fb30/oltp30.fdb
Fri Dec 25 21:06:37 2015: firebird 15993 firebird 9uW REG 8,4 3510632448 6554793 /var/db/fb30/oltp30.fdb
Fri Dec 25 21:06:37 2015: firebird 15993 firebird 9uW REG 8,4 3510632448 6554793 /var/db/fb30/oltp30.fdb --------- [ 1 ]
Fri Dec 25 21:06:38 2015: firebird 15993 firebird 9u REG 8,4 3510632448 6554793 /var/db/fb30/oltp30.fdb ----------- [ 2 ]
Fri Dec 25 21:06:39 2015: firebird 15993 firebird 9u REG 8,4 3510632448 6554793 /var/db/fb30/oltp30.fdb
Ouput of Windows batch will be:
21:06:33.71 starting ISQL...
21:06:34.85 return from ISQL, start small delay...
21:06:36.88 finish small delay, starting obtaining DB header info...
21:06:36.98 finish obtaining DB header info...
Between points [1] and [2] lock-state of database was changed from "9uW" to "9u".
It is "fbsvcmgr action_db_stats" command that was run on Windows host that lead to this change.
PS. LI-V3.0.0.32239
Commits: f4defcd 7b5b0ca FirebirdSQL/fbt-repository@5b5380b FirebirdSQL/fbt-repository@86f24cf
====== Test Details ======
Can be reproduced only on POSIX with scenario that is similar to:
@echo off
setlocal enabledelayedexpansion enableextensions
echo !time! starting ISQL...
echo select count(*) from rdb$types; | isql /3333:oltp30 -user sysdba
-pas masterkey >nul
echo !time! return from ISQL, start small delay...
ping -n 3 127.0.0.1 >nul
echo !time! finish small delay, starting obtaining DB header info...
fbsvcmgr /3333:service_mgr -user SYSDBA -password masterkey
action_db_stats sts_hdr_pages dbname oltp30
echo !time! finish obtaining DB header info...
nbackup -L oltp30
echo !time! get lock
nbackup -N oltp30
echo !time! free lock
The text was updated successfully, but these errors were encountered: