mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #352] serve: temporary image remains when vision encoder pipe raises #167
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#167
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Tsury on GitHub (Oct 1, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/352
Failure
In v0.1.31 (
9259cad4cfa3543cd3b8decab5962672b968c649),Vision.encode()writes a temporary.imgfile, then writes/flushes the encoder pipe and reads its reply. Theimg.unlink()call is after those operations.If the encoder pipe raises (for example,
BrokenPipeErrorafter the encoder exits), that image remains in the server's vision temporary directory. The request raises, but cleanup is skipped. Repeated failures on different images can retain additional image copies while the server stays alive.Reproducer
Run in the checkout's Python environment. No model, GPU or encoder process is needed. The synthetic bytes only exercise I/O cleanup; they are never decoded.
Confirmed against the exact v0.1.31
Visionclass extracted fromserve/server.py(source SHA256d8ab9bb83001123165c14beb46b034ff33bce156957d0241d676aec0ea5407a4). Original exception:BrokenPipeError; remaining.imgfiles: 1.Expected / narrow repair
Remove the temporary input image even when pipe write, flush or read raises, while preserving the original exception. Put the pipe exchange inside
try/finally, withimg.unlink(missing_ok=True)infinally. Cache only successful embeddings as before.Our local repair uses that cleanup. This report does not claim to fix encoder restart/recovery, and does not require an inference-policy or sampling change.
@Niko1221 commented on GitHub (Oct 1, 2026):
Thanks! Fixed for the next release: the temporary image is removed in a
finally, with a test for a pipe that fails. This issue closes with the release.@Niko1221 commented on GitHub (Oct 1, 2026):
Fixed in 0.1.33. Thanks!