[ZBX-1402] Zabbix_server creates deadlocks in transactions Created: 2009 Dec 02  Updated: 2017 May 30  Resolved: 2011 Aug 20

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 1.6.7
Fix Version/s: 1.8.7, 1.9.5 (alpha)

Type: Incident report Priority: Major
Reporter: Gergely Czuczy Assignee: Unassigned
Resolution: Fixed Votes: 4
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

PostgreSQL 8.4, zabbix 1.6.7


Issue Links:
Duplicate
duplicates ZBX-3889 MySQL InnoDB deadlocks are not handle... Closed
duplicates ZBX-1401 Zabbix_server continues failed transa... Closed
is duplicated by ZBX-2897 Zabbix eats up MySQL server connections Closed

 Description   

Today I've noticed something strange in my logs, and digging it up I've found this in my database logs:

Dec 2 16:26:23 pgdb1 postgres[67695]: [2-1] ERROR: deadlock detected
Dec 2 16:26:23 pgdb1 postgres[67695]: [2-2] DETAIL: Process 67695 waits for ShareLock on transaction 586724714; blocked by process 67700.
Dec 2 16:26:23 pgdb1 postgres[67695]: [2-3] Process 67700 waits for ShareLock on transaction 586724679; blocked by process 67695.
Dec 2 16:26:23 pgdb1 postgres[67695]: [2-4] Process 67695: update ids set nextid=nextid+1 where nodeid=0 and table_name='events' and field_name='eventid'
Dec 2 16:26:23 pgdb1 postgres[67695]: [2-5] Process 67700: update triggers set value=0,lastchange=1259767486,error='' where triggerid=17086
Dec 2 16:26:23 pgdb1 postgres[67695]: [2-6] HINT: See server log for query details.
Dec 2 16:26:23 pgdb1 postgres[67695]: [2-7] STATEMENT: update ids set nextid=nextid+1 where nodeid=0 and table_name='events' and field_name='eventid'
Dec 2 16:26:23 pgdb1 postgres[67695]: [3-1] ERROR: current transaction is aborted, commands ignored until end of transaction block
Dec 2 16:26:23 pgdb1 postgres[67695]: [3-2] STATEMENT: select nextid from ids where nodeid=0 and table_name='events' and field_name='eventid'
Dec 2 16:26:23 pgdb1 postgres[67695]: [4-1] ERROR: current transaction is aborted, commands ignored until end of transaction block
Dec 2 16:26:23 pgdb1 postgres[67695]: [4-2] STATEMENT: select nextid from ids where nodeid=0 and table_name='events' and field_name='eventid'
Dec 2 16:26:23 pgdb1 postgres[67695]: [5-1] ERROR: current transaction is aborted, commands ignored until end of transaction block

Two processes of zabbix implied colliding locks, creating a deadlock by this. I know it's a nontrivial case with such a multithreaded daemon, but couldn't something be done to avoid such situations?



 Comments   
Comment by Sergey Syreskin [ 2011 Jun 14 ]

I have encountered the same problem. A bit more detailed description in Russian is here http://www.zabbix.com/forum/showpost.php?p=86088&postcount=30
Is it ever going to be fixed after two years from been reported?

Comment by Alexander Vladishev [ 2011 Aug 20 ]

Fixed in ZBX-3889 in the version per1.8.7, r21259

Generated at Fri Apr 26 11:59:21 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.