Bug: `sprite exec` stdout silently drops bytes by volume on large streams

Đang mở
#202 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Lĩnh vực
cli, networking

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện vấn đề thông qua điểm vào stdout của sprite exec với một luồng lớn có kích thước đã biết hoặc có thể kiểm tra bằng hash, sau đó kiểm tra đường dẫn framing của WebSocket. Công việc được xem là hoàn tất khi stdout lớn chính xác từng byte, hoặc khi một giới hạn kích thước được dự định tạo ra lỗi rõ ràng với mã thoát khác 0 tại ngưỡng đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Summary

sprite exec stdout silently drops bytes by volume on large outputs. There is no error and no non-zero exit — the receiving side just gets corrupted/truncated data.

Reproduction

Run an in-box command that emits a large, verifiable stream to stdout (e.g. a known-size payload or a hash-checkable blob) and compare what the host receives against what the box produced.

Observed in our usage:

  • Corruption begins at roughly 512 KB of stdout.
  • Loss reaches ~76% at around 4 MB.

The failure is silent: exit code 0, no stderr, no truncation marker — the bytes are simply missing.

Impact

Any workflow that moves a sizable payload through sprite exec stdout (for example a base64-encoded file, a large log, or a build artifact manifest) receives corrupted data with no signal that anything went wrong. This is especially dangerous because a naive integrity assumption ("exec succeeded, so stdout is complete") silently holds false.

Our workaround

We abandoned moving any sizable data through sprite exec stdout and route every transfer through sprite file pull/push instead, which is byte-exact in our testing (verified byte-for-byte to ~16 MB pull / ~8 MB push). We additionally carry a sha256 + byte-count header end-to-end and re-verify on landing, so a lossy channel surfaces as an integrity error rather than corrupt input.

Ask

Either:

  • fix the WebSocket framing so sprite exec stdout is byte-exact for large streams, or
  • if a hard size limit on exec stdout is intended, surface it as an explicit, non-zero-exit error at the threshold instead of silently truncating.

Happy to provide a minimal repro script if useful.

Ngôn ngữ chính
MDX
Star
53
Fork
5
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
4

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của superfly/sprites-docs

Tất cả issue của superfly/sprites-docs

Issue tương tự

Thêm issue về CLI

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.