Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

nvx-rs: lock sandbox stores without a dedicated lock file

Aperta
#647 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
linux, rust

Direzione di ricerca

Start by reading SandboxStore::lock in nvx-rs/src/host/store/mod.rs and the lock tests, especially the_lock_excludes_other_holders; the issue links the implementation and specifies tests/store.rs for validation. Evaluate locking the store directory and a long-lived sandbox record against the stated process, crash, timeout, and privacy guarantees on Linux and Windows. Done means cargo test --all-features and the check-nvx-rs checks pass on both platforms, or the issue records why neither option meets the requirements.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Follow-up to #628, from its review. It waits for #628 to merge.

Summary

SandboxStore::lock serializes the lifecycle transitions of a sandbox through a dedicated lock file in the store's directory: it opens or creates the file, refuses it unless it is private to the current user, takes File::lock on it, and retries when the file was removed or replaced while it waited. The file stays in the directory after the lock is released. Replace the lock file with file-system locking on an object that the store already has, so the store needs no extra file and none of the code that handles one.

Options to evaluate

  • Lock the store's directory itself. On Linux, flock works on a directory opened read-only. On Windows, a directory handle cannot take a byte-range lock, so this needs another mechanism there, such as an exclusive share mode on the directory handle.
  • Lock a record that the store keeps for the sandbox's lifetime, if the atomic replacement of records by rename can coexist with the lock.

Requirements

  • Keep the guarantees of the current lock: it excludes holders in other processes, including an orchestrator and its successor; a crash releases it; a deadline bounds the wait with ErrorKind::TimedOut; and others cannot take or hold it, as the privacy check of the lock file ensures today.
  • Keep behavior identical on Linux and Windows, or document any difference.
  • Keep the_lock_excludes_other_holders and the lock tests passing, and add coverage for any new failure mode.

If no option meets these requirements on both platforms, record why in this issue and close it.

Validation

cargo test --all-features for nvx-rs/Cargo.toml on Linux and Windows, including tests/store.rs, and the rest of check-nvx-rs.

Lingua principale
Python
Stelle
408
Fork
28
Merge medio
16h 18m
PR unite (30g)
332

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/nvx

Tutte le issue di microsoft/nvx

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.