Cannot fit name [.../sbt-load.sock] in maximum unix domain socket length
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- java
- Área
- operating-systems
Línea de trabajo
Reproduce el fallo con el comando de sbt mostrado y un java.io.tmpdir largo; después, sigue cómo se selecciona la ruta del socket y cómo la excepción se convierte en ServerAlreadyBootingException. El issue no menciona archivos fuente ni tests, y todavía hay que confirmar el comportamiento esperado de fallback frente al de error; la tarea debería considerarse terminada cuando exista un manejo claro y acordado para las rutas que superen los límites de los sockets Unix.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
steps
- create an sbt build with a medium deeply-nested folder structure
- try to run a simple command with
java.io.tmpdirset to the base folder of the build
In our case it ends up being something like
sbt -Djava.io.tmpdir=/var/lib/jenkins/workspace/some-very-long-branch-name/target/tmp clean
problem
The above command produces the following error message:
sbt thinks that server is already booting because of this exception:
sbt.internal.ServerAlreadyBootingException: java.io.IOException: org.scalasbt.ipcsocket.NativeErrorException: Cannot fit name [/var/lib/jenkins/workspace/some-very-long-branch-name/target/tmp/.sbt/sbt-socket8737049473820614565/sbt-load.sock] in maximum unix domain socket length
I think the issue is caused by sbt/sbt#6887 - although we don't set XDG_RUNTIME_DIR explicitly, I wonder if the code is somehow falling back to java.io.tmpdir.
There is a secondary issue that the error message is slightly misleading ("sbt thinks that the server is already booting") - would it be possible to separate out "the lock file already exists" from other cases such as this one? (I guess the same issue would happen if e.g. the current user didn't have permission to create the lock file in the given location).
expectation
Not sure what the expected behaviour is here. I see there's some discussion on sbt/sbt#7013 about always (?) using /tmp instead, which would be preferable since the socket name is then guaranteed to always be short enough.
Alternatively sbt could pre-check the proposed socket name length (or catch the exception?) and handle it gracefully - either by falling back to /tmp or else giving a helpful error message?
notes
We can work around the issue by also explicitly setting XDG_RUNTIME_DIR to something shorter (e.g. a known folder under /tmp) but this is mildly annoying since we'd ideally like to have a single temp directory under our build Jenkins workspace folder.
- Lenguaje dominante
- Java
- Estrellas
- 58
- Forks
- 20
- Merge medio
- 12 h 39 min
- PR fusionados (30 d)
- 11
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 sbt/ipcsocket
-
Code review summaryAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
sbt/ipcsocket#101 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
Los mantenedores suelen responder en 1 día
Todos los issues de sbt/ipcsocket
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
521xueweihan/HelloGitHub#4654 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
commons-app/apps-android-commons#7486 ·
Los mantenedores suelen responder en 1 día
-
easy first-contributor first-contributors good first issue help wanted kotlin up-for-grabs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
fork-commit-merge/fork-commit-merge#8752 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
apache/fineract-consumer-facing#306 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
testng-team/testng#3672 ·
Los mantenedores suelen responder en 1 día