"record disappeared (186), file: vio.cpp line: 408" + CPU 100%  (when 
bugcheckabort=1 and sweep starts at gap ~21000)
---------------------------------------------------------------------------------------------------------------------

                 Key: CORE-3921
                 URL: http://tracker.firebirdsql.org/browse/CORE-3921
             Project: Firebird Core
          Issue Type: Bug
          Components: Engine
            Reporter: Pavel Zotov
         Attachments: trace_sweep_vio_error.zip

Intro: create database 't0.fdb'; commit; quit;
####

session #1
##########
C:\1INSTALL\FIREBIRD\Data>isql localhost:C:\1INSTALL\FIREBIRD\Data\t0.fdb -n
Database:  localhost:C:\1INSTALL\FIREBIRD\Data\t0.fdb
SQL> recreate table tfix1(id int primary key, s01 varchar(1000));
SQL> recreate table tfix2(id int primary key, s01 varchar(1000));
SQL> commit;
SQL> insert into tfix1 values(-1,'tfix1');
SQL> insert into tfix2 values(-2,'tfix2');
SQL> commit;
SQL>
SQL> set transaction read committed;
SQL> set term ^;
SQL> execute block as
CON>   declare n int = 200000;
CON>   declare k int;
CON> begin
CON>   while (n>0) do begin
CON>     --insert into ttmp(id,s01) values(:n, rpad('',1000,'x'));
CON>     insert into tfix1(id,s01) values(:n, rpad('',1000,'x'));
CON>     insert into tfix2(id,s01) values(:n, rpad('',1000,'x'));
CON>     n=n-1;
CON>   end
CON> end^
SQL> set term ;^

session #2 // start it after execute block in session #1 has finished
##########
commit;
set transaction read committed;
set term ^;
execute block as
  declare n int = 21000;
  declare k int;
begin
  while (n>0) do begin
    in autonomous transaction do select 1 from rdb$database into :k;
    n=n-1;
  end
end^
set term ;^
commit;

session #1 // switch in it only after EB in session #2 has finished
##########
rollback;

/* at this point we have:
Database "T0.FDB"
Database header page information:
<...>
        Page size               4096
        ODS version             11.2
        Oldest transaction      5
        Oldest active           6
        Oldest snapshot         6
        Next transaction        21008
<...>
        Database dialect        3
        Creation date           Sep 11, 2012 8:09:28
        Attributes              force write

    Variable header data:
        *END*
*/

session #3
##########
Start  user trace with the following config file:
<database %[\\/]((t0|t1|t2).fdb)|(test001)>
  enabled true
  log_connections true
  log_transactions true

  log_statement_prepare true
  log_statement_free true

  log_statement_start true
  log_statement_finish true

#  log_trigger_start true
  log_trigger_finish true

  log_blr_requests true

  log_errors true  
  log_sweep true # <<<<<<<<<<<<<<  ENABLE sweep info to be logged 
<<<<<<<<<<<<<<<

  print_perf true
  print_blr true

  time_threshold 0
  max_sql_length 4000
  max_blr_length 1000
  max_dyn_length 1000
  max_log_size 0
  #log_procedure_finish true
</database>

session #1
#########
update tfix2 set s01='' where id<0; -- стартует sweep, в трейсе по нему 
появляется туча сообщений 


session #2
#########
SQL> select count(*) from tfix1;

       COUNT
============
           1

After this point I got standard 'critical error windows' on my Windows-2000 
machine (fb_inet_server.exe  - The application has requested the Runtime to 
terminate it in an unusial way).
Trace window has been stopped (like if I press Ctrl-C in it) and the following 
messages appeared in firebird.log:

BALAHA  Tue Sep 11 08:25:40 2012
        Sweep is started by SWEEPER
        Database "C:\1INSTALL\FIREBIRD\DATA\T0.FDB" 
        OIT 5, OAT 6, OST 6, Next 21009


BALAHA  Tue Sep 11 08:25:50 2012
        Database: C:\1INSTALL\FIREBIRD\DATA\T0.FDB
        internal Firebird consistency check (record disappeared (186), file: 
vio.cpp line: 408)


BALAHA (Client) Tue Sep 11 08:26:11 2012
        XNET error: Server shutdown detected

No any actions could be done in both the sessions #1 and 2:
SQL> select count(*) from tfix1;
Statement failed, SQLSTATE = 08006
Unable to complete network request to host "localhost".
-Error writing data to the connection.

Trace text has been attached in ZIP.

-- 
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

       

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to