saltstack / saltstack/salt

Dead child does not get reapped, relaunched

Open
#54,129 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Confirmed Core severity-high
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description of Issue

When the grandchild of the main salt-minion process dies for some reason, its parent does not reap it, leaving it zombie, and not relaunching it. Also, the minion stops responding to ping.

Steps to Reproduce Issue
# ps faux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
[...]
root      8481  0.0  0.2 314152 22124 ?        Ss   11:43   0:00 /usr/bin/python /usr/bin/salt-minion
root      8487  0.1  0.5 630420 44692 ?        Sl   11:43   0:11  \_ /usr/bin/python /usr/bin/salt-minion
root      8491  0.0  0.2 404020 20824 ?        S    11:43   0:00      \_ /usr/bin/python /usr/bin/salt-minion

Picked the last one, killed it:

# kill 8491
# ps faux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
[...]
root      8481  0.0  0.2 314152 22124 ?        Ss   11:43   0:00 /usr/bin/python /usr/bin/salt-minion
root      8487  0.1  0.5 630420 44692 ?        Sl   11:43   0:12  \_ /usr/bin/python /usr/bin/salt-minion
root      8491  0.0  0.0      0     0 ?        Z    11:43   0:00      \_ [salt-minion] <defunct>
Versions Report (all nodes)
Salt Version:
           Salt: 2019.2.0
 
Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.7.2
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.5.6
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.5 (default, Aug  4 2017, 00:39:18)
   python-gnupg: Not Installed
         PyYAML: 3.10
          PyZMQ: 14.3.1
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 3.2.5
 
System Versions:
           dist: centos 7.4.1708 Core
         locale: UTF-8
        machine: x86_64
        release: 3.10.0-693.el7.x86_64
         system: Linux
        version: CentOS Linux 7.4.1708 Core

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the salt-minion entry point and reproduce the process hierarchy described in the issue on Linux. Trace how the grandchild is supervised after termination; done means the child is reaped, a replacement is launched, and the minion responds to ping again.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, python
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.