Skip to content

fix(vram): contain malformed GGUF metadata - #11374

Open
richiejp wants to merge 1 commit into
mudler:masterfrom
richiejp:fix/gguf-metadata-panic
Open

fix(vram): contain malformed GGUF metadata#11374
richiejp wants to merge 1 commit into
mudler:masterfrom
richiejp:fix/gguf-metadata-panic

Conversation

@richiejp

@richiejp richiejp commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR fixes a process-wide panic when gallery VRAM estimation encounters malformed remote GGUF metadata.

  • recover malformed GGUF parser panics at LocalAI metadata boundaries
  • skip unneeded remote tokenizer arrays and update gguf-parser-go to v0.25.0 for its overflow checks
  • contain gallery warmer worker panics and harden the MTP importer and CrispASR metadata probe
  • disable startup VRAM cache warming in the provided Docker Compose configurations as an operational fallback

Notes for Reviewers

The background gallery VRAM warmer parses metadata from remote GGUF files. A malformed or transient range response can supply an impossible string length, causing gguf-parser-go to panic in a detached goroutine and terminate the LocalAI process. The estimator only needs architecture scalars, so parser failures now degrade to the existing size-only estimate and unnecessary tokenizer arrays are skipped.

Validation:

  • go test -count=1 ./pkg/vram ./core/gallery ./core/gallery/importers ./core/config ./backend/go/crispasr
  • docker compose -f docker-compose.yaml config --quiet
  • docker compose -f docker-compose.distributed.yaml config --quiet
  • git diff --check

Regression coverage includes valid remote GGUF metadata, overflowing tokenizer arrays, scalar string allocation panics, the detached gallery warmer, and malformed CrispASR metadata.

Related reports

Signed commits

  • Yes, I signed my commits.
  • Documentation updated (docs/content/) for user-facing changes, or not applicable

Recover parser panics at metadata boundaries, skip unneeded remote arrays, and use the parser's overflow-hardened release. Keep detached gallery workers and CrispASR probes from terminating their processes on malformed GGUF input. Disable startup warming in the provided Compose files as an operational fallback.

Assisted-by: Codex:gpt-5
Signed-off-by: Richard Palethorpe <io@richiejp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant