Support add new -X option to dump heap and current stack automaticlly when MemoryError has been raised
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 35.9k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia esaminando questa proposta e la issue correlata #60585, quindi confronta il comportamento richiesto con l’opzione Java collegata per la risoluzione dei problemi. Definisci l’interfaccia della riga di comando, la semantica dei dump dell’heap e dello stack e il comportamento di MemoryError prima dell’implementazione; il lavoro sarà considerato completato quando saranno disponibili un design approvato e test per la nuova opzione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- cli, tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100