Corrupted overlaybd.commit contains duplicated blocks and stalls TCMU / Pod sandbox creation
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
- 56/100
Línea de trabajo
Start with BkDownload::download_blob() in src/bk_download.cpp and trace how src->pread() results affect buffer writes and offset updates. Add a focused test that injects zero and short positive reads while bytes remain; done means unread buffer contents are never written or accepted as downloaded data. The issue reports no deterministic end-to-end reproducer.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happened in your environment?
We intermittently see a node stop creating Pod sandboxes. On one occasion, a Pod retried sandbox creation more than 2,000 times over approximately seven hours. OverlayBD TCMU reported repeated CRC errors. Snapshot cleanup was stuck in unlinkat() while removing a TCMU configfs LUN link, and containerd goroutines attempting to prepare snapshots were blocked on a metadata snapshotter lock. The “sandbox name is reserved” errors were part of the resulting failure chain: an earlier RunPodSandbox attempt had reserved the name before getting stuck during snapshot preparation, so subsequent attempts using the same name were rejected by containerd.
We traced one affected snapshot to a corrupted local overlaybd.commit. overlaybd-zfile --verify reported checksum/CRC failures:
pread:checksum verification failed after retries
zfile_validation_check:crc check error in block 203963
We downloaded the corresponding layer independently and compared it with the local file. The file size was 663,820,800 bytes. Exactly nine 256 KiB chunks differed. Each bad chunk was an exact copy of an earlier chunk:
Local chunk 2038 == reference chunk 2037
Local chunk 2039 == reference chunk 2037
Local chunk 2129 == reference chunk 2128
Local chunk 2147 == reference chunk 2146
Local chunk 2184 == reference chunk 2183
Local chunk 2241 == reference chunk 2240
Local chunk 2320 == reference chunk 2319
Local chunk 2339 == reference chunk 2338
Local chunk 2464 == reference chunk 2463
In the current upstream BkDownload::download_blob() implementation, a negative src->pread() result is retried, but a zero or short positive result is accepted. The code then writes count bytes from the buffer and advances the offset by count. If fewer than count bytes were read, this appears capable of writing stale buffer contents. The observed duplicated chunks are consistent with that failure mode, but we did not capture the actual pread() return values during the incident.
We have observed the same pattern in multiple incidents: many corrupted blocks are exact copies of valid blocks. This closely resembles the failure mode described above for a zero-length pread() result, although we have not captured such a return value directly. Could the pread() return-value handling be hardened to prevent an empty read from writing stale buffer contents and potentially leaving the entire node unable to create PodSandboxes?
What did you expect to happen?
-
A zero or short read before the expected end of the source should be handled explicitly; unread buffer bytes should never be written as valid downloaded data.
-
A corrupted local committed layer should not continue to be used without detection or recovery.
-
Snapshot/device cleanup should not remain blocked indefinitely after the underlying read failure.
How can we reproduce it?
The production failure is intermittent; we do not yet have a deterministic end-to-end reproducer. A focused test for the suspected downloader issue would inject a zero or short positive return from src->pread() while bytes remain and verify that no stale buffer data is written or accepted.
What is the version of your Overlaybd?
-
OverlayBD version/commit: 1.0.16
-
OverlayBD snapshotter version/commit: 1.4.3
-
containerd version: 2.1.6
-
Linux distribution and kernel: anolis os 5.10.134-16.3.al8.x86_64
What is your OS environment?
anolis 8
Are you willing to submit PRs to fix it?
- Yes, I am willing to fix it.
- Lenguaje dominante
- C++
- Estrellas
- 447
- Forks
- 102
- Merge medio
- 1 d 7 h
- PR fusionados (30 d)
- 8
Preparar el entorno
- Sin Dockerfile ni 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 containerd/overlaybd
-
EROFS testfile not foundAbiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
containerd/overlaybd#382 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
containerd/overlaybd#380 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
containerd/overlaybd#361 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
containerd/overlaybd#357 ·
Los mantenedores suelen responder en 1 día
-
P2P not working with harborAbiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
containerd/overlaybd#326 · 8 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de containerd/overlaybd
Issues similares
-
Make the HTTP server's keep-alive and headers timeouts configurablePosiblemente ocupada @mattgodbolt la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
compiler-explorer/compiler-explorer#9902 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Nixtla/statsforecast#1371 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
[Bug]: pip install -U cudaq-qec fails with a conflict that names cudaq-qec itselfPosiblemente ocupada @fedonman la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
task
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
SparseLinearAlgebra/spla#316 · 1 comentario ·
Los mantenedores suelen responder en 1 día