[ZBX-12186] still failed transactions rollback on DB2 backend Created: 2017 May 16  Updated: 2024 Apr 10  Resolved: 2017 Sep 11

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 3.0.9
Fix Version/s: 3.0.11rc1, 3.2.8rc1, 3.4.2rc1, 4.0.0alpha1, 4.0 (plan)

Type: Problem report Priority: Blocker
Reporter: Oleksii Zagorskyi Assignee: Vjaceslavs Bogdanovs
Resolution: Fixed Votes: 1
Labels: db2, postgres, transaction
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
Team: Team C
Sprint: Sprint 8, Sprint 10, Sprint 11, Sprint 12, Sprint 13, Sprint 15, Sprint 16
Story Points: 3

 Description   

Zabbix is on 3.0.9 now, so it includes fixes from ZBX-11765 and ZBX-11703 but corresponding errors are still there.
More technical details are in comments.



 Comments   
Comment by Rostislav Palivoda [ 2017 May 18 ]

Closing the issue. If anything else required from DEV team please reopen.

Comment by Oleksii Zagorskyi [ 2017 Jul 19 ]

Maybe ZBX-11782 should be considered when making decision how to resolve it.

Comment by Glebs Ivanovskis (Inactive) [ 2017 Aug 30 ]

Successfully tested.

Comment by Oleksii Zagorskyi [ 2017 Oct 23 ]

It happened again on 3.0.11:

  2733:20171023:101921.805 slow query: 7.182849 sec, "update item_discovery set lastcheck=1508743154 where (itemid between 37696 and 37702 or itemid between 37716 and 37722 or itemid between 89680 and 89685 or itemid between 89688 and 89693 or itemid in (37684,37685,37687,37689,37690,37692,37694,37704,37705,37707,37709,37710,37712,37714));
"
  2731:20171023:101921.811 [Z3005] query failed: [-911] 40001 [IBM][CLI Driver][DB2/LINUXX8664] SQL0911N  The current transaction has been rolled back because of a deadlock or timeout.  Reason code "2".  SQLSTATE=40001 [update item_discovery set ts_delete=1508829250 where itemid=115481;
update item_discovery set ts_delete=1508829250 where itemid=115484;
update item_discovery set ts_delete=1508829250 where itemid=115485;
update item_discovery set ts_delete=1508829250 where itemid=115486;
update item_discovery set ts_delete=1508829250 where itemid=115488;
update item_discovery set ts_delete=1508829250 where itemid=115508;
update item_discovery set ts_delete=1508829250 where itemid=115515;
update item_discovery set ts_delete=1508829250 where itemid=115530;
update item_discovery set ts_delete=1508829250 where itemid=117122;
update item_discovery set ts_delete=1508829250 where itemid=117520;
update item_discovery set ts_delete=1508829250 where itemid=117669;
update item_discovery set ts_delete=1508829250 where itemid=121310;
update item_discovery set ts_delete=1508829250 where itemid=123005;
update item_discovery set ts_delete=1508829250 where itemid=123442;
update item_discovery set ts_delete=1508829250 where itemid=123447;
update item_discovery set ts_delete=1508829250 where itemid=123452;
update item_discovery set ts_delete=1508829250 where itemid=123463;
update item_discovery set ts_delete=1508829250 where itemid=123550;
update item_discovery set ts_delete=1508829250 where itemid=123628;
update item_discovery set ts_delete=1508829250 where itemid=123636;
update item_discovery set lastcheck=1508743154 where (itemid between 124078 and 124082 or itemid in (103615,115260,115382,115630,115780,115871,115892,115945,115948,115949,116080,116480,116481,116716,116911,116949,117311,117322,117586,118425,118974,119041,119061,119093,119114,119210,119587,119750,119869,119884,119970,120048,120275,120309,120392,120685,120794,120886,120961,120971,121004,121010,121013,121034,121036,121052,122107,122110,122129,122142,122911,122984,123451,123626,123647,123769,124002,124044,124046,124049,124053,124055,124064,124065,124066,124068,124069,124072,124075,124076));
]
  2731:20171023:101921.811 slow query: 7.188031 sec, "update item_discovery set ts_delete=1508829250 where itemid=115481;
update item_discovery set ts_delete=1508829250 where itemid=115484;
update item_discovery set ts_delete=1508829250 where itemid=115485;
update item_discovery set ts_delete=1508829250 where itemid=115486;
update item_discovery set ts_delete=1508829250 where itemid=115488;
update item_discovery set ts_delete=1508829250 where itemid=115508;
update item_discovery set ts_delete=1508829250 where itemid=115515;
update item_discovery set ts_delete=1508829250 where itemid=115530;
update item_discovery set ts_delete=1508829250 where itemid=117122;
update item_discovery set ts_delete=1508829250 where itemid=117520;
update item_discovery set ts_delete=1508829250 where itemid=117669;
update item_discovery set ts_delete=1508829250 where itemid=121310;
update item_discovery set ts_delete=1508829250 where itemid=123005;
update item_discovery set ts_delete=1508829250 where itemid=123442;
update item_discovery set ts_delete=1508829250 where itemid=123447;
update item_discovery set ts_delete=1508829250 where itemid=123452;
update item_discovery set ts_delete=1508829250 where itemid=123463;
update item_discovery set ts_delete=1508829250 where itemid=123550;
update item_discovery set ts_delete=1508829250 where itemid=123628;
update item_discovery set ts_delete=1508829250 where itemid=123636;
update item_discovery set lastcheck=1508743154 where (itemid between 124078 and 124082 or itemid in (103615,115260,115382,115630,115780,115871,115892,115945,115948,115949,116080,116480,116481,116716,116911,116949,117311,117322,117586,118425,118974,119041,119061,119093,119114,119210,119587,119750,119869,119884,119970,120048,120275,120309,120392,120685,120794,120886,120961,120971,121004,121010,121013,121034,121036,121052,122107,122110,122129,122142,122911,122984,123451,123626,123647,123769,124002,124044,124046,124049,124053,124055,124064,124065,124066,124068,124069,124072,124075,124076));
"
  2731:20171023:101921.817 [Z3005] query failed: [-880] 3B001 [IBM][CLI Driver][DB2/LINUXX8664] SQL0880N  SAVEPOINT "ZBX_BEGIN_SAVEPOINT" does not exist or is invalid in this context.  SQLSTATE=3B001 [rollback to savepoint zbx_begin_savepoint;]
  2731:20171023:101921.818 [Z3005] query failed: [-880] 3B001 [IBM][CLI Driver][DB2/LINUXX8664] SQL0880N  SAVEPOINT "ZBX_BEGIN_SAVEPOINT" does not exist or is invalid in this context.  SQLSTATE=3B001 [rollback to savepoint zbx_begin_savepoint;]
... repeated many times
... SIGTERM
  2499:20171023:102327.181 syncing trends data done
  2499:20171023:102327.213 Zabbix Server stopped. Zabbix 3.0.11 (revision 72883).

full log may be provided on request.

Should I reopen this one or open a new ZBX ?

Comment by Vjaceslavs Bogdanovs [ 2017 Oct 23 ]

I propose to open a new ZBX, but link this ticket to a new one.

There are multiple questions related to the provided log:

  1. 7.182849 sec to update less than 50 records in DB. This does not seem right. Is this a common case for this installation?
  2. Are there any indications of parallel discovery rule processing (log entries "cannot process discovery rule "xxx": another value is being processed")?
  3. Could there be some other applications working with DB at the same time as Zabbix?

zalex_ua reported as ZBX-12925. These questions will answered there.

Generated at Fri Apr 26 22:08:01 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.