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

[Flake] vcpkg Failed to take the filesystem lock #4487

Closed
devjgm opened this issue Jul 8, 2020 · 5 comments · Fixed by microsoft/vcpkg#12227
Closed

[Flake] vcpkg Failed to take the filesystem lock #4487

devjgm opened this issue Jul 8, 2020 · 5 comments · Fixed by microsoft/vcpkg#12227
Assignees
Labels
cpp: flake A test with false positives (failures that are not interesting) type: cleanup An internal cleanup or hygiene concern.

Comments

@devjgm
Copy link
Contributor

devjgm commented Jul 8, 2020

In the Windows Docker quickstart cmake presubmit build:

https://source.cloud.google.com/results/invocations/152e696f-0409-447d-bfe7-19c052095160/targets/cloud-cpp%2Fgithub%2Fgoogle-cloud-cpp%2Fmaster%2Fdocker%2Fquickstart-cmake-presubmit/log

[76/77] Building CXX object CMakeFiles/vcpkglib.dir/src/vcpkg/vcpkglib.cpp.o
[77/77] Linking CXX executable vcpkg
Telemetry
---------
vcpkg collects usage data in order to help us improve your experience.
The data collected by Microsoft is anonymous.
You can opt-out of telemetry by re-running the bootstrap-vcpkg script with -disableMetrics,
passing --disable-metrics to vcpkg on the command line,
or by setting the VCPKG_DISABLE_METRICS environment variable.

Read more about vcpkg telemetry at docs/about/privacy.md
There are no outdated packages.
Waiting to take filesystem lock on /h/vcpkg-quickstart/.vcpkg-root...
Failed to take the filesystem lock on /h/vcpkg-quickstart/.vcpkg-root:
    Device or resource busy
Exiting now.
2020-07-08T21:44:00Z: Docker run failed with exit status 1.
@devjgm devjgm added the type: cleanup An internal cleanup or hygiene concern. label Jul 8, 2020
@devjgm devjgm self-assigned this Jul 8, 2020
@devjgm
Copy link
Contributor Author

devjgm commented Jul 8, 2020

Seems to be related to microsoft/vcpkg#12286 (filed 2 days ago) and may be fixed in microsoft/vcpkg#12286

@coryan
Copy link
Contributor

coryan commented Jul 9, 2020

@ras0219-msft
Copy link

Cross-posted to microsoft/vcpkg#12286:

docker .... --volume /tmpfs/src/github/google-cloud-cpp/cmake-out/home/ci-ubuntu-18.04-quickstart-cmake:/h ....
...
Waiting to take filesystem lock on /h/vcpkg-quickstart/.vcpkg-root...
Failed to take the filesystem lock on /h/vcpkg-quickstart/.vcpkg-root:
Device or resource busy
Exiting now.

It looks like the file locking APIs we use are unavailable in a mapped docker volume. This looks like a straightforward case of "we should offer an environment variable to not take the lock". Users in docker could then pass --env VCPKG_SKIP_LOCKING=1.

@devjgm devjgm added external This issue is blocked on a bug with the actual product. and removed external This issue is blocked on a bug with the actual product. labels Jul 9, 2020
strega-nil added a commit to microsoft/vcpkg that referenced this issue Jul 9, 2020
@strega-nil
Copy link

strega-nil commented Jul 9, 2020

This should be fixed by microsoft/vcpkg#12227.

devjgm added a commit to devjgm/google-cloud-cpp that referenced this issue Jul 10, 2020
Fixes googleapis#4487

The flag was implemented by Microsoft in
microsoft/vcpkg#12227, thanks to @strega-nil!

I believe we were seeing this flake not because of multiple installs
happening at once, but rather because the machines that run our docker
tests were sometimes overloaded and running very slow and thus it
sometimes took more than 1.5 sec to acquire the lock. This is just a
hypothesis.

But regardless, we're now passing `--x-wait-for-lock` to all of our
`vcpkg install` invocations to avoid these flakes.
@devjgm
Copy link
Contributor Author

devjgm commented Jul 10, 2020

As pointed about above, this is fixed by microsoft/vcpkg#12227. Thanks to @strega-nil for the fix!

@devjgm devjgm closed this as completed Jul 10, 2020
BillyONeal pushed a commit to microsoft/vcpkg-tool that referenced this issue Dec 8, 2020
Fixes #12190
Fixes #12208
Fixes #12234
Fixes #12286
Fixes #12315
Fixes #12186
Fixes #12331
Fixes googleapis/google-cloud-cpp#4487
@coryan coryan added the cpp: flake A test with false positives (failures that are not interesting) label Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cpp: flake A test with false positives (failures that are not interesting) type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
4 participants