-
Incident report
-
Resolution: Cannot Reproduce
-
Major
-
None
-
3.4.12
Steps to reproduce:
I've created the following trigger:
({System test template:proc_info[xxxx.exe,wkset,avg].avg(5)}) +
({System test template:proc_info[xxxx.exe,wkset,avg].avg(5)}) + ({System test template:proc_info[xxxx.exe,wkset,avg].avg(5)}) + ({System test template:proc_info[xxxx.exewkset,avg].avg(5)}) > 409600 and {System test template:system.run[wmic datafile where name="C:\\Program Files\\xxxx\\xxxx.exe" get Version /value].str()}=0
which caused a deadlock.
**Result:
The following error details appeared on the UI:
Cannot update trigger
Details * pg_query(): Query failed: ERROR: deadlock detected
- DETAIL: Process 20868 waits for ShareLock on transaction 117755409; blocked by process 7265.
- Process 7265 waits for ShareLock on transaction 117755327; blocked by process 20868.
- HINT: See server log for query details. [triggers.php:352 → CFrontendApiWrapper->update() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CTrigger->update() → CTriggerGeneral->inherit() → CTriggerGeneral->inheritOnHost() → CTriggerGeneral->updateReal() → DB::update() → DBexecute() → pg_query() in include/db.inc.php:483]
- Error in query [UPDATE triggers SET expression='({93316}) +
- ({93317}) + ({93318}) + ({93319}) > 409600 and {93320}=0',recovery_expression='' WHERE triggerid='47440'] [ERROR: deadlock detected
- DETAIL: Process 20868 waits for ShareLock on transaction 117755409; blocked by process 7265.
- Process 7265 waits for ShareLock on transaction 117755327; blocked by process 20868.
- HINT: See server log for query details.]
- SQL statement execution has failed "UPDATE triggers SET expression='({93316}) +
- ({93317}) + ({93318}) + ({93319}) > 409600 and {93320}=0',recovery_expression='' WHERE triggerid='47440'".
Zabbix log:
**Please let me know if you need any additional information.
Expected:
See screenshot....
See attached patch file...