Support add new -X option to dump heap and current stack automaticlly when MemoryError has been raised
オープン
まだ誰も着手していません。
type-feature
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
Feature or enhancement
Proposal:
This idea may be similar to #60585
In the production environment, the memory leak is a common issue for all the developers. For now, we may have two kinds of way to debug it.
- Intrusive way, we need to modify our code, inject some code to monitor the object malloc, and publish/deploy it again. It will use a lot of time in non-python-code process.
- Process attach way, we may use the tools like
py-spyor otherptracebased way to attach to the process, and dump/analyze the all memory. It's useful but will be limited in the container. For most circumstance, we limit the privilege of the container which is means that the ptrace based way will be unuseable because of the security issue.
I think maybe we can introduce a new -x option to dump heap and current stack automaticlly when MemoryError has been raised just like the developer did in JVM
FYI https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/clopts001.html
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まずこの提案と関連する issue #60585 を確認し、要求された動作を、リンクされている Java のトラブルシューティング用オプションと比較してください。実装前に、コマンドラインインターフェース、ヒープおよびスタックダンプのセマンティクス、MemoryError の動作を定義してください。新しいオプションについて、承認された設計とテストが用意されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- cli, tooling
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100