Engine could freeze up to 2 minutes and raise deadlock error when updating RDB$INDICES if it contains backversions -------------------------------------------------------------------------------------------------------------------
Key: CORE-5522 URL: http://tracker.firebirdsql.org/browse/CORE-5522 Project: Firebird Core Issue Type: Bug Components: Engine Affects Versions: 2.5.7 Reporter: Vlad Khorsun Test case 1. create backversions in rdb$indices and make hard rollback to leave it on disk: delete from t_tx; insert into t_tx select 1 from rdb$types, rdb$types; insert into t_tx select 1 from rdb$types, rdb$types; update rdb$indices set rdb$index_inactive = -1; quit; 2. Try to set stats for all indices: update rdb$indices set rdb$index_inactive = -1; Statement failed, SQLSTATE = 40001 deadlock Call stack > fb_inet_server.exe!latch_bdb(tdbb=0x035cf4d4, type=LATCH_exclusive, > bdb=0x043a1478, page={...}, latch_wait=1) Line 5464 C++ fb_inet_server.exe!get_buffer(tdbb=0x035cf4d4, page={...}, latch=LATCH_exclusive, latch_wait=1) Line 4872 C++ fb_inet_server.exe!CCH_fetch_lock(tdbb=0x035cf4d4, window=0x044d8c10, lock_type=6, wait=1, page_type='') Line 889 C++ fb_inet_server.exe!CCH_FETCH_LOCK(tdbb=0x035cf4d4, window=0x044d8c10, lock_type=6, wait=1, page_type='') Line 91 C++ fb_inet_server.exe!CCH_handoff(tdbb=0x035cf4d4, window=0x044d8c10, page=85, lock=6, page_type='', latch_wait=1, release_tail=false) Line 1618 C++ fb_inet_server.exe!CCH_HANDOFF(tdbb=0x035cf4d4, window=0x044d8c10, page=85, lock=6, page_type='') Line 121 C++ fb_inet_server.exe!DPM_get(tdbb=0x035cf4d4, rpb=0x044d8bb8, lock_type=6) Line 1449 C++ fb_inet_server.exe!VIO_backout(tdbb=0x035cf4d4, rpb=0x044d8bb8, transaction=0x0338796c) Line 406 C++ fb_inet_server.exe!VIO_chase_record_version(tdbb=0x035cf4d4, rpb=0x044d8bb8, transaction=0x0338796c, pool=0x044d9ea0, writelock=false) Line 859 C++ fb_inet_server.exe!VIO_get(tdbb=0x035cf4d4, rpb=0x044d8bb8, transaction=0x0338796c, pool=0x044d9ea0) Line 1871 C++ fb_inet_server.exe!get_record(tdbb=0x035cf4d4, rsb=0x044d82ac, parent_rsb=0x044d824c, mode=RSE_get_forward) Line 1887 C++ fb_inet_server.exe!get_record(tdbb=0x035cf4d4, rsb=0x044d824c, parent_rsb=0x00000000, mode=RSE_get_forward) Line 2156 C++ fb_inet_server.exe!fetch_record(tdbb=0x035cf4d4, rsb=0x044d837c, n=0) Line 775 C++ fb_inet_server.exe!get_record(tdbb=0x035cf4d4, rsb=0x044d837c, parent_rsb=0x00000000, mode=RSE_get_forward) Line 2339 C++ fb_inet_server.exe!RSE_get_record(tdbb=0x035cf4d4, rsb=0x044d837c, mode=RSE_get_forward) Line 312 C++ fb_inet_server.exe!EXE_looper(tdbb=0x035cf4d4, request=0x044d8830, in_node=0x044da180) Line 1989 C++ fb_inet_server.exe!looper_seh(tdbb=0x035cf4d4, request=0x044d8830, node=0x044da180) Line 2917 C++ fb_inet_server.exe!execute_looper(tdbb=0x035cf4d4, request=0x044d8830, transaction=0x0338796c, node=0x044da180, next_state=req_proceed) Line 1369 C++ fb_inet_server.exe!EXE_send(tdbb=0x035cf4d4, request=0x044d8830, msg=0, length=32, buffer=0x035ce944) Line 971 C++ fb_inet_server.exe!MET_lookup_partner(tdbb=0x035cf4d4, relation=0x03385490, idx=0x035cea54, index_name=0x00000000) Line 3796 C++ fb_inet_server.exe!IDX_modify_flag_uk_modified(tdbb=0x035cf4d4, org_rpb=0x044cb9d8, new_rpb=0x044cba48, transaction=0x0441c008) Line 1699 C++ fb_inet_server.exe!VIO_modify(tdbb=0x035cf4d4, org_rpb=0x044cb9d8, new_rpb=0x044cba48, transaction=0x0441c008) Line 2509 C++ fb_inet_server.exe!modify(tdbb=0x035cf4d4, node=0x044cc3a0, which_trig=0) Line 3008 C++ fb_inet_server.exe!EXE_looper(tdbb=0x035cf4d4, request=0x044cb650, in_node=0x044cbf84) Line 2564 C++ -- 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 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel