Tachyon: Permission error on subprocesses are not propagated back to the user
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
Bug report
Bug description:
Running python -m profiling.sampling run --subprocesses <...> on some code that spawns subprocesses will ignore any PermissionError thrown in the child processes when doing a attach to the process, since stderr is forwarded to /dev/null, and the process exits with error code (my mistake, it does exit with exit code 1, just the call is in the helper function). This causes confusion as the only user-visible effect is that the subprocesses sampling data files are not created.0
This can happen when the user / python executable / kernel doesn't have the CAP_SYS_PTRACE capability, so the run subcommand works fine, but any attach will fail, which is what happens with the child processes.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
- gh-155032
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
Comience con Lib/profiling/sampling/_child_monitor.py en la ruta de attach del subproceso y con Lib/profiling/sampling/main.py en el punto de entrada del comando run. Reproduzca el comando en Linux sin CAP_SYS_PTRACE y, a continuación, verifique que un PermissionError del proceso hijo sea visible para el usuario, en lugar de aparecer únicamente como datos de muestreo ausentes. El PR gh-155032 ya está vinculado a este issue.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- devtools
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 25/100