Support add new -X option to dump heap and current stack automaticlly when MemoryError has been raised
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 77.2k
- Forks
- 35.9k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
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
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza revisando esta propuesta y el issue relacionado #60585; después, compara el comportamiento solicitado con la opción vinculada de Java para la resolución de problemas. Define la interfaz de línea de comandos, la semántica de los volcados de heap y de pila, y el comportamiento de MemoryError antes de la implementación; la tarea se considerará completada cuando haya un diseño aceptado y pruebas para la nueva opción.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- cli, tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100