Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spurious error "Text file busy (os error 26)" during test freshness::changing_bin_features_caches_targets of Cargo #50962

Closed
kennytm opened this issue May 22, 2018 · 2 comments · Fixed by rust-lang/cargo#5557
Labels
A-spurious Area: Spurious failures in builds (spuriously == for no apparent reason) C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-cargo Relevant to the cargo team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Comments

@kennytm
Copy link
Member

kennytm commented May 22, 2018

Symptom: The test freshness::changing_bin_features_caches_targets of Cargo in the job x86_64-gnu-aux failed with error "Text file busy (os error 26)" in Hamcrest.

[01:43:51] test workspaces::workspace_with_transitive_dev_deps ... ok
[01:43:51] 
[01:43:51] failures:
[01:43:51] 
[01:43:51] ---- freshness::changing_bin_features_caches_targets stdout ----
[01:43:51]  running `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/cargo build`
[01:43:51] running `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/cit/t532/foo/target/debug/off1`
[01:43:51] thread 'freshness::changing_bin_features_caches_targets' panicked at '
[01:43:51] Expected: execs
[01:43:51]     but: could not exec process `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/cit/t532/foo/target/debug/off1`: could not execute process `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/cit/t532/foo/target/debug/off1` (never executed)
[01:43:51] caused by: could not execute process `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/cit/t532/foo/target/debug/off1` (never executed)
[01:43:51] caused by: Text file busy (os error 26)', tools/cargo/tests/testsuite/hamcrest.rs:13:9
[01:43:51] 
[01:43:51] 
[01:43:51] failures:
[01:43:51]     freshness::changing_bin_features_caches_targets

Previous instances:

@kennytm kennytm added A-spurious Area: Spurious failures in builds (spuriously == for no apparent reason) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC labels May 22, 2018
@kennytm
Copy link
Member Author

kennytm commented May 22, 2018

cc @ehuss rust-lang/cargo#5493 I believe this is the cause.

@kennytm kennytm added the T-cargo Relevant to the cargo team, which will review and decide on the PR/issue. label May 22, 2018
ehuss added a commit to ehuss/cargo that referenced this issue May 22, 2018
Fixes rust-lang/rust#50962.

My theory is that while copying the binary, another thread forked with the fd
open.  The copy finishes and attempts to exec before the other child execs (and
closes the writeable fd).

I was able to easily repro this on linux.  I ran some stress tests of this fix
locally on linux and on appveyor, and was unable to trigger it again.
@ehuss
Copy link
Contributor

ehuss commented May 22, 2018

Sorry about that, I have posted a PR for a fix.

bors added a commit to rust-lang/cargo that referenced this issue May 22, 2018
Fix test failure in changing_bin_features_caches_targets for Linux.

Fixes rust-lang/rust#50962.

My theory is that while copying the binary, another thread forked with the fd
open.  The copy finishes and attempts to exec before the other child execs (and
closes the writeable fd).

I was able to easily repro this on linux.  I ran some stress tests of this fix
locally on linux and on appveyor, and was unable to trigger it again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-spurious Area: Spurious failures in builds (spuriously == for no apparent reason) C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-cargo Relevant to the cargo team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants