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

未关闭
#202 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
领域
cli, networking

调研方向

首先,使用大小已知或可通过哈希校验的大型流,通过 sprite exec 的 stdout 入口点重现该问题,然后检查 WebSocket 的帧处理路径。完成的标准是大型 stdout 按字节完全一致,或者预期的大小限制在达到阈值时产生明确的非零退出错误。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
MDX
星标
53
派生
5
平均合并
1 天 15 小时
30 天内合并 PR
4

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

superfly/sprites-docs 的其他 Issue

查看 superfly/sprites-docs 的全部 Issue

相似的 Issue

更多 CLI Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。