GRI-2088: fix ETXTBSY race in pdf.rs and pptx_video acceptance test #332
No reviewers
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage!332
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/GRI-2088-pdf-etxtbsy"
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?
Fixes the reopened ETXTBSY race (#220): the same race from PR #221 also existed in
crates/server/src/pdf.rsandcrates/server/tests/pptx_video_acceptance_integration.rs, both viafake_programwriting the fake script withstd::fs::writein-process while concurrent test threads fork.fake_programin both files now writes the script through a piped childsh(cat > "$1" && chmod 755 "$1") instead of writing it in-process, so this process never holds a writable fd on the fake program for a concurrentfork()to inherit. Removed the now-unusedPermissionsExtimport.Also added
{error:?}to the bareassert!(matches!(error, ...))assertions inpdf.rsandpptx_video.rs, so a recurrence prints the actual error instead of a bare panic.Evidence:
pdf::testslooped 50x with--test-threads=16: 0 failures (previously intermittentETXTBSYontimes_out_when_the_converter_hangs).pptx_video::testsunit suite still green (regression check, same fix as #221).pptx_video_acceptance_integrationbuilds clean (--no-run; DB-gated, not run locally).local-gates.sh: all gates passed (Rust + frontend-web).Blocks #217 (#206), which blocks the redeploy to the campus test servers.
Reviewed. Same shape as #221: the script is written by a child sh, so this process never holds a writable fd on the fake program for a concurrent fork to inherit; stdin is dropped at the end of the write statement, so cat sees EOF before wait. The {error:?} on the matches! asserts makes a recurrence readable. Up to date with dev. Merge on green cargo test.