We have seen no pattern to the content of the win_shell tasks, and when we ran async they were all with a timeout. As we suspected problem with async, we have worked around the need for async-timeout tasks, but this still happens for tasks with become. Exploring the process tree shows just two powershell processes, both with commandline line containing the wrapper (one with the a powershell call before it) and the conhost, as descendants of each other. All other processes that the win_shell started have finished - the scripts having deployed logs etc as they were supposed to, and no cmd, powershell or python processes remaining (which is what the win_shell starts)
Den tors 4 feb. 2021 kl 13:02 skrev [email protected] <[email protected]>: > I think the more important question here is what are your win_shell > commands actually running. If it's spawning another process then that could > be taking control of the conhost used by WinRM keeping the Ansible wrapper > process still running in the backround. Otherwise if you are just running > win_shell commands with long running tasks as async and fire and forget > then they will eventually build up and take over all resources. > On Thursday, February 4, 2021 at 7:31:24 PM UTC+10 [email protected] > wrote: > >> When running win_shell module in our playbooks with async or become, we >> are sometimes left with ansible exec_wrapper and a child conhost process >> that won't return and keeps eating resources on the node. Since we are >> using ansible through ZUUL to run Continuous Integration, we quickly fill >> up workers with hanging wrappers, leaving them with 100% Processor >> utilization. >> >> Anyone seen this and have any hints on what to do? >> >> Ansible 2.9 >> The decoded commandline of the hanging process: >> &chcp.com 65001 > $null >> $exec_wrapper_str = [System.Console]::In.ReadToEnd() >> $split_parts = $exec_wrapper_str.Split(@("`0`0`0`0"), 2, >> [StringSplitOptions]::RemoveEmptyEntries) >> Set-Variable -Name json_raw -Value $split_parts[1] >> $exec_wrapper = [ScriptBlock]::Create($split_parts[0]) >> &$exec_wrapper >> >> Running over winrm with certificates to both windows7 and >> windows-server-2019 machines >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "Ansible Project" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/ansible-project/Ffo-VpwaEWE/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/68877a62-b2b5-44d6-8535-b761ae6983f9n%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/68877a62-b2b5-44d6-8535-b761ae6983f9n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAO%3DabT6KEFUny9qy_hdDesVVxk4MZEBkUGso1kVVe3bxNyAw8g%40mail.gmail.com.
