[ZBX-15048] Zombie processes occur when stopping zabbix during startup Created: 2018 Oct 23  Updated: 2024 Apr 10  Resolved: 2018 Oct 23

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G), Proxy (P), Server (S)
Affects Version/s: 3.0.22, 3.4.14, 4.0.1rc1, 4.2.0alpha1
Fix Version/s: 4.0.1rc1, 4.2.0alpha1

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

Attachments: File retry_kill.diff    
Issue Links:
Duplicate
is duplicated by ZBX-15027 Proxy leaves hanging child processes ... Closed
Team: Team A
Sprint: Sprint 45
Story Points: 0

 Description   

It has been reported in ZBX-15023 as well as other places that when Zabbix server is stopped during startup due to configuration error or system error then there are zombie processes.
This happens because one of the child processes ignore kill signal from the main process.
Not killed process can lead to situation when zabbix cannot be restarted because old processes already hold some resources that new process needs and will need to be killed manually.

Possible reason:
Many historical implementations have timing windows where a signal sent to a process group (for example, an interactive SIGINT) just prior to or during execution of fork() is delivered to the parent following the fork() but not to the child because the fork() code clears the child's set of pending signals

Current suspicion is that when process is forked and killed at the same time then it might clear signal mask, it shall not be assumed that fork is atomic and main process shall retry sending kill signal to child processes if it takes more than one second to get response.
Example patch attached.



 Comments   
Comment by Vladislavs Sokurenko [ 2018 Oct 23 ]

Might be duplicate of:
ZBX-15027

Comment by Vladislavs Sokurenko [ 2018 Oct 23 ]

Closing as a duplicate

Generated at Sat Apr 27 04:03:54 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.