python / python/cpython

Fix portability of `sendfile(2)` support detection for Lustre filesystems

Abierto
#139,416 0 comentarios 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

3.13 3.14 3.15 stdlib type-bug
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:

On Lustre on Linux (specifically the AWS implementation) there is a rare and difficult to reproduce failure of shutil.copyfile in its sendfile(2) fast path because the syscall returns ENODATA. The situation is recoverable by falling back to the standard read/write file copy (patch forthcoming).

Reproducing the bug requires the filesystem to be in a specific state which I have not been able to reproduce at will but we've seen it on occasions by multiple users. Additionally similar bug has been seen on rust fs::copy which similarly does not trap the ENODATA error.

Following is sufficient to reproduce bug for the specific (rare) file that fails:

import shutil
shutil.copyfile('src', 'dst')

error:

sent = os.sendfile(outfd, infd, offset, blocksize)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 61] No data available: '/shared/fsx1/filename' 
CPython versions tested on:

3.14

Operating systems tested on:

Linux

Linked PRs
  • gh-139417

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza por la ruta rápida sendfile de shutil.copyfile y revisa cómo se gestionan los errores de os.sendfile. Reproduce el fallo con shutil.copyfile('src', 'dst') en el sistema de archivos afectado; se considera terminado cuando un fallo ENODATA vuelve a la ruta de copia estándar de lectura/escritura.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
linux, python
Área
operating-systems
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.