Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Memory leak via gpg-agent process #67207

Open
OrangeDog opened this issue Jan 28, 2025 · 0 comments
Open

[BUG] Memory leak via gpg-agent process #67207

OrangeDog opened this issue Jan 28, 2025 · 0 comments
Labels
Bug broken, incorrect, or confusing behavior needs-triage

Comments

@OrangeDog
Copy link
Contributor

OrangeDog commented Jan 28, 2025

Description
Memory usage of the Salt master's gpg-agent process grows constantly until eventual exhaustion.

pidstat -r -p $(pgrep gpg-agent) 60
12:05:28      UID       PID  minflt/s  majflt/s     VSZ     RSS   %MEM  Command
12:06:28        0   2933164    183.27      0.00  231784   12332   0.21  gpg-agent
12:07:28        0   2933164    148.23      0.00  231784   12460   0.21  gpg-agent
12:08:28        0   2933164      0.00      0.00  231784   12460   0.21  gpg-agent
12:09:28        0   2933164      0.00      0.00  231784   12460   0.21  gpg-agent
12:10:28        0   2933164      6.17      0.00  231784   12460   0.21  gpg-agent
12:11:28        0   2933164    257.37      0.00  231784   12844   0.22  gpg-agent
12:12:28        0   2933164      0.00      0.00  231784   12844   0.22  gpg-agent
12:13:28        0   2933164      0.00      0.00  231784   12844   0.22  gpg-agent
12:14:28        0   2933164     45.28      0.00  231784   12972   0.22  gpg-agent
12:15:28        0   2933164     16.47      0.00  231784   12972   0.22  gpg-agent
12:16:28        0   2933164    131.77      0.00  231784   13228   0.22  gpg-agent
12:17:28        0   2933164     22.63      0.00  231784   13228   0.22  gpg-agent
12:18:28        0   2933164      0.00      0.00  231784   13228   0.22  gpg-agent
12:19:28        0   2933164      0.00      0.00  231784   13228   0.22  gpg-agent
12:20:28        0   2933164     32.97      0.00  231784   13228   0.22  gpg-agent
12:21:28        0   2933164    160.62      0.00  231784   13484   0.23  gpg-agent
12:22:28        0   2933164    260.13      0.00  231784   13740   0.23  gpg-agent
...
17:47:28        0   2933164    162.05      0.00  231784   39340   0.67  gpg-agent
17:48:28        0   2933164    236.98      0.00  231784   39852   0.68  gpg-agent
17:49:28        0   2933164      0.00      0.00  231784   39852   0.68  gpg-agent
17:50:28        0   2933164     22.30      0.00  231784   39852   0.68  gpg-agent
17:51:28        0   2933164     16.18      0.00  231784   39852   0.68  gpg-agent
17:52:28        0   2933164    254.08      0.00  231784   40108   0.68  gpg-agent
17:53:28        0   2933164      0.00      0.00  231784   40108   0.68  gpg-agent
17:54:28        0   2933164      0.00      0.00  231784   40108   0.68  gpg-agent
17:55:28        0   2933164     23.03      0.00  231784   40108   0.68  gpg-agent
17:56:28        0   2933164     23.03      0.00  231784   40108   0.68  gpg-agent
17:57:28        0   2933164    150.62      0.00  231784   40364   0.69  gpg-agent
17:58:28        0   2933164     23.03      0.00  231784   40364   0.69  gpg-agent
17:59:28        0   2933164      0.00      0.00  231784   40364   0.69  gpg-agent
...
09:08:28        0   2933164      0.00      0.00  231784  113964   1.93  gpg-agent
09:09:28        0   2933164     29.30      0.00  231784  114092   1.94  gpg-agent
09:10:28        0   2933164      0.00      0.00  231784  114092   1.94  gpg-agent
09:11:28        0   2933164      0.00      0.00  231784  114092   1.94  gpg-agent
09:12:28        0   2933164     23.02      0.00  231784  114092   1.94  gpg-agent
09:13:28        0   2933164    150.63      0.00  231784  114220   1.94  gpg-agent
09:14:28        0   2933164      0.00      0.00  231784  114220   1.94  gpg-agent
09:15:28        0   2933164      0.00      0.00  231784  114220   1.94  gpg-agent
09:16:28        0   2933164     39.77      0.00  231784  114476   1.94  gpg-agent
09:17:28        0   2933164    244.78      0.00  231784  114604   1.95  gpg-agent
09:18:28        0   2933164     75.28      0.00  231784  114860   1.95  gpg-agent
09:19:28        0   2933164     75.33      0.00  231784  114860   1.95  gpg-agent
09:20:28        0   2933164     23.02      0.00  231784  114860   1.95  gpg-agent
09:21:28        0   2933164     16.73      0.00  231784  114860   1.95  gpg-agent
09:22:28        0   2933164    108.80      0.00  231784  115116   1.95  gpg-agent
09:23:28        0   2933164    152.75      0.00  231784  115372   1.96  gpg-agent
... days later ...
09:59:09        0   2933164     46.73      0.10  960876  702124  11.92  gpg-agent
10:00:09        0   2933164      0.00      0.00  960876  701996  11.92  gpg-agent
10:01:09        0   2933164    281.82      0.05  960876  703276  11.94  gpg-agent
10:02:09        0   2933164      7.87      0.05  960876  703532  11.94  gpg-agent
10:03:09        0   2933164    327.27     71.05  960876  703916  11.95  gpg-agent
10:04:09        0   2933164     67.12      0.10  960876  703020  11.93  gpg-agent
10:05:09        0   2933164      0.00      0.00  960876  703020  11.93  gpg-agent
10:06:09        0   2933164      0.00      0.00  960876  703020  11.93  gpg-agent
10:07:09        0   2933164     53.40      0.10  960876  703660  11.94  gpg-agent
10:08:09        0   2933164    177.02      0.00  960876  703660  11.94  gpg-agent
10:09:09        0   2933164     15.62      0.00  960876  702892  11.93  gpg-agent
10:10:09        0   2933164     19.72      0.05  960876  703916  11.95  gpg-agent
10:11:09        0   2933164    174.45      0.05  960876  704172  11.95  gpg-agent

Setup
git_pillar is configured, with git_pillar_update_interval: 300
Various pillars use the gpg renderer. All other related settings are default.

Steps to Reproduce the behavior
Run the system with some encrypted pillar data and a handful of minions running highstates every 15 minutes.

Expected behavior
Memory usage should plateau once everything has started up.

Versions Report

salt --versions-report
Salt Version:
          Salt: 3006.9

Python Version:
        Python: 3.10.14 (main, Jun 26 2024, 11:44:37) [GCC 11.2.0]

Dependency Versions:
          cffi: 1.17.1
      cherrypy: unknown
  cryptography: 42.0.5
      dateutil: 2.8.1
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.1.4
       libgit2: 1.7.2
  looseversion: 1.0.2
      M2Crypto: 0.38.0
          Mako: Not Installed
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 22.0
     pycparser: 2.21
      pycrypto: Not Installed
  pycryptodome: 3.19.1
        pygit2: 1.14.1
  python-gnupg: 0.4.8
        PyYAML: 6.0.1
         PyZMQ: 23.2.0
        relenv: 0.17.0
         smmap: Not Installed
       timelib: 0.2.4
       Tornado: 4.5.3
           ZMQ: 4.3.4

System Versions:
          dist: ubuntu 24.04.1 noble
        locale: utf-8
       machine: x86_64
       release: 6.8.0-51-generic
        system: Linux
       version: Ubuntu 24.04.1 noble
Package: gpg-agent
Version: 2.4.4-2ubuntu17
@OrangeDog OrangeDog added Bug broken, incorrect, or confusing behavior needs-triage labels Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior needs-triage
Projects
None yet
Development

No branches or pull requests

1 participant