aws / amazon-ssm-agent

An agent to enable remote management of your EC2 instances, on-premises servers, or virtual machines (VMs).
https://aws.amazon.com/systems-manager/
Apache License 2.0
1.03k stars 323 forks source link

AWS.CloudWatch.exe process leak on Agent Versions 3.1.804.0 through 3.1.1004.0 #436

Closed gianniLesl closed 2 years ago

gianniLesl commented 2 years ago

Steps To Reproduce:

  1. Set up a Windows instance with one of the affected agent versions
  2. Configure the legacy CloudWatch plugin using the "AWS-ConfigureCloudWatch" document
  3. Restart the agent on the host
  4. Notice with each restart there is an additional AWS.CloudWatch.exe process running which consumes host CPU and makes additional calls to CloudWatch API

This issue was due to an GoLang upgrade that broke our existing mechanism to kill the existing AWS.CloudWatch.exe processes (https://github.com/golang/go/issues/51151)

This issue is fixed in Agent version 3.1.1045.0 and above. Guidance is to upgrade the Agent version to 3.1.1045.0 or greater and also migrate from the legacy CloudWatch Plugin to the supported CloudWatch Agent (Migration Instructions: https://docs.aws.amazon.com/systems-manager/latest/userguide/monitoring-cloudwatch-agent.html#monitoring-cloudwatch-agent-migrate)