`readlink` of `/proc/self/fd/N` is `ENOENT` for a pipe, a socket or an eventfd
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 50/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- c, macos
- Área
- operating-systems
Línea de trabajo
Start at intercept_readlink_dispatch in src/runtime/procemu.c, which answers /proc/self/fd/N from fcntl(F_GETPATH), and check why that call fails for pipes, sockets and eventfds. Build the reproducer from the issue and compare its output with the Linux 6.12 column. Done when all three descriptors return a kind name in the pipe:[N], socket:[N] or anon_inode:[eventfd] form instead of ENOENT.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
intercept_readlink_dispatch (src/runtime/procemu.c) answers /proc/self/fd/N with the host path of the host fd, from fcntl(F_GETPATH). A descriptor with no path fails that call (EBADF on macOS 27.0.1 for a pipe), and the guest gets ENOENT. Linux names such a descriptor by its kind.
Reproducer:
#include <errno.h>
#include <stdio.h>
#include <sys/eventfd.h>
#include <sys/socket.h>
#include <unistd.h>
static void show(const char *what, int fd)
{
char link[64], target[64];
snprintf(link, sizeof(link), "/proc/self/fd/%d", fd);
errno = 0;
long n = readlink(link, target, sizeof(target) - 1);
target[n < 0 ? 0 : n] = '\0';
printf("%-8s %ld errno=%d %s\n", what, n, errno, target);
}
int main(void)
{
int p[2], sv[2];
pipe(p);
socketpair(AF_UNIX, SOCK_STREAM, 0, sv);
show("pipe", p[0]);
show("socket", sv[0]);
show("eventfd", eventfd(0, 0));
return 0;
}
| pipe | socket | eventfd | |
|---|---|---|---|
elfuse b57f367 |
-1, ENOENT |
-1, ENOENT |
-1, ENOENT |
| Linux 6.12 under qemu | pipe:[181] |
socket:[182] |
anon_inode:[eventfd] |
- Lenguaje dominante
- C
- Estrellas
- 273
- Forks
- 29
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 17
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la 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.
Más de sysprog21/elfuse
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
Los mantenedores suelen responder en 2 días
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 40/100
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 2 días
Todos los issues de sysprog21/elfuse
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
Xinyuan-LilyGO/T-Display-S3#352 · 3 comentarios ·
-
documentation severity/minor
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
docs: AGENTS.md has no rule against running deploy scripts into the owner's game installPosiblemente ocupada @thesprockee la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
EchoTools/nevr-runtime#524 ·
Los mantenedores suelen responder en 1 día
-
python library: btc_sign() sends antiklepto host nonce for taproot miniscript (tr() policy) inputs because is_taproot() only recognizes simple P2TRPosiblemente ocupada @benma-agent la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
BitBoxSwiss/bitbox02-firmware#2145 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
Genymobile/scrcpy#7097 ·
Los mantenedores suelen responder en 1 día