Skip to content

test(e2e): reproduce constrained dev shm failure - #522

Merged
wan9chi merged 2 commits into
mainfrom
constrained-dev-shm-e2e
Jul 10, 2026
Merged

test(e2e): reproduce constrained dev shm failure#522
wan9chi merged 2 commits into
mainfrom
constrained-dev-shm-e2e

Conversation

@wan9chi

@wan9chiwan9chi commented Jul 9, 2026

Copy link
Copy Markdown
Member

Motivation

Reproduce issue #353 reliably before changing the Linux shared-memory backend.

Changes

  • Adds vtt small_dev_shm, which mounts a one-page tmpfs at /dev/shm inside private user and mount namespaces.
  • Adds vtt stat_long_filename and calls std::fs::metadata with a 1 MiB path.
  • Intercepts glibc statx so the metadata call is recorded through the preload library.
  • Adds a Linux glibc E2E fixture that records the current SIGBUS failure as exit code 135.

@wan9chiGraphite App

wan9chi commented Jul 9, 2026

Copy link
Copy Markdown
MemberAuthor

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:aaaf01b298

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadcrates/vite_task_bin/src/vtt/stat_file.rs Outdated
Comment threadcrates/vite_task_bin/src/vtt/stat_file.rs
@wan9chi
wan9chiforce-pushed the fspy-shm-lifecycle branch from 67ee808 to 669ab52CompareJuly 9, 2026 07:57
@wan9chi
wan9chiforce-pushed the constrained-dev-shm-e2e branch from aaaf01b to a64e9b8CompareJuly 9, 2026 07:57
@wan9chi
wan9chiforce-pushed the fspy-shm-lifecycle branch 2 times, most recently from 70822fb to 8716c77CompareJuly 9, 2026 14:16
@wan9chi
wan9chiforce-pushed the constrained-dev-shm-e2e branch from a64e9b8 to ae72983CompareJuly 9, 2026 14:16
@wan9chi
wan9chi marked this pull request as draft July 10, 2026 01:16
@wan9chi
wan9chiforce-pushed the fspy-shm-lifecycle branch from 8716c77 to 4e0e749CompareJuly 10, 2026 06:02
@wan9chi
wan9chiforce-pushed the constrained-dev-shm-e2e branch from ae72983 to ac080f6CompareJuly 10, 2026 06:02
Comment threadcrates/vite_task_bin/src/vtt/small_dev_shm.rs
Comment threadcrates/vite_task_bin/src/vtt/small_dev_shm.rs Outdated
Comment threadcrates/vite_task_bin/src/vtt/small_dev_shm.rs Outdated
Comment threadcrates/vite_task_bin/src/vtt/stat_long_filename.rs
Comment threadcrates/vite_task_bin/Cargo.toml
@wan9chi
wan9chiforce-pushed the constrained-dev-shm-e2e branch 3 times, most recently from 4119fee to d949311CompareJuly 10, 2026 07:14
@wan9chi
wan9chiforce-pushed the constrained-dev-shm-e2e branch from d949311 to 23ada60CompareJuly 10, 2026 07:27
@wan9chi
wan9chi marked this pull request as ready for review July 10, 2026 07:37

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:23ada60b5c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@wan9chi
wan9chiforce-pushed the constrained-dev-shm-e2e branch from 23ada60 to 7c023afCompareJuly 10, 2026 08:12
Comment threadcrates/fspy_preload_unix/src/macros/linux.rs Outdated
Comment threadcrates/vite_task_bin/src/vtt/main.rs Outdated
Comment threadcrates/fspy_preload_unix/src/interceptions/stat.rs Outdated
@wan9chi
wan9chiforce-pushed the constrained-dev-shm-e2e branch from 7c023af to 3d71f50CompareJuly 10, 2026 09:41
@wan9chi
wan9chi marked this pull request as draft July 10, 2026 09:46
@wan9chi
wan9chi marked this pull request as ready for review July 10, 2026 10:14

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:3d71f5099a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +63 to +68
let Some(original) = statx::try_original() else {
// Rust's standard library interprets ENOSYS from its statx availability
// probe as unsupported and falls back to stat64.
// SAFETY: __errno_location returns the calling thread's errno storage on Linux.
unsafe { *libc::__errno_location() = libc::ENOSYS };
return -1;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Fall back to the raw syscall when libc lacks statx

On Linux systems whose libc does not export statx (for example older glibc targets), this LD_PRELOAD library still exports statx, so code that weak-links or dlsyms statx will call this shim instead of taking its own SYS_statx fallback. Returning ENOSYS here changes those traced tasks from a working kernel statx call into a failure; please invoke the raw SYS_statx path (and record the access) when RTLD_NEXT has no statx rather than exposing a stub.

Useful? React with 👍 / 👎.

@wan9chi
wan9chiforce-pushed the constrained-dev-shm-e2e branch from 3d71f50 to 8dac1e8CompareJuly 10, 2026 14:59
@wan9chi
wan9chi marked this pull request as draft July 10, 2026 15:00
@wan9chi
wan9chiforce-pushed the constrained-dev-shm-e2e branch from 8dac1e8 to 3433486CompareJuly 10, 2026 23:32
@wan9chi
wan9chi marked this pull request as ready for review July 10, 2026 23:33
@wan9chi
wan9chi changed the base branch from fspy-shm-lifecycle to graphite-base/522July 10, 2026 23:36
Co-authored-by: GPT-5.6 <gpt-5.6@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
@wan9chi
wan9chiforce-pushed the constrained-dev-shm-e2e branch from 3433486 to 0f5caccCompareJuly 10, 2026 23:36
@graphite-app
graphite-appBot changed the base branch from graphite-base/522 to mainJuly 10, 2026 23:37
Co-authored-by: GPT-5 Codex <codex@openai.com>
@wan9chi
wan9chiforce-pushed the constrained-dev-shm-e2e branch from 0f5cacc to cf3315bCompareJuly 10, 2026 23:37
@wan9chi
wan9chi merged commit 9e72876 into mainJul 10, 2026
16 checks passed
@wan9chiGraphite App

Copy link
Copy Markdown
MemberAuthor

Merge activity

@wan9chi
wan9chi deleted the constrained-dev-shm-e2e branch July 10, 2026 23:40
wan9chi added a commit to voidzero-dev/vite-plus that referenced this pull request Jul 15, 2026
Bumps the `vite-task` git dependency from `cb580c2` to `4003f65`.
## Changes
The delta is entirely internal `fspy` (file-access tracking)
shared-memory work — no user-facing CLI flags, config fields, or
behavior changes, so no docs updates were needed.
- **fix(fspy):** use `memfd` for Linux shared memory — automatic
file-access tracking on Linux now works in containers and Kubernetes
runners with limited `/dev/shm` space
([#523](voidzero-dev/vite-task#523),
[#353](voidzero-dev/vite-task#353))
- **perf(fspy):** use sparse Windows shared memory — Windows file-access
tracking now uses sparse temporary backing files where supported,
avoiding upfront allocation of the full backing file on disk
([#524](voidzero-dev/vite-task#524))
- **refactor(fspy):** own macOS shared-memory mapping
([#526](voidzero-dev/vite-task#526))
- **docs/test(fspy):** document shared-memory facade ownership semantics
([#521](voidzero-dev/vite-task#521)); reproduce
constrained dev shm failure
([#522](voidzero-dev/vite-task#522))
The lockfile change reflects this refactor: `fspy` now pulls in `memfd`
and drops `shared_memory`.
## Validation
- `cargo check --workspace` passes — the new `vite-task` compiles
cleanly, confirming no breaking changes on the consuming side (including
`vite_cli_snapshots`, which compiles against vite-task's PTY/snapshot
test crates).
- vite-plus crate tests pass. (One pre-existing, environment-specific
stack overflow in `vite_global_cli`'s
`unknown_argument_detected_with_pass_as_value_hint` clap-parsing test
reproduces identically on `main` and is unrelated to this bump.)
- PTY snapshot output is unchanged by the bump; the remaining local
snapshot diffs in this sandbox are all environmental (no built
`packages/cli/dist`, plus registry TLS/network restrictions), left to
CI, which builds the JS CLI and has registry access.
## Changelog
Full vite-task CHANGELOG diff:
``https://github.com/voidzero-dev/vite-task/compare/cb580c214bb2314fc1f633a3812782c9b3a1d956...4003f65a3e5e3d957ff81b157e85e6ee41cc59fc#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed``
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---
_Generated by [Claude
Code](https://claude.ai/code/session_01YERo1yECf81w37US2Gqnow)_
Co-authored-by: Claude <noreply@anthropic.com>
Sign up for freeto 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

@wan9chi