Flake: MCP handshake cancellation can outlive authorization send deadline
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
Línea de trabajo
Start with internal/adapter/mcp/gatewaycall_test.go:351–370 and reproduce the failure with the focused go test -race command in the issue. Then read internal/adapter/mcp/gatewaycall.go:183–199 and :300–375 to trace deadline propagation and SDK connection cleanup. Done means the handshake terminates promptly after the authorization deadline, cleanup leaves no leaked goroutines or resources, and a deterministic test covers the failing interleaving.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Failure
TestSendGatewayCallHandshakeEndsAtSendBy intermittently fails under -race:
--- FAIL: TestSendGatewayCallHandshakeEndsAtSendBy (5.08s)
gatewaycall_test.go:370: a hung handshake outlived the authorization's send deadline
Observed in PR #2906, CI race job.
Investigation
This is pre-existing, not caused by module-publication metadata adoption:
- Focused race repetitions reproduced the same timeout at both adoption head
f37258f71e24c867b5920f04b3db2d7ee337cefeand baselinee5a72977e37c65483de32cf6c6665526a62f6528. - Across the investigation's focused batches: adoption failed 1/1,600 repetitions; baseline failed 11/3,000. Some batches overlapped or used profiling, so these are reproduction counts, not comparable failure-rate estimates.
- MCP code, root
go.sum, and all 666 resolved external module/version selections were unchanged. Root's local module replacements remain in place; the MCP SDK remains v1.8.0. - No
WARNING: DATA RACEappeared. A race-enabled test failure is not itself a detected data race.
Example focused reproduction (Go 1.27.3, Linux amd64; dependencies already cached):
GOWORK=off GOPROXY=off go test -mod=readonly -race \
./internal/adapter/mcp \
-run '^TestSendGatewayCallHandshakeEndsAtSendBy$' \
-count=1000 -timeout=240s
The failure is intermittent; a passing batch does not rule it out.
Relevant paths
internal/adapter/mcp/gatewaycall_test.go:351–370: fake transport waits on request cancellation; test sets a 50ms authorization deadline and fails if the overall call has not returned within five seconds.internal/adapter/mcp/gatewaycall.go:183–199: deadline-bound SDK connection and failed-handshake cleanup.internal/adapter/mcp/gatewaycall.go:300–375: wire/request-context handling.
The evidence points toward an intermittent handshake cancellation/teardown interaction; the exact blocking interleaving is not established. Investigate context propagation and SDK connection cleanup rather than simply increasing the timeout or weakening the authorization-deadline assertion.
Expected outcome
A hung handshake terminates promptly when the authorization send deadline expires, with cleanup completing and no leaked goroutines/resources. Preserve the deadline/security contract and cover the failing interleaving with deterministic synchronization where possible.
- Lenguaje dominante
- Go
- Estrellas
- 309
- Forks
- 29
- Merge medio
- 15 h 56 min
- PR fusionados (30 d)
- 225
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 stacklok/mecatl
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
docs: make local provider configuration discoverable from mecatuiQuizá libre de nuevo @brainsparker la tomó hace 28 días y no hay ningún pull request abierto. Abiertodocumentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
stacklok/mecatl#2470 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 18/100
Los mantenedores suelen responder en 1 día
Todos los issues de stacklok/mecatl
Issues similares
-
HTTP probe loses insecureSkipVerify in the generated probe manifestPosiblemente ocupada @BahaaMattar la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
litmuschaos/litmus#5745 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 2 días
-
type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 1 día
-
messaging/v1: IsGRPCProtocol and InternalMetadataToGrpcMetadata panic on empty or nil metadata valuesPosiblemente ocupada @patelshivani2283-lab la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
stacklok/toolhive-catalog#2024 ·
Los mantenedores suelen responder en 1 día