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

Fix issue where using listen parameter for handlers in collections could lead to memory issues #83393

Closed

Conversation

ShawnHardwick
Copy link

Fix issue where using listen parameter for handlers in collections could lead to memory issues on Ansible controller.

SUMMARY

Fixes #83392

ISSUE TYPE
  • Bugfix Pull Request
ADDITIONAL INFORMATION

See issue for more info.

@ansibot ansibot added bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. has_issue labels Jun 6, 2024
@Akasurde
Copy link
Member

Akasurde commented Jun 6, 2024

@ShawnHardwick CI failures are known and being handled in a different PR.

@briantist
Copy link
Contributor

@Akasurde could you link to that PR? I'd like to follow it

@Akasurde
Copy link
Member

Akasurde commented Jun 6, 2024

@Akasurde could you link to that PR? I'd like to follow it

#83391

@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Jun 6, 2024
@mattclay mattclay removed needs_triage Needs a first human triage before being processed. labels Jun 6, 2024
@s-hertel

This comment was marked as resolved.

This comment was marked as resolved.

@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Jun 6, 2024
@@ -558,7 +558,7 @@ def search_handlers_by_notification(self, notification: str, iterator: PlayItera
handler.fattributes.get('listen'),
listeners,
templar,
)
).copy()
if handler._role is not None:
for listener in listeners.copy():

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This second copy probably isn't needed anymore

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is still needed as listeners are mutated within the for loop.

@mkrizek
Copy link
Contributor

mkrizek commented Jun 10, 2024

Superseded by #83400

@mkrizek mkrizek closed this Jun 10, 2024
@ShawnHardwick ShawnHardwick deleted the fix_listeners_mutable_array branch June 10, 2024 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug. has_issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ansible controller exponential memory usage when using handler listeners in collection
8 participants