You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We applied the 3006.15 release to some Ubuntu 22.04 servers today and immediately the RAM usage of the salt-minion went from 1-2% to 80% until killed by the OOM killer.
Type of salt install
Official deb
Major version
3006.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)
ubuntu-22.04
salt --versions-report output
Not available as we downgraded as it took the servers offline
Reacted by b_b, Yann Masson, dermarzel, James Howe, Martin Emrich and jmar043213
I can certainly try. The server swaps heavily and basically is unresponsive as soon as the salt minion starts on the new version. What information do you need?
@dwoz I've recorded debug logs for each which I can share but they are from a production system and I'm not sure what might be sensitive in them. Is there some way I can get those to you securely?
transport isn't set in the config files, so I believe that means its using ZeroMQ transport.
2025-08-30T15:48:05.046190+02:00 master kernel: [ 3622.442825] Out of memory: Killed process 13930 (/opt/saltstack/) total-vm:2662040kB, anon-rss:2100548kB, file-rss:0kB, shmem-rss:8kB, UID:0 pgtables:4636kB oom_score_adj:0
2025-08-30 15:46:48,966 [salt.minion :2852][DEBUG ][13930] Minion of '192.168.0.101' is handling event tag 'fire_master'
2025-08-30 15:46:48,967 [salt.minion :2915][DEBUG ][13930] Forwarding event minion/upgrade/run/daily to master 192.168.0.101
2025-08-30 15:46:48,967 [salt.utils.event :821 ][DEBUG ][20024] Sending event: tag = __schedule_return; data = {'cmd': '_return', 'id': 'master', 'fun': 'event.send', 'fun_args': ['minion/upgrade/run/daily', {'queue': True}], 'schedule': 'upgrade_run_daily', 'jid': 'req', 'pid': 20024, 'return': True, 'retcode': 0, 'success': True, '_stamp': '2025-08-30T13:46:48.967563'}
2025-08-30 15:46:48,968 [salt.transport.ipc:360 ][DEBUG ][20024] Closing IPCMessageClient instance
2025-08-30 15:46:48,968 [salt.utils.schedule:963 ][DEBUG ][20024] schedule.handle_func: Removing /var/cache/salt/minion/proc/20250830134648901802
2025-08-30 15:46:48,970 [salt.minion :2852][DEBUG ][13930] Minion of '192.168.0.101' is handling event tag '__schedule_return'
2025-08-30 15:46:48,970 [salt.minion :2325][INFO ][13930] Returning information for job: req
2025-08-30 15:46:48,972 [salt.transport.zeromq:674 ][ERROR ][13930] Exception while sending request. Operation cannot be accomplished in current state
Traceback (most recent call last):
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/transport/zeromq.py", line 643, in _send_recv
yield self.socket.send(message)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/ext/tornado/gen.py", line 1056, in run
value = future.result()
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/ext/tornado/concurrent.py", line 249, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "/opt/saltstack/salt/lib/python3.10/site-packages/zmq/_future.py", line 513, in _add_send_event
r = send(msg, **nowait_kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/zmq/sugar/socket.py", line 618, in send
return super().send(data, flags=flags, copy=copy, track=track)
File "zmq/backend/cython/socket.pyx", line 740, in zmq.backend.cython.socket.Socket.send
File "zmq/backend/cython/socket.pyx", line 787, in zmq.backend.cython.socket.Socket.send
File "zmq/backend/cython/socket.pyx", line 249, in zmq.backend.cython.socket._send_copy
File "zmq/backend/cython/socket.pyx", line 244, in zmq.backend.cython.socket._send_copy
File "zmq/backend/cython/checkrc.pxd", line 28, in zmq.backend.cython.checkrc._check_rc
zmq.error.ZMQError: Operation cannot be accomplished in current state
2025-08-30 15:46:49,903 [salt.utils.process:1185][DEBUG ][13930] Subprocess Schedule(name=upgrade_run_daily, jid=20250830134648901802) cleaned up
2025-08-30 15:47:54,555 [tornado.application:353 ][ERROR ][13930] Future <salt.ext.tornado.concurrent.Future object at 0x7f57f2634700> exception was never retrieved: salt.exceptions.SaltReqTimeoutError: Message timed out
I applied the suggested patch but the behaviour is the same - RAM usage steadily increases until OOM kicks in. I don't see the same zmq.error.ZMQError: Operation cannot be accomplished in current state, nor any Socket send encoutered invalid state, retrying messages either.
Same thing here. Also spikes the server's load average for a few minutes and makes it impossible to use. Had to roll back.
Looks like it was always (for me) during a scheduled highstate, which then fails for a variety of reasons (timeout, unexpected None returned). I had not noticed any problems during manual testing, but then I did not specifically look at memory usage.
salt-call --versions
Salt Version:
Salt: 3006.15
Python Version:
Python: 3.10.18 (main, Aug 27 2025, 22:35:38) [GCC 11.2.0]
Dependency Versions:
cffi: 1.14.6
cherrypy: 18.10.0
cryptography: 42.0.5
dateutil: 2.8.1
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 3.1.6
libgit2: Not Installed
looseversion: 1.0.2
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.0.2
msgpack-pure: Not Installed
mysql-python: Not Installed
packaging: 24.0
pycparser: 2.21
pycrypto: Not Installed
pycryptodome: 3.19.1
pygit2: Not Installed
python-gnupg: 0.4.8
PyYAML: 6.0.1
PyZMQ: 23.2.0
relenv: 0.20.5
smmap: Not Installed
timelib: 0.3.0
Tornado: 4.5.3
ZMQ: 4.3.4
System Versions:
dist: ubuntu 24.04.3 noble
locale: utf-8
machine: x86_64
release: 6.8.0-79-generic
system: Linux
version: Ubuntu 24.04.3 noble
The best way to send me a log file would be through dropbox or anther service like that if you have access to one.
Likely replacing one of the following files with the version 3006.14 will resolve this. If we can figure out which file the bad change is in it will help narrow it down.
2025-09-02 22:43:04,935 [tornado.application:640 ][ERROR ][1412] Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x7ff465347640>, <salt.ext.tornado.concurre
nt.Future object at 0x7ff45ffa63b0>)
Traceback (most recent call last):
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/ext/tornado/ioloop.py", line 606, in _run_callback
ret = callback()
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/ext/tornado/stack_context.py", line 278, in null_wrapper
return fn(*args, **kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/ext/tornado/ioloop.py", line 628, in _discard_future_result
future.result()
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/ext/tornado/concurrent.py", line 249, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/ext/tornado/gen.py", line 309, in wrapper
yielded = next(result)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/transport/ipc.py", line 538, in
_write
timeout = self.opts.get("ipc_write_timeout", salt.defaults.IPC_WRITE_TIMEOUT)
AttributeError: module 'salt.defaults' has no attribute 'IPC_WRITE_TIMEOUT'
Replacing salt/transport/zeromq.py:
minion memory seems stable. no errors in logs.
Replacing sal/crypt.py:
2025-09-03T13:11:02.471437+02:00 master kernel: [ 1887.870575] Out of memory: Killed process 1411 (/opt/saltstack/) total-vm:2854616kB, anon-rss:2286228kB, file-rss:88kB, shmem-rss:8kB, UID:0 pgtables:5004kB oom_score_adj:0
2025-09-03 13:10:02,271 [salt.utils.event :821 ][DEBUG ][12858] Sending event: tag = __schedule_return; data = {'cmd': '_return', 'id': 'master', 'fun': 'event.send', 'fun_args': ['minion/upgrade/run/daily', {'queue': True}], 'schedule': 'upgrade_run_daily', 'jid': 'req', 'pid': 12858, 'return': True, 'retcode': 0, 'success': True, '_stamp': '2025-09-03T11:10:02.271002'}
2025-09-03 13:10:02,271 [salt.transport.ipc:360 ][DEBUG ][12858] Closing IPCMessageClient instance
2025-09-03 13:10:02,271 [salt.utils.schedule:963 ][DEBUG ][12858] schedule.handle_func: Removing /var/cache/salt/minion/proc/20250903111002206477
2025-09-03 13:10:02,278 [salt.channel.client:371 ][DEBUG ][1411] Closing AsyncReqChannel instance
2025-09-03 13:10:02,280 [salt.minion :2852][DEBUG ][1411] Minion of '192.168.0.101' is handling event tag 'fire_master'
2025-09-03 13:10:02,280 [salt.minion :2915][DEBUG ][1411] Forwarding event minion/upgrade/run/daily to master 192.168.0.101
2025-09-03 13:10:02,280 [salt.crypt :352 ][DEBUG ][1411] salt.crypt.get_rsa_key: Loading private key
2025-09-03 13:10:02,280 [salt.crypt :1026][DEBUG ][1411] Loaded minion key: /etc/salt/pki/minion/minion.pem
2025-09-03 13:10:02,283 [salt.minion :2852][DEBUG ][1411] Minion of '192.168.0.101' is handling event tag '__schedule_return'
2025-09-03 13:10:02,283 [salt.minion :2325][INFO ][1411] Returning information for job: req
2025-09-03 13:10:02,284 [salt.crypt :352 ][DEBUG ][1411] salt.crypt.get_rsa_key: Loading private key
2025-09-03 13:10:02,284 [salt.crypt :1026][DEBUG ][1411] Loaded minion key: /etc/salt/pki/minion/minion.pem
2025-09-03 13:10:02,287 [salt.transport.zeromq:674 ][ERROR ][1411] Exception while sending request. Operation cannot be accomplished in current state
Traceback (most recent call last):
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/transport/zeromq.py", line 643, in _send_recv
yield self.socket.send(message)
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/ext/tornado/gen.py", line 1056, in run
value = future.result()
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/ext/tornado/concurrent.py", line 249, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "/opt/saltstack/salt/lib/python3.10/site-packages/zmq/_future.py", line 513, in _add_send_event
r = send(msg, **nowait_kwargs)
File "/opt/saltstack/salt/lib/python3.10/site-packages/zmq/sugar/socket.py", line 618, in send
return super().send(data, flags=flags, copy=copy, track=track)
File "zmq/backend/cython/socket.pyx", line 740, in zmq.backend.cython.socket.Socket.send
File "zmq/backend/cython/socket.pyx", line 787, in zmq.backend.cython.socket.Socket.send
File "zmq/backend/cython/socket.pyx", line 249, in zmq.backend.cython.socket._send_copy
File "zmq/backend/cython/socket.pyx", line 244, in zmq.backend.cython.socket._send_copy
File "zmq/backend/cython/checkrc.pxd", line 28, in zmq.backend.cython.checkrc._check_rc
zmq.error.ZMQError: Operation cannot be accomplished in current state
2025-09-03 13:10:02,353 [salt.crypt :352 ][DEBUG ][1411] salt.crypt.get_rsa_key: Loading private key
2025-09-03 13:10:02,353 [salt.crypt :1026][DEBUG ][1411] Loaded minion key: /etc/salt/pki/minion/minion.pem
2025-09-03 13:10:02,361 [salt.crypt :352 ][DEBUG ][1411] salt.crypt.get_rsa_key: Loading private key
2025-09-03 13:10:02,361 [salt.crypt :1026][DEBUG ][1411] Loaded minion key: /etc/salt/pki/minion/minion.pem
2025-09-03 13:10:02,769 [salt.transport.ipc:360 ][DEBUG ][12859] Closing IPCMessageClient instance
2025-09-03 13:10:02,769 [salt.utils.schedule:963 ][DEBUG ][12859] schedule.handle_func: Removing /var/cache/salt/minion/proc/20250903111002211837
2025-09-03 13:10:03,205 [salt.utils.process:1185][DEBUG ][1411] Subprocess Schedule(name=upgrade_run_daily, jid=20250903111002206477) cleaned up
2025-09-03 13:10:03,205 [salt.utils.process:1185][DEBUG ][1411] Subprocess Schedule(name=__mine_interval, jid=20250903111002211837) cleaned up
I have replaced one file at a time with a rollback to origin between each tests.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
974240 root 20 0 2727668 1.9g 28264 S 98.3 4.1 0:56.30 /opt/saltstack/salt/bin/python3.10 /bin/salt-call state.apply MainProcess
This explains why machines with less than 4Gb of memory die on OOM. We observe the same memory(and high CPU) usage on all our 3006.15 minions and are rolling back to 3006.14. In fact, 3006.10 behaves much nicer than 14 regarding resources, but it's not available anymore, as I understand.
[ERROR ] No master could be reached or all masters denied the minion's connection attempt.
Unable to sign_in to master: Attempt to authenticate with the salt master failed with timeout error
[ERROR ] No master could be reached or all masters denied the minion's connection attempt.
Unable to sign_in to master: Attempt to authenticate with the salt master failed with timeout error
Did you try the latest from here? #68320 The full test suite is passing.
Activity
dwoz commentedon Aug 29, 2025
@alexharrington are you able to spin up a test minion to try and provide some more debugging information?
alexharrington commentedon Aug 29, 2025
I can certainly try. The server swaps heavily and basically is unresponsive as soon as the salt minion starts on the new version. What information do you need?
dwoz commentedon Aug 30, 2025
@alexharrington debug logs if possible. Also, what transport are you using?
alexharrington commentedon Aug 30, 2025
3006.14 about 2 minutes after minion start:

3006.15 about 2 minutes after minion start:
@dwoz I've recorded debug logs for each which I can share but they are from a production system and I'm not sure what might be sensitive in them. Is there some way I can get those to you securely?
transport isn't set in the config files, so I believe that means its using ZeroMQ transport.
ymasson commentedon Aug 30, 2025
Same issue for me
server boot at 14:47, OOM at 14:59
minion log just before OOM
I will restart the minion and see if the log is the same on the next OOM
ymasson commentedon Aug 30, 2025
dwoz commentedon Aug 31, 2025
@ymasson @alexharrington
I'm curious if the following patch to the minion will resolve the issue:
It seems to threads or coroutines are trying to send ad the same time. I'd be curious if we could determine how and why this is happening.
alexharrington commentedon Sep 1, 2025
I applied the suggested patch but the behaviour is the same - RAM usage steadily increases until OOM kicks in. I don't see the same
zmq.error.ZMQError: Operation cannot be accomplished in current state, nor anySocket send encoutered invalid state, retryingmessages either.ymasson commentedon Sep 1, 2025
with the patch
Socket send encoutered invalid state, retryingbut still OOMOrangeDog commentedon Sep 1, 2025
Same thing here. Also spikes the server's load average for a few minutes and makes it impossible to use. Had to roll back.
Looks like it was always (for me) during a scheduled highstate, which then fails for a variety of reasons (timeout, unexpected
Nonereturned). I had not noticed any problems during manual testing, but then I did not specifically look at memory usage.salt-call --versions
dwoz commentedon Sep 1, 2025
@alexharrington @ymasson
The best way to send me a log file would be through dropbox or anther service like that if you have access to one.
Likely replacing one of the following files with the version 3006.14 will resolve this. If we can figure out which file the bad change is in it will help narrow it down.
sal/crypt.pysalt/transport/zeromq.pysalt/transport/ipc.pyIf someone can replace these one by one it would be a huge help. I have not been able to reproduce this locally yet.
ymasson commentedon Sep 3, 2025
salt/transport/ipc.pycan't be replaced alone:Replacing
salt/transport/zeromq.py:minion memory seems stable. no errors in logs.
Replacing
sal/crypt.py:I have replaced one file at a time with a rollback to origin between each tests.
18 remaining items
dwoz commentedon Sep 11, 2025
@ymasson @OrangeDog @BenePhetes @raulgrajeda24 @alexharrington
I've created another PR to address the high CPU problem.
#68320
https://raw.githubusercontent.com/saltstack/salt/04c92b511d08f7ac47a9c6b540e9ef6cc9ad8d20/salt/transport/zeromq.py
OrangeDog commentedon Sep 11, 2025
That one just gives:
b-a-t commentedon Sep 11, 2025
During
highstate, the memory usage jumps up to:This explains why machines with less than 4Gb of memory die on OOM. We observe the same memory(and high CPU) usage on all our 3006.15 minions and are rolling back to 3006.14. In fact, 3006.10 behaves much nicer than 14 regarding resources, but it's not available anymore, as I understand.
OrangeDog commentedon Sep 11, 2025
dwoz commentedon Sep 11, 2025
@OrangeDog Fixed. Sorry about that. It's ready for testing now.
ymasson commentedon Sep 12, 2025
@dwoz , I have
dwoz commentedon Sep 12, 2025
Did you try the latest from here? #68320 The full test suite is passing.
ymasson commentedon Sep 12, 2025
You'r right, i was testing https://raw.githubusercontent.com/saltstack/salt/04c92b511d08f7ac47a9c6b540e9ef6cc9ad8d20/salt/transport/zeromq.py
With https://raw.githubusercontent.com/saltstack/salt/1ee03980fc10fe01d9804c0149fc6147ff045784/salt/transport/zeromq.py
everything is ok.
Thanks
Port fix for saltstack#68297 to 3007.x
OrangeDog commentedon Sep 17, 2025
https://raw.githubusercontent.com/saltstack/salt/1ee03980fc10fe01d9804c0149fc6147ff045784/salt/transport/zeromq.py
Active: active (running) since Wed 2025-09-17 08:37:03 UTC; 6h ago
Memory: 371.5M (peak: 547.9M)
CPU: 13min 56.586s
Total run time: 41.742 s
real 1m44.043s
defanator commentedon Sep 17, 2025
Hitting the same issue on a number of instances after upgrade to 3006.15. Had to revert to 3006.14 to keep the fleet alive and stable.
dwoz commentedon Sep 18, 2025
@alexharrington @defanator @ymasson @defanator
The fix for this went into
3006.16. Please confirm this is resolved.ymasson commentedon Sep 19, 2025
@dwoz it is ok in 3006.16. thanks
alexharrington commentedon Sep 22, 2025
@dwoz thank you. 3006.16 seems to be better on a quick test.