[ZBX-16216] A huge number of open semaphores (zabbix-agent) Created: 2019 Jun 05  Updated: 2024 Apr 10  Resolved: 2021 Jan 18

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 4.2.1, 4.2.2
Fix Version/s: 4.0.28rc1, 5.0.8rc1, 5.2.4rc1, 5.4.0alpha1, 5.4 (plan)

Type: Problem report Priority: Major
Reporter: Konstantin Assignee: Vladislavs Sokurenko
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Causes
caused by ZBX-17917 "vm.memory.size[available]" on Solar... Closed
caused by ZBXNEXT-6093 Modbus support for Agent1 Closed
Duplicate
duplicates ZBX-16218 zabbix_sender doesn't clean up its se... Closed
is duplicated by ZBX-19157 zabbix_sender方法消耗JVM信号量 Closed
Team: Team A
Team: Team A
Sprint: Sprint 72 (Jan 2021)
Story Points: 1

 Description   

Server: Oracle Solaris 11.4 SPARC

Zabbix agent 4.0.5
root@titan1:/# ipcs -sb | grep zabbix | wc -l
1

Zabbix-agent 4.2.1 / 4.2.2
root@cis-check:/# ipcs -sb | grep zabbix | wc -l
2767



 Comments   
Comment by Arturs Lontons [ 2019 Jun 05 ]

Hi,
Is there anything that could be killing the agent process? Anything regarding this in var/log/messages?
What about UserParameters? An incorrectly defined UserParameter script could also cause such behavior.

Comment by Konstantin [ 2019 Jun 05 ]

In the zabbix-agent logs - clean.
After the zabbix-agent stops, the semaphores remain in place. On some servers, their number exceeds 5000.

UserParameter is used, but on version 4.0.x there is no such problem.
Now I roll back all agents from 4.2.2 to 4.0.8

Comment by richlv [ 2019 Jun 05 ]

Might be different, but a similar issue with sender: ZBX-16218 .

Comment by Konstantin [ 2019 Jun 06 ]

Yes. 100% is a similar problem!

Comment by Arturs Lontons [ 2019 Jun 07 ]

Likely related to ZBX-16218. I'll keep both of these issues open for now, at least until a potential fix for both of them is proposed.

Comment by Remko Catersels [ 2019 Jun 12 ]

It doesn't appear to happen with zabbix_agentd, at least not in my case:

root@c1:~# ipcs -s -u zabbix
Semaphores:
T           ID          KEY MODE        OWNER    GROUP
s       327688            0 --rw------- zabbix   zabbix

root@c1:~# service zabbix_agentd restart
Stopping zabbix_agentd.
Waiting for PIDS: 40674.
root@c1:~# service zabbix_agentd restart
Stopping zabbix_agentd.
Waiting for PIDS: 40724.
root@c1:~# service zabbix_agentd restart
Stopping zabbix_agentd.
Waiting for PIDS: 40754.
root@c1:~# service zabbix_agentd restart
Stopping zabbix_agentd.
Waiting for PIDS: 40784.
root@c1:~# ipcs -s -u zabbix
Semaphores:
T           ID          KEY MODE        OWNER    GROUP
s       589832            0 --rw------- zabbix   zabbix

This is on FreeBSD 11.2-RELEASE-p10 and Zabbix 4.2.1. Unfortunately 4.2.2 hasn't landed in the ports tree yet so I'm unable to test it.

I see ZBX-16218 has been closed with a "resolved" status. And this issue is apparently linked to ZBX-16128, is that a typo? That issue seems to be unrelated.

I don't mind if one of the two is closed, it's rather pointless to have two tickets reporting on the same issue.

Comment by Aleksandrs Petrovs-Gavrilovs [ 2019 Jun 14 ]

Hello sirdice,

Yes indeed it was a typo, updated to correct one, thanks for noticing!

kmenschikov It seems that issue is fixed in:

  • 4.2.4rc1 07391f7a9e7
  • 4.4.0alpha1 (master) b561d885e23

Please check when you have the opportunity.

Best Regards,
Aleksandrs

Comment by Aleksandrs Petrovs-Gavrilovs [ 2019 Jun 26 ]

Hello,

Have you had any success with re-checking? At the moment I will be closing the issue as duplicate, but let us know if the issue persists!

Best Regards,
Aleksandrs

Comment by Vladislavs Sokurenko [ 2021 Jan 12 ]

Fixed in:

  • pre-4.0.28rc1 77b896149e0
  • pre-5.0.8rc1 965f5d7310a
  • pre-5.2.4rc1 a7b60383f28
  • pre-5.4.0alpha1 (master) 6c50ea47a28
Generated at Fri Apr 19 13:29:50 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.