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

prevent recursive logging csharp stackoverflow. #59503

Merged
merged 2 commits into from Aug 7, 2019
Merged

prevent recursive logging csharp stackoverflow. #59503

merged 2 commits into from Aug 7, 2019

Conversation

nznobody
Copy link
Contributor

SUMMARY

Simple bugfix to avoid recursive function calls in C# code causing Stack overflow on windows / powershell. Note the already present [comment].(

// Cannot call Warn as that calls LogEvent and we get stuck in a loop
)

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ansible.basics (core C#)

ADDITIONAL INFORMATION

To reproduce:
Call win_ping via vmware_tools connection plugin. It will crash powershell and hang (whilst WerFault.exe dumps proc). vmware_tools does not support privilege escalation and so the line: EventLog.CreateEventSource(logSource, "Application"); fails and we get into a cycle.

@nznobody nznobody changed the title prevent recursive logging situation. prevent recursive logging csharp stackoverflow. Jul 24, 2019
@ansibot
Copy link
Contributor

ansibot commented Jul 24, 2019

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. small_patch support:core This issue/PR relates to code supported by the Ansible Engineering Team. windows Windows community needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Jul 24, 2019
@nznobody
Copy link
Contributor Author

Bump? This is a simple fix, would be great to have it in please! @jborean93

@jborean93
Copy link
Contributor

Are you able to create a changelog fragment like https://github.com/ansible/ansible/blob/devel/changelogs/fragments/51995-apt_repository-catch-IOError.yaml. We require a changelog fragment to be able to backport modules to older branches.

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Jul 28, 2019
@nznobody
Copy link
Contributor Author

Yup, hopefully that suits. Do you need a rebase & squash or good as is? Cheers for the quick response :)

@ansibot ansibot added support:community This issue/PR relates to code supported by the Ansible community. and removed small_patch labels Jul 29, 2019
@nznobody
Copy link
Contributor Author

bump @nitzmahone, have done the change log fragment too

@jborean93
Copy link
Contributor

Sorry for the CI struggles there, looks good. Are you able to backport the PR to stable-2.8 so it's included in the next 2.8 release https://docs.ansible.com/ansible/latest/community/development_process.html#backporting-merged-prs.

@jborean93 jborean93 merged commit 6a5cd9a into ansible:devel Aug 7, 2019
@nznobody
Copy link
Contributor Author

nznobody commented Aug 8, 2019

Thanks @jborean93 ! Done: #60267

abadger pushed a commit that referenced this pull request Aug 9, 2019
* prevent recursive logging situation.

* Add changelog

(cherry picked from commit 6a5cd9a)
@ansible ansible locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. new_contributor This PR is the first contribution by a new community member. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. windows Windows community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants