make jemalloc: download failure is silently swallowed and never retried, surfacing as a misleading tar error
Los mantenedores suelen responder en 10 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 84/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Tranquilo
- Stack tecnológico
- docker, shell
- Área
- build-system, devops
Línea de trabajo
Comienza en dgraph/Makefile, en el target jemalloc, y compara su flujo de descarga con la convención de reintento mostrada en Dockerfile. Ejecuta el target jemalloc o la compilación de Docker para observar la ruta de fallo actual. Se considera terminado cuando los errores de descarga siguen siendo visibles, se realiza un reintento transitorio y la extracción y los pasos posteriores se detienen cuando falla un prerrequisito.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
The jemalloc target in dgraph/Makefile chains its download and extraction with ; rather than &&, so a failed curl does not stop the recipe. The build then fails several steps later with a misleading error, and the real cause — the download — is discarded.
There is also no retry on what is a network fetch from a GitHub release, so a single transient blip fails the build.
The code
dgraph/Makefile, jemalloc target:
mkdir -p /tmp/jemalloc-temp && cd /tmp/jemalloc-temp ; \
echo "Downloading jemalloc" ; \
curl -f -s -L ${JEMALLOC_URL} -o jemalloc.tar.bz2 ; \
tar xjf ./jemalloc.tar.bz2 ; \
cd jemalloc-5.3.1 ; \
...
Two problems:
;instead of&&. Whencurl -fexits non-zero, the recipe continues intotar xjfon a file that does not exist.curl -salso suppresses the reason it failed, so nothing about the actual failure is ever printed.- No retry. The
Dockerfilealready treats this class of failure as expected and retries —apk add --no-cache ... || (sleep 5 && apk add --no-cache ...), commented "Retry once on transient apk-proxy errors". The jemalloc fetch gets no equivalent.
Observed failure
What a maintainer actually sees, with the genuine cause absent:
Downloading jemalloc
tar (child): ./jemalloc.tar.bz2: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
/bin/sh: 6: cd: can't cd to jemalloc-5.3.1
sed: can't read src/jemalloc_cpp.cpp: No such file or directory
/bin/sh: 8: ./configure: not found
make[2]: *** No targets specified and no makefile found. Stop.
==== Need sudo access to install jemalloc
make: *** No rule to make target 'install'. Stop.
make[1]: *** [Makefile:111: jemalloc] Error 2
The tar: Cannot open line reads like a missing-file bug, which sends you looking in the wrong place. Every line after it is downstream noise.
We hit this four times across two PRs in a fork of this repo, in both the host-native build and the RUN make -C dgraph jemalloc layer of the Docker build. Because the target is a prerequisite of make dgraph, it takes out every CI job that builds a binary — for us that was unit, systest-baseline, and any suite depending on them.
Suggested fix
curl -fSL ${JEMALLOC_URL} -o jemalloc.tar.bz2 \
|| (sleep 5 && curl -fSL ${JEMALLOC_URL} -o jemalloc.tar.bz2) ; \
tar xjf ./jemalloc.tar.bz2 && \
cd jemalloc-5.3.1 && \
...
&&between the steps that depend on each other, so the first real failure is the one reported.-S(keeping-f) so curl prints why it failed; dropping-sentirely also works.- One retry with a short sleep, matching the convention the Dockerfile already uses.
Caching the tarball would remove the network dependency altogether, but the retry plus honest error reporting is the small fix.
I'm happy to open a PR for this if it's welcome.
- Lenguaje dominante
- Go
- Estrellas
- 21.8k
- Forks
- 1.6k
- Merge medio
- 11 d 7 h
- PR fusionados (30 d)
- 5
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una 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 dgraph-io/dgraph
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 10 días
-
Broken links in the docsAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 76/100
Los mantenedores suelen responder en 10 días
-
Stale
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
dgraph-io/dgraph#9811 · 1 comentario ·
Los mantenedores suelen responder en 10 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 10 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
Los mantenedores suelen responder en 10 días
Todos los issues de dgraph-io/dgraph
Issues similares
-
【文档错误】创建镜像空间步骤中的截图标注与文字描述不一致Abiertoenhancement
Dificultad 1/5 Menos de una hora Aptitud para principiantes 62/100
DaoCloud/DaoCloud-docs#7839 ·
Los mantenedores suelen responder en 1 día
-
Support AlienVault OTX API keysAbiertoType: Enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
projectdiscovery/urlfinder#167 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
peterstace/simplefeatures#726 ·
-
area: import bug go good first issue priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
fukubie/StockLlama#69 ·
-
Add `rumpty firewall create|rm`Abiertoenhancement help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
cloverworks-hq/rumpty-cli#95 ·
Los mantenedores suelen responder en 1 día