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

odd behavior with conflicting outputs with native_test on windows #543

Open
novas0x2a opened this issue Oct 5, 2024 · 0 comments
Open

Comments

@novas0x2a
Copy link

So, to start with, I should say I'm not sure what was supposed to happen here. The circumstance that led to this was my accidentally setting the out parameter of native_test to the same value in two different targets (in the same package); I acknowledge that this is not the correct thing to do :). I was surprised that bazel let me do that without erroring immediately?

With that said, this seems to be triggering a race condition that leads to an odd failure on windows, so I figured I'd report it in case this pathological behavior is triggering a different bug.

The reproduction is here: https://github.com/novas0x2a/native-test-repro. The repo script is run.sh. The HEAD as I write this is novas0x2a/native-test-repro@761b23c

  • On linux, you can run run.sh and it will loop forever just fine.
  • On windows, it appears to race. After a few successful loops, the loop will terminate with:
INFO: Analyzed 4 targets (0 packages loaded, 0 targets configured).
ERROR: C:/<redacted>/native-test-repro/BUILD.bazel:13:12: Testing //:windows-one (run 3 of 5) failed: java.io.IOException: F:/<redacted>/kcgnk7y7/execroot/__main__/_tmp/a2722bcc0b9902c7324c6c5148102354 (Permission denied)
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.265s, Critical Path: 0.04s
INFO: 11 processes: 11 internal.
ERROR: Build did NOT complete successfully
//:unix-one                                                             SKIPPED
//:unix-two                                                             SKIPPED
//:windows-one                                                        NO STATUS
//:windows-two                                                        NO STATUS

Executed 0 out of 4 tests: 4 were skipped.

It appears to be racing on the deletion of the TEST_TMPDIR, though I'm not sure about that. Windows doesn't like it when you delete directories that have files in them that another process has open; I assume that's what's happening here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant