RestCatalog: concurrent HTTP requests can crash in libcurl
Los mantenedores suelen responder en 2 días
@smaheshwar-pltr ya está trabajando en esto.
Desde el 4/11/2026.
- #1090 de @smaheshwar-pltr — abierto
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 20/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- cpp
- Área
- backend, networking
Línea de trabajo
Start with src/iceberg/catalog/rest/http_client.cc around line 201, where HttpClient uses the shared cpr::ConnectionPool, and review issue #530 for the earlier mutex guarded session. Reproduce the concurrent requests against the REST fixture used by rest_catalog_integration_test, then inspect the client and pool behavior with the libcurl versions named in the issue. Done means concurrent requests no longer trigger the reported crash; pull request #1090 is already open.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
HttpClient sends every request through one cpr::ConnectionPool (http_client.cc#L201). That pool wraps a libcurl share handle that shares the connection cache, and libcurl doesn't support using a shared connection cache from several threads at once. When two requests overlap, the process can crash.
A RestCatalog sends all its requests through one HttpClient, so requests can overlap even when the application only calls the catalog from one thread:
- Metrics reports are posted from the executor passed to
RestCatalog::Make(rest_metrics_reporter.cc#L73-L74). - OAuth2 tokens are refreshed on the
auth_executorpassed toRestCatalog::Make(auth_session_internal.h#L284). - Vended S3 credentials are refreshed through LoadCredentials when the AWS SDK signs a request. The refresh runs on whichever thread is doing the S3 I/O (arrow_s3_file_io.cc#L701-L708, rest_catalog.cc#L91).
Applications that share one catalog between threads run into it directly.
The shared pool was introduced in apache/iceberg-cpp#530, which replaced a mutex-guarded cpr::Session.
Reproduction
Run this against the REST fixture that rest_catalog_integration_test uses:
HttpClient client;
auto session = auth::AuthSession::MakeDefault({});
std::vector<std::thread> threads;
for (int i = 0; i < 32; ++i) {
threads.emplace_back([&] {
for (int j = 0; j < 200; ++j) {
(void)client.Get("http://localhost:8181/v1/config", {}, {},
*DefaultErrorHandler::Instance(), *session);
}
});
}
for (auto& thread : threads) thread.join();
With libcurl 8.22.0, this aborted in 6 of 6 runs with heap corruption (free(): corrupted unsorted chunks or double free or corruption). Sharing one RestCatalog between 32 threads that each call LoadTable also crashes, with both 8.22.0 and 8.5.0. Neither reproduces with 8.18.0, the version CI uses, so CI doesn't catch it.
- Lenguaje dominante
- C++
- Estrellas
- 227
- Forks
- 142
- Merge medio
- 3 d 21 min
- PR fusionados (30 d)
- 70
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 apache/iceberg-cpp
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
apache/iceberg-cpp#1103 ·
Los mantenedores suelen responder en 2 días
-
help wanted
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
apache/iceberg-cpp#1101 ·
Los mantenedores suelen responder en 2 días
-
Support Iceberg SQL viewsAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
apache/iceberg-cpp#1099 ·
Los mantenedores suelen responder en 2 días
-
Complete OAuth2 token refresh and expiration support (Java-compatible)Posiblemente ocupada @lishuxu la tomó hace 2 días. Abierto
apache/iceberg-cpp#1095 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
Make RestCatalog safe to share across threadsPosiblemente ocupada @smaheshwar-pltr la tomó hace 3 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
apache/iceberg-cpp#1091 ·
Los mantenedores suelen responder en 2 días
Todos los issues de apache/iceberg-cpp
Issues similares
-
ai_p2
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
ClickHouse/ClickHouse#130006 ·
Los mantenedores suelen responder en 1 día
-
DepotMaintain: EN longer string moves the hint popup buttons out of reach // WpfGUI English LanguageAbiertoclient: WpfGui module: depot question
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
MaaAssistantArknights/MaaAssistantArknights#19169 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
area: certificates bug outdated-version
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
RafaelNGP/xbox-cloud-gaming-ps5#381 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
parse_selu lowering loses catastrophic cancellation → silent 0.0 for moderate positive inputsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
ROCm/AMDMIGraphX#5490 ·
Los mantenedores suelen responder en 3 días