Get both "335545060 : Missing security context " and "335544344 : I/O error
during "open" operation" for existing database under heavy concurrent DML
-----------------------------------------------------------------------------------------------------------------------------------------------------
Key: CORE-4644
URL: http://tracker.firebirdsql.org/browse/CORE-4644
Project: Firebird Core
Issue Type: Bug
Reporter: Pavel Zotov
Attachments: security-context-error-and-no-such-file-error.zip
LI-T6.3.0.31394 Firebird 3.0 Beta 1, SuperServer.
DDL:
====
DDL:
-- create database 'tmpins.fdb' page_size 8192; commit;
-- than quit + gfix -w async ./tmpins.fdb + connect again
recreate table t(id int primary key using index t_id_pk);
commit;
set term ^;
execute block as
begin
begin execute statement 'create sequence g'; when any do begin end end
end
^set term ;^
commit;
alter sequence g restart with 0;
commit;
recreate table tlog(
att int default current_connection,
dts_beg timestamp,
dts_end timestamp,
elapsed_ms computed by ( datediff(millisecond from dts_beg to dts_end) )
);
commit;
recreate exception ex_done 'job has been completed';
commit;
SQL script for each session:
======================
-- file = 'ins_mul_run.sql'
select current_timestamp as dts_start from rdb$database;
set term ^;
execute block
as
declare n_minutes int = 20;
declare i int;
declare n_packet int = 10000;
declare tb timestamp;
declare t0 timestamp;
declare t1 timestamp;
begin
tb='now';
while (1=1) do begin
i=0;
t0='now';
------------------
in autonomous transaction do
while( i < n_packet)
do insert into t(id) values( gen_id(g, 1) ) returning :i+1 into i;
------------------
t1='now';
in autonomous transaction do
insert into tlog(dts_beg, dts_end) values( :t0, :t1 );
if ( datediff( minute from :tb to :t1 ) > n_minutes ) then
exception ex_done;
end
end
^
set term ;^
commit;
show sequence g;
select current_timestamp as dts_finish from rdb$database;
Batch file for launching ISQLs (with number = 1st argument):
==================
set fbc=C:\1Install\FIREBIRD_2_5\bin
set host=192.168.0.220
set port=3333
set dbnm=/var/db/fb30/tmpins.fdb
@rem path where temp logs will be created:
set tmpdir=c:\temp\ins_mul
md %tmpdir% 2>nul
del %tmpdir%\ins_mul_run_*.log 2>nul
del %tmpdir%\ins_mul_run_*.err 2>nul
if not .%1.==.. set /a winq=%1
if .%winq%.==.0. set winq=10
@echo %time% Recreating DB objects. . .
%fbc%\isql %host%/%port%:%dbnm% -nod -n -i ins_mul_ddl.sql
@echo %time% Done. Now open %winq% sessions. . .
@echo off
for /l %%i in (1, 1, %winq%) do (
set str=%fbc%\isql %host%/%port%:%dbnm% -nod -n -i ins_mul_run.sql
1^>%tmpdir%\ins_mul_run_%%i.log 2^>%tmpdir%\ins_mul_run_%%i.err
@rem echo str = !str!
start /min cmd /c !str!
)
goto end
:end
Test:
====
c:\...> test_ins.bat 100
The following errors *can* (rarely) appear in trace for this test:
2014-11-20T17:31:17.3780 (11984:0x7f31fb952b40) ERROR AT
JProvider::attachDatabase
/var/db/fb30/tmpins.fdb (ATT_0, SYSDBA, NONE, TCPv4:192.168.0.201)
C:\1Install\FIREBIRD_2_5\bin\isql.exe:11512
335545060 : Missing security context for /var/db/fb30/tmpins.fdb
And:
2014-11-20T17:31:19.3440 (11984:0x7f30af975d90) ERROR AT
JProvider::attachDatabase
/var/db/fb30/tmpins.fdb (ATT_0, SYSDBA, NONE, TCPv4:192.168.0.201)
C:\1Install\FIREBIRD_2_5\bin\isql.exe:7500
335544344 : I/O error during "open" operation for file "/var/db/fb30/tmpins.fdb"
335544734 : Error while trying to open file
2 : No such file or directory
After Alex suggestion I've change jrd/Mapping.cpp and specified there:
#define MAP_DEBUG(A) A
Than I run FB as application and redirected its output to file - see attach.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel