vmcp optimizer tool search permanently fails with FTS5 disk I/O error (6410) under operator security hardening
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
- 54/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- go, kubernetes, sqlite
- Área
- backend, databases, infrastructure
Línea de trabajo
Start by reading pkg/vmcp/optimizer/internal/toolstore/sqlite_store.go and pkg/container/kubernetes/security.go, then trace how the operator configures vmcp's read-only root filesystem and temporary storage. Reproduce the FTS5 find_tool failure under that configuration and compare the proposed writable /tmp mount with setting SQLite temp_store to MEMORY. Done means optimizer search works with the intended hardened setup and has coverage for the failure scenario.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Environment
- ToolHive operator on Kubernetes, operator and vmcp images v0.66.0
VirtualMCPServerwithoptimizer.enabled(embedding service configured viaembeddingService)- Session storage: Redis provider (Dragonfly), single replica
What happens
On the vmcp gateway, find_tool fails on every call, on every fresh session, for every client:
find_tool failed: tool search failed: FTS5 query failed: disk I/O error (6410)
Direct call_tool execution by name works fine, so only tool discovery (the optimizer's search path) is affected. The failure persists across pod restarts and gateway version bumps (observed continuously on v0.63–v0.66 deploys over ~2 weeks).
Diagnosis
- Extended code 6410 is
SQLITE_IOERR_GETTEMPPATH: the VFS could not resolve a writable directory for temporary files. - The optimizer tool store is an in-memory SQLite database (
file:memdb?mode=memory&cache=shared) with FTS5, frompkg/vmcp/optimizer/internal/toolstore/sqlite_store.go. FTS5 queries spill to file-backed temp storage (temp_storedefaults to FILE), andos.TempDir()has nowhere usable to go. - The operator hardens vmcp containers with
readOnlyRootFilesystem: true(pkg/container/kubernetes/security.go) and setsHOME=/tmp/XDG_CONFIG_HOME=/tmp, but does not mount a writable volume at/tmp. The image's/tmpis on the read-only rootfs.
Evidence from the running pod (ephemeral container probe):
HOME=/tmp
XDG_CONFIG_HOME=/tmp
# ls -ld /proc/1/root/tmp
drwxrwxrwt 2 root root 6 ... /proc/1/root/tmp
# touch /proc/1/root/tmp/zprobe
touch: /proc/1/root/tmp/zprobe: Read-only file system
And the gateway serves a healthy MCP session at the same time (fresh initialize → tools/list → reuse all 200), so the failure is isolated to the search path needing temp files.
Workaround
Adding an emptyDir at /tmp through the CRD's podTemplateSpec fixes it — that patch is applied as a strategic merge, so it combines cleanly with operator-set fields:
podTemplateSpec:
spec:
containers:
- name: vmcp
volumeMounts:
- mountPath: /tmp
name: vmcp-tmp
volumes:
- name: vmcp-tmp
emptyDir: {}
Suggestion
Since the operator already points HOME and XDG_CONFIG_HOME at /tmp, it should probably mount a writable emptyDir there for vmcp by default when the rootfs is read-only. Alternatively, the tool store could set temp_store=MEMORY for the memdb so FTS5 never touches the filesystem — the store is in-memory anyway, and that would keep the hardening untouched.
- Lenguaje dominante
- Go
- Estrellas
- 2.3k
- Forks
- 332
- Merge medio
- 19 h 39 min
- PR fusionados (30 d)
- 174
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/toolhive
-
Reduce log spam of vMCP pod by logging cache sync messages at debugQuizá libre de nuevo @FOWEPJF255 la tomó hace 8 días y no hay ningún pull request abierto. Abiertokubernetes
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
stacklok/toolhive#7109 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
stacklok/toolhive#6925 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
proxyrunner tool-filter middleware strips SEP-2322 Modern envelope from tools/list, breaking vMCP health checksQuizá libre de nuevo @alex-feel la tomó hace 56 días y no hay ningún pull request abierto. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
stacklok/toolhive#6684 · 5 comentarios · 1 reacción · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
HttpClientBuilder.Build() ignores HTTP(S)_PROXY (auth-server OAuth/DCR calls bypass forward proxy)Posiblemente ocupada @schonmann la tomó hace 46 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
stacklok/toolhive#6671 · 2 comentarios · 1 reacción · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Delete the dead pkg/vmcp/server/adapter packageQuizá libre de nuevo @suantea la tomó hace 40 días y no hay ningún pull request abierto. Abiertoneeds-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
Todos los issues de stacklok/toolhive
Issues similares
-
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
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Los mantenedores suelen responder en 1 día