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
{{ message }}
Repository navigation
test_mem_leak_in_event_listener flakes because job_not_running leaks tag_map entries #70152
tests/pytests/integration/netapi/rest_tornado/test_minions_api_handler.py::test_mem_leak_in_event_listener intermittently fails with AssertionError: assert 2 == 0 for app.event_listener.tag_map.
Observed on the 3008.x nightly (Amazon Linux 2 integration zeromq 4, run 32913591224 job 98023096704) — first attempt fails with two salt/job/<jid>/ret prefix-matcher futures left in tag_map, retry passes. Same pattern reproduced on merge-forward PR #70132.
Root cause: saltnado.py::_disbatch_local spawns job_not_running via ioloop.spawn_callback to ping saltutil.find_job. When the outer job's is_finished completes first, job_not_running calls event.set_result(None) on the in-flight ping future but does not remove it from event_listener.tag_map / timeout_map. Because spawn_callback runs independently of the handler, the ping may be registered afteron_finish -> clean_by_request has already emptied request_map for the handler, so the leaked entry only clears when the gather_job_timeout callback fires (10 s default, 30 s under the netapi test fixture).
The test only allows a 1 s wait before asserting the maps are empty, so any leaked ping trips the assertion.
Closing as part of a backlog cleanup — this issue was filed without a Salt versions-report, so there's no explicit version attached to compare against.
If you (or anyone else) can still reproduce this on 3008.3 or later, please comment with:
A fresh reproduction
The output of salt --versions-report
and the issue will be reopened. The original reporter can also reopen directly.
Activity
Reap the ping event when job_not_running exits via is_finished (#70153)
dwoz commentedon Oct 23, 2026
Closing as part of a backlog cleanup — this issue was filed without a Salt versions-report, so there's no explicit version attached to compare against.
If you (or anyone else) can still reproduce this on 3008.3 or later, please comment with:
salt --versions-reportand the issue will be reopened. The original reporter can also reopen directly.