aws / aws/aws-codedeploy-agent

High memory consumption and memory leak (still an issue)

オープン
#308 コメント 7 件 リアクション 12 件 担当者 0 名 GitHub で見る
主要言語
Rust
スター
337
フォーク
196
平均マージ
10時間 54分
マージ済み PR(30日)
4

説明

Opening a new issue because the problem described here https://github.com/aws/aws-codedeploy-agent/issues/32 still exists.

Basically, when codedeploy finishes, the agent doesn't release the memory back to the OS and the workaround is to restart the agent.

I've enabled verbose logging. Briefly looking at the logs, seems that unzip utility is used to unarchive the bundle:
```
$ cat codedeploy-agent.log | grep "LinuxUtil"
2021-10-10 09:58:26 DEBUG [codedeploy-agent(4114)]: InstanceAgent::LinuxUtil: Dirs to delete: ["/opt/codedeploy-agent/deployment-root/e23efd0e-df20-42be-91d9-cd495d6e0abc/d-BWQ263SLC"]
2021-10-10 09:58:26 DEBUG [codedeploy-agent(4114)]: InstanceAgent::LinuxUtil: Deleting dir: /opt/codedeploy-agent/deployment-root/e23efd0e-df20-42be-91d9-cd495d6e0abc/d-BWQ263SLC
2021-10-10 09:58:32 DEBUG [codedeploy-agent(4114)]: InstanceAgent::LinuxUtil: Command status: pid 4311 exit 0
2021-10-10 09:58:32 DEBUG [codedeploy-agent(4114)]: InstanceAgent::LinuxUtil: Command output:
2021-10-10 09:58:34 DEBUG [codedeploy-agent(4114)]: InstanceAgent::LinuxUtil: extract_zip - dst : /opt/codedeploy-agent/deployment-root/e23efd0e-df20-42be-91d9-cd495d6e0abc/d-5ZDWO7ULC/deployment-archive
2021-10-10 09:58:34 DEBUG [codedeploy-agent(4114)]: InstanceAgent::LinuxUtil: Executing unzip -qo /opt/codedeploy-agent/deployment-root/e23efd0e-df20-42be-91d9-cd495d6e0abc/d-5ZDWO7ULC/bundle.tar -d /opt/codedeploy-agent/deployment-root/e23efd0e-df20-42be-91d9-cd495d6e0abc/d-5ZDWO7ULC/deployment-archive
2021-10-10 09:58:46 DEBUG [codedeploy-agent(4114)]: InstanceAgent::LinuxUtil: Command status: pid 4315 exit 0
2021-10-10 09:58:46 DEBUG [codedeploy-agent(4114)]: InstanceAgent::LinuxUtil: Command output:
```

Where can I securely share the 127MB `codedeploy-agent.log` file (generated from a single deployment)? I don't want to share it publicly.

My environment:
EC2 instance running Ubuntu 20
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [aarch64-linux-gnu]
codedeploy-agent 1.3.2-1902

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

このレポートを Issue #32 と比較し、その後、詳細なログ記録を有効にして Ubuntu 20 上でデプロイメントを再現します。まず、LinuxUtil に関係する unzip/展開およびクリーンアップのエントリを調査します。完了とは、デプロイメント後もメモリが割り当てられたままになる理由を特定し、agent を再起動せずに解放されることを実証することです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
ruby
領域
devops
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。