[ZBX-25409] Media type tags processing race condition Created: 2024 Oct 17 Updated: 2025 Aug 26 Resolved: 2025 Aug 26 |
|
| Status: | Closed |
| Project: | ZABBIX BUGS AND ISSUES |
| Component/s: | Server (S) |
| Affects Version/s: | 6.4.18 |
| Fix Version/s: | None |
| Type: | Problem report | Priority: | Trivial |
| Reporter: | Aleksandr Khudushin | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Description |
|
We use custom Zabbix media type to integrate it's events with external alerting system. From time to time Zabbix generates many events with zero duration (event start = event end). When Zabbix starts to process these events, it executes 2 actions:
As far as I can see, actions are being executed with ~3 seconds interval. It happens with <1% of events. But it happens. Steps to reproduce:
Result: |
| Comments |
| Comment by Kamil Florowski (Inactive) [ 2024 Oct 25 ] |
|
Hi akhudushin , Have you enabled verbose logging in Zabbix server (setting debug level to 4 or 5)? This might give us more insight into the sequence of operations and where the breakdown is occurring. Please, share captured logs. Thanks |
| Comment by Aleksandr Khudushin [ 2024 Oct 28 ] |
|
Dear Kamil, Thank you for response! Prerequisites for reproducing the problem:
I've switched Zabbix to DebugLevel=4 and captured logs for your request using above components: You can search log for phrase: [ RACE CONDITION TEST ] ERROR: Ticket ID is missing |
| Comment by Kamil Florowski (Inactive) [ 2024 Oct 28 ] |
|
Thanks for the above. Did you have a chance to verify whether the issue occurs also in Zabbix version 7? |
| Comment by Aleksandr Khudushin [ 2024 Oct 29 ] |
|
Kamil, No, we haven't migrated to 7 yet. |
| Comment by Kamil Florowski (Inactive) [ 2024 Oct 29 ] |
|
Hi, Seems like the potential race condition could be excluded during notification processing. What do you think? |
| Comment by Aleksandr Khudushin [ 2024 Oct 29 ] |
|
Kamil, I can't find any good way to do that. Webhook's input parameters are static and doesn't change during webhook's processing. Moreover they don't change during subsequent processing attempts. I've tried to raise attempts and attempt interval in media type settings - no effect. Request the same event from within webhook's script through Zabbix API seems like bad workaround IMO. |
| Comment by Aleksandr Khudushin [ 2024 Dec 28 ] |
|
Greetings Kamil! Any update on this? |
| Comment by Edgars Melveris [ 2025 Jun 25 ] |
|
It looks to me like the main problem is that your script has not yet returned the external system ID when Zabbix tries to close the problem. Also - you should investigate why you have problems with 0 duration and probably fix those. |