Skip to content

[Bug]: Possible EventPublisher Memory Leak Persists in Salt 3008.3 — Increasing Memory Usage Eventually Crashes Salt Master #70589

Open

Description

@jeanmoussignac

What happened?

Salt Version: 3008.3
Operating System:** Amazon Linux 2023
Python Version:** 3.14.7
Component: Salt Master / EventPublisher
Related Issue: #69857

We are experiencing continuously increasing memory utilization on our Salt masters running version 3008.3, eventually leading to severe memory exhaustion and server instability or crashes.

According to the Salt 3008.3 release notes, the EventPublisher memory leak reported in issue #69857 was addressed in this release. However, we continue to observe similar behavior after upgrading to 3008.3.

Our environment consists of three Salt masters behind an AWS Network Load Balancer, managing minions.

Observed Behavior

  • Memory utilization continuously increases over time.
  • Memory consumption does not appear to return to normal levels.
  • Eventually, the server experiences memory exhaustion and crashes, OOM-Killer, or becomes unresponsive.
  • The issue persists while running Salt 3008.3.

Expected Behavior

Memory utilization should remain relatively stable during normal Salt master operations, and resources associated with disconnected event subscribers should be released appropriately.

Questions for the Community

  1. Has anyone experienced similar memory growth or potential EventPublisher memory leaks after upgrading to Salt 3008.3?
  2. Does the fix associated with issue [BUG] EventPublisher accumulates unix sockets on 3008.x  #69857 fully address the EventPublisher memory leak, or are there additional known scenarios that could still cause memory accumulation?
  3. Are there recommended debugging methods to identify retained objects, event subscribers, or other resources responsible for the increasing memory utilization?

Additional Information

We are currently investigating the issue and can provide process-level memory statistics, file descriptor counts, and Salt master debug logs to help isolate the cause.

Any guidance from the SaltStack maintainers or community would be greatly appreciated.

Type of salt install

Official rpm

Major version

3008.x

What supported OS are you seeing the problem on? Can select multiple. (If bug appears on an unsupported OS, please open a GitHub Discussion instead)

amazonlinux-2023

salt --versions-report output

Salt Version:
          Salt: 3008.3
 
Python Version:
        Python: 3.14.7 (main, Sep 30 2026, 03:35:11) [GCC 11.2.0]
 
Dependency Versions:
          cffi: 2.0.0
      cherrypy: 18.10.0
  cryptography: 50.0.1
      dateutil: 2.9.0.post0
     docker-py: Not Installed
         gitdb: 4.0.12
     gitpython: 3.2.0
        Jinja2: 3.1.6
       libgit2: 1.9.4
  looseversion: 1.3.0
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.2.1
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 24.0
     pycparser: 3.00
      pycrypto: Not Installed
  pycryptodome: 3.23.0
        pygit2: 1.19.3
  python-gnupg: 0.5.6
        PyYAML: 6.0.3
         PyZMQ: 27.1.0
        relenv: 0.22.27
         smmap: 5.0.2
       timelib: 0.3.0
       Tornado: 6.5.10
           ZMQ: 4.3.5
 
Salt Extensions:
 saltext.boto3: 1.2.0
 
Salt Package Information:
  Package Type: onedir
 
System Versions:
          dist: amzn 2023.12.20261026 
        locale: utf-8
       machine: x86_64
       release: 6.1.189-236.399.amzn2023.x86_64
        system: Linux
       version: Amazon Linux 2023.12.20261026

Activity

  1. added
    bug
    on Oct 28, 2026
  2. welcome commented on Oct 28, 2026

    @welcome

    Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here's some information that may help as you continue your Salt journey.
    Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

    There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
    If you have additional questions, email us at [email protected]. We're glad you've joined our community and look forward to doing awesome things with you!

  3. jeanmoussignac commented on Oct 28, 2026

    @jeanmoussignac
    Author
    2026-10-21T04:07:56+0000 [REDACTED-HOST] systemd[1]: salt-master.service: A process of this unit has been killed by the OOM killer.
    
    2026-10-21T04:07:58+0000 [REDACTED-HOST] salt-master[REDACTED-PID]: [WARNING ] Master received a SIGTERM. Exiting.
    
    2026-10-21T04:07:58+0000 [REDACTED-HOST] salt-master[REDACTED-PID]: The salt master is shutdown. Master received a SIGTERM. Exited.
    
    2026-10-21T04:07:58+0000 [REDACTED-HOST] salt-master[REDACTED-PID]: unclosed publish server <salt.transport.tcp.PublishServer object at 0x[REDACTED]>
    
    2026-10-21T04:07:58+0000 [REDACTED-HOST] salt-master[REDACTED-PID]: unclosed MasterMinion <salt.minion.MasterMinion object at 0x[REDACTED]>; call ``destroy()`` or use as a context manager
    
    2026-10-21T04:07:59+0000 [REDACTED-HOST] salt-master[REDACTED-PID]: unclosed MasterMinion <salt.minion.MasterMinion object at 0x[REDACTED]>; call ``destroy()`` or use as a context manager
    
    2026-10-21T04:07:59+0000 [REDACTED-HOST] salt-master[REDACTED-PID]: Task exception was never retrieved
    
    2026-10-21T04:07:59+0000 [REDACTED-HOST] salt-master[REDACTED-PID]: future: <Task finished name='Task-8' coro=<Master._run_with_heartbeat() done, defined at /opt/saltstack/salt/lib/python3.14/site-packages/salt/master.py:1270> exception=SystemExit(0)>
    
    2026-10-21T04:07:59+0000 [REDACTED-HOST] salt-master[REDACTED-PID]: Traceback (most recent call last):
      File "/opt/saltstack/salt/lib/python3.14/site-packages/salt/master.py", line 1287, in _run_with_heartbeat
        await self.process_manager.run(asynchronous=True)
    
      [Intermediate traceback frames omitted]
    
      File "/opt/saltstack/salt/lib/python3.14/site-packages/salt/cli/daemons.py", line 127, in _handle_signals
        super()._handle_signals(signum, sigframe)
    
      File "/opt/saltstack/salt/lib/python3.14/site-packages/salt/utils/parsers.py", line 1081, in _handle_signals
        self.shutdown(exitmsg=f"{msg} Exited.")
    
      File "/opt/saltstack/salt/lib/python3.14/site-packages/salt/cli/daemons.py", line 237, in shutdown
        super().shutdown(exitcode, exitmsg)
    
      File "/opt/saltstack/salt/lib/python3.14/site-packages/salt/utils/parsers.py", line 1084, in shutdown
        self.exit(exitcode, exitmsg)
    
      File "/opt/saltstack/salt/lib/python3.14/site-packages/salt/utils/parsers.py", line 278, in exit
        optparse.OptionParser.exit(self, status, msg)
    
      File "/opt/saltstack/salt/lib/python3.14/optparse.py", line 1549, in exit
        sys.exit(status)
    
    SystemExit: 0
    
    2026-10-21T04:07:59+0000 [REDACTED-HOST] systemd[1]: salt-master.service: Failed with result 'oom-kill'.
    
    2026-10-21T04:07:59+0000 [REDACTED-HOST] systemd[1]: salt-master.service: Consumed 1h 29min 28.243s CPU time.
    
  4. jeanmoussignac commented on Oct 28, 2026

    @jeanmoussignac
    Author

    On October 21, 2026, systemd reported that a process belonging to salt-master.service was killed by the OOM killer.

    During shutdown, Salt also reported unclosed PublishServer and MasterMinion objects, followed by an asynchronous task exception involving Master._run_with_heartbeat().

    Given the previously reported EventPublisher memory leak in issue #69857, we would like to determine whether this behavior indicates an unresolved resource leak in Salt 3008.3 or a separate issue, also help getting a fix.

  5. jeanmoussignac commented on Oct 28, 2026

    @jeanmoussignac
    Author

    The following kernel messages confirm that EventPublisher was using approximately 6 GiB of resident memory when the OOM killer terminated it.

    2026-10-21T04:07:58+0000 [REDACTED-HOST] kernel:
    oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),
    cpuset=splunkforwarder.service,mems_allowed=0,
    global_oom,
    task_memcg=/system.slice/salt-master.service,
    task=EventPublisher,pid=[REDACTED],uid=[REDACTED]

    2026-10-21T04:07:58+0000 [REDACTED-HOST] kernel:
    Out of memory: Killed process [REDACTED] (EventPublisher)
    total-vm:6892048kB, anon-rss:6338624kB,
    file-rss:0kB, shmem-rss:48kB,
    UID:[REDACTED] pgtables:12864kB oom_score_adj:0

    2026-10-21T04:07:58+0000 [REDACTED-HOST] salt-master[REDACTED]:
    [WARNING ] Master received a SIGTERM. Exiting.

    2026-10-21T04:07:58+0000 [REDACTED-HOST] salt-master[REDACTED]:
    unclosed publish server <salt.transport.tcp.PublishServer object at 0x[REDACTED]>

    2026-10-21T04:07:58+0000 [REDACTED-HOST] salt-master[REDACTED]:
    unclosed MasterMinion <salt.minion.MasterMinion object at 0x[REDACTED]>; call destroy() or use as a context manager

    2026-10-21T04:07:59+0000 [REDACTED-HOST] systemd[1]:
    salt-master.service: Failed with result 'oom-kill'.

  6. added this to the Argon v3008.7 milestone on Oct 28, 2026
  7. jeanmoussignac commented on Nov 11, 2026

    @jeanmoussignac
    Author

    Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions