Skip to content

[BUG] Memory leak in master ProcessManager #60049

Closed

Description

@pprkut

Description
We updated our infrastructure from 3002.6 to 3003 and observed a rather severe memory leak in the ProcessManager of the salt master. We have both OSS and SSE masters and could observe the same behavior on all of them.

Steps to Reproduce the behavior
Issue is repeatable here and immediately visible after restarting salt-master (trend is visible after 5-15 minutes)

Screenshots
Screenshot_20210419_090141

Versions Report

salt --versions-report
Salt Version:
          Salt: 3003

Dependency Versions:
          cffi: 1.14.1
      cherrypy: unknown
      dateutil: Not Installed
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 2.11.1
       libgit2: 1.0.1
      M2Crypto: 0.35.2
          Mako: Not Installed
       msgpack: 0.6.2
  msgpack-pure: Not Installed
  mysql-python: 1.3.12
     pycparser: 2.14
      pycrypto: Not Installed
  pycryptodome: 3.10.1
        pygit2: 1.2.1
        Python: 3.6.8 (default, Nov 16 2020, 16:55:22)
  python-gnupg: Not Installed
        PyYAML: 3.13
         PyZMQ: 17.0.0
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.1.4

Salt Extensions:
        sseape: 8.3.0+4

System Versions:
          dist: centos 7 Core
        locale: UTF-8
       machine: x86_64
       release: 3.10.0-1127.19.1.el7.x86_64
        system: Linux
       version: CentOS Linux 7 Core

Activity

  1. added
    bug
    on Apr 19, 2021
  2. added
    Core
    Regression
    severity-high
    and removed on Apr 19, 2021
  3. OrangeDog commented on Apr 19, 2021

    @OrangeDog
    Contributor

    Further details would probably be useful. Heap dump, config files, what the minions are doing.

  4. added this to the Approved milestone on Apr 19, 2021
  5. pprkut commented on Apr 19, 2021

    @pprkut
    ContributorAuthor

    I had to downgrade the server to 3002 again because it ran out of RAM within a couple hours. I can temporarily upgrade again to debug some things, but then I need to know what I'd need to check for exactly, as we only have production systems where I can try that :-/

    From what I can tell there's no specific minion action that triggered this. Memory increase happened when the system was essentially in neutral. We check once an hour on each minion whether the pillar rendered correctly, that's probably about the traffic that's going on.

    I'll add the master config in a separate comment.

  6. pprkut commented on Apr 19, 2021

    @pprkut
    ContributorAuthor
    /etc/salt/master.d/f_defaults.conf
    worker_threads: 10
    external_auth:
      pam:
        user1:
          - '.*'
          - '@runner'
          - '@wheel'
        user2:
          - '.*'
          - '@runner'
          - '@wheel'
        user3:
          - '.*'
          - '@runner'
          - '@wheel'
        jenkinsbot:
          - 'event.send'
    file_roots:
      base:
        - /srv/salt
    hash_type: "sha256"
    fileserver_backend:
      - git
      - roots
    gitfs_provider: "pygit2"
    gitfs_remotes:
        - ssh://[email protected]:7999/mms/saltstack-top.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-modules.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-grains.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-artifactory.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-systemd.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-crowd.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-curator.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-elasticsearch.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-epel.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-grafana.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-icinga2.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-incron.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-jenkins.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-jira.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-keepalived.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-kibana.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-letsencrypt.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-m2mobi.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-maxscale.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-network.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-nexus.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-packages.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-resque.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-reviewboard.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-bitbucket.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-telegraf.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-telegraf-m2mobi.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-mariadb.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-reactor-m2mobi.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-orchestrate-deploy.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-orchestrate-m2mobi.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-orchestrate-pkg.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-sonarqube.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-mattermost.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-matterbridge.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-percona.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-gradle.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-node.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-chronograf.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-pam.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-mounts.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-skel.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-rsyslog.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-users-m2mobi.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-cloud-init.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-git.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-teleport.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-androidsdk.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-raas.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-backup.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-kernel.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - ssh://[email protected]:7999/mms/saltstack-formula-banner.git:
          - pubkey: /root/.ssh/id_rsa.pub
          - privkey: /root/.ssh/id_rsa
        - https://github.com/M2Mobi/users-formula
        - https://github.com/M2Mobi/firewalld-formula.git
        - https://github.com/M2Mobi/selinux-formula.git
        - https://github.com/M2Mobi/openssh-formula.git
        - https://github.com/M2Mobi/vnstat-formula.git
        - https://github.com/M2Mobi/mysql-formula.git
        - https://github.com/M2Mobi/postfix-formula.git
        - https://github.com/M2Mobi/nginx-formula.git
        - https://github.com/M2Mobi/redis-formula.git
        - https://github.com/M2Mobi/php-formula.git
        - https://github.com/M2Mobi/logrotate-formula
        - https://github.com/M2Mobi/vim-formula.git
        - https://github.com/M2Mobi/timezone-formula
        - https://github.com/M2Mobi/newrelic-formula.git
        - https://github.com/M2Mobi/sysctl-formula.git
        - https://github.com/M2Mobi/influxdb-formula.git
        - https://github.com/M2Mobi/salt-formula.git
        - https://github.com/M2Mobi/logstash-formula.git
        - https://github.com/M2Mobi/filebeat-formula.git
        - https://github.com/M2Mobi/apache-formula
        - https://github.com/M2Mobi/svn-formula
        - https://github.com/M2Mobi/nfs-formula.git
        - https://github.com/M2Mobi/cron-formula.git
        - https://github.com/M2Mobi/salt-teleport.git
        - https://github.com/saltstack-formulas/nano-formula.git
        - https://github.com/saltstack-formulas/postgres-formula.git
    pillar_roots:
      base:
        - /srv/pillar
    ext_pillar:
      - git:
        - ssh://[email protected]:7999/mms/saltstack-pillar-androidsdk.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-apache.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-artifactory.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-backup.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-banner.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-chronograf.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-cron.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-curator.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-elasticsearch.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-epel.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-filebeat.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-gradle.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-grafana.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-icinga2.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-influxdb.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-jenkins.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-keepalived.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-kernel.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-kibana.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-letsencrypt.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-logrotate.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-logstash.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-m2mobi.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-mariadb.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-matterbridge.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-mattermost.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-maxscale.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-mounts.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-network.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-newrelic.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-nfs.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-nginx.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-pam.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-percona.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-php.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-postfix.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-postgresql.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-raas.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-redis.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-rsyslog.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-salt.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-selinux.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-sonarqube.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-svn.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-sysctl.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-telegraf.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-teleport.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-timezone.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-users.git
        - ssh://[email protected]:7999/mms/saltstack-pillar-vim.git
    ext_pillar_first: true
    pillar_merge_lists: true
    git_pillar_provider: "pygit2"
    git_pillar_env: "base"
    git_pillar_global_lock: false
    git_pillar_pubkey: "/root/.ssh/id_rsa.pub"
    git_pillar_privkey: "/root/.ssh/id_rsa"
    pillar_cache: true
    peer:
      
      .*:
        
          - grains.get
        
          - m2mobi_icinga2.*
        
          - m2mobi_teleport.*
        
          - teleport.*
        
      
    log_level: "warning"
    log_level_logfile: "warning"
    log_granular_levels:
      
      salt: warning
      
      salt.utils.verify: debug
      
      tornado.access: debug
      
    rest_tornado:
      port: 8008
      address: 0.0.0.0
      debug: True
      ssl_crt: /etc/letsencrypt/live/pepper.example.com/fullchain.pem
      ssl_key: /etc/letsencrypt/live/pepper.example.com/privkey.pem
      websockets: False
      cors_origin: '*'
    startup_states:
      sls
    sls_list:
      - epel
      - influxdb.pkgrepo
      - packages
      - salt.pkgrepo
      - salt.gitfs.pygit2
      - salt.minion
      - network.hosts
    git_pillar_update_interval:
      120
    gitfs_global_lock:
      false
    gitfs_update_interval:
      120
    
  7. modified the milestones: Approved, Silicon on Apr 19, 2021
  8. 47 remaining items

  9. added 2 commits that reference this issue on Jun 1, 2021
    c996074
    c7a627c
  10. unpinned this issue on Jun 1, 2021
  11. added 2 commits that reference this issue on Jun 4, 2021
    9304eaf
    de3ba36
  12. added 6 commits that reference this issue on Jun 8, 2021
    55c93db
    473c8e5
    42acf8e
    0f42040
    df545cc
    8756f24
  13. added a commit that references this issue on Jun 23, 2021
    90ed886
  14. added a commit that references this issue on Aug 10, 2021
    ba3d2c2
  15. added a commit that references this issue on Sep 23, 2021
    fb10707
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

AluminiumCoreRegressionZDbugneeds-more-infopoint-releaseseverity-high

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions