-
Notifications
You must be signed in to change notification settings - Fork 23.8k
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
Ansible - Access Violation Attempted to read or write protected memory Error on Windows Server 2019 Servers #73256
Comments
Files identified in the description: If these files are incorrect, please update the |
I'm not sure what is happening here but my first thoughts would be some antimalware program is stopping Ansible in it's tracks causing the memory violation error. Based on the stacktrace the error is happening in PowerShell trying to run and it's not very clear whether the issue is due to some statement we are trying to run or just PowerShell itself failing to run the code itself. I would check any antimalware logs you have on your host and see if they mention why things are getting killed. I would also just try to run the following tasks to see if that works - raw: echo "testing"
- raw: powershell.exe "echo testing"
- raw: powershell.exe -NoLogo -NoProfile "echo testing"
- raw: powershell.exe -NoLogo -NoProfile -EncodedCommand {{ "echo testing" | b64encode(encoding='utf-16-le') }} These test just a very basic information of running PowerShell, if any of them fail then it might give some more information to try and track down why it is failing. |
Hi @jborean93, Thank you for your return. I was able to perform the operations you specified. I think the source of the error is due to security or microsoft policy. Ansible somehow VCRUNTIME140_CLR0400.dll is calling here and trying to read a null address.
Also, another situation that draws my attention is that when we run ansible ping or another module, we get the following error in Microsoft Event Viewer.
Do you have any other suggestions? |
Hi, I uninstalled Ansible locally as I thought the System.AccessViolationException error hides the actual error. I also increased the number of remote servers I tested. Here's my ansible new version
In the end, I encountered a different error, but I could not interpret this error much either.
|
The issue has been fixed with the 2021-03 Cumulative Update for Windows Server 2019 for x64-based Systems (KB5000822). We can close Issue. |
SUMMARY
I work with Ansible on Windows Servers.
I am getting errors while working on Windows Server 2019 servers. When I examine the error in detail, I see that the user I defined for ansible is trying to access somewhere. (Regedit, svc.host etc.) but the user I assigned for ansible is attached to the Admin group.
ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Windows Server 2019
Version 1809(OS Build 17763.1518)
STEPS TO REPRODUCE
You can test using the ping module.
My playbook:
my inventory-file
The command I'm running
EXPECTED RESULTS
When I run these steps, I expect it to ping.
ACTUAL RESULTS
When I try to ping, I get the following error.
jborean edit: stderr formatted nicely
The text was updated successfully, but these errors were encountered: