8000 Add timeout for dpkg frontend lock by LoopedBard3 · Pull Request #100653 · dotnet/runtime · GitHub
[go: up one dir, main page]

Skip to content

Add timeout for dpkg frontend lock#100653

Merged
LoopedBard3 merged 8 commits intodotnet:mainfrom
LoopedBard3:PerfFixDpkgFrontendLock
Apr 9, 2024
Merged

Add timeout for dpkg frontend lock#100653
LoopedBard3 merged 8 commits intodotnet:mainfrom
LoopedBard3:PerfFixDpkgFrontendLock

Conversation

@LoopedBard3
Copy link
Member

Add timeout for dpkg frontend lock as our cloud VM tests occasionally fail due to not being able to get a lock on the file when trying to apt install.

sudo apt-get -y install python3-pip
E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 1519 (dpkg)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

Run with failure example: https://dev.azure.com/dnceng/internal/_build/results?buildId=2422504&view=results
Test run: https://dev.azure.com/dnceng/internal/_build/results?buildId=2422036&view=results

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

@caaavik-msft
Copy link
Contributor

This looks good, do you happen to know what the other dpkg process is that is holding the lock? One thing we could maybe do to give us this information would be to add do if [ -z "$printed" ]; then echo "Waiting for dpkg lock to be released... Lock is held by: $(ps -o cmd= -p $(sudo fuser /var/lib/dpkg/lock-frontend))"; printed=1; fi; before the sleep inside the while loop. Then maybe in the future we could look at these logs to see if we can avoid the conflict altogether

Copy link
Contributor
@caaavik-msft caaavik-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's good to merge as it is, but have left comments for other improvements if you think they sound good.

@LoopedBard3 LoopedBard3 merged commit 09153a3 into dotnet:main Apr 9, 2024
@LoopedBard3 LoopedBard3 deleted the PerfFixDpkgFrontendLock branch April 9, 2024 19:41
matouskozak pushed a commit to matouskozak/runtime that referenced this pull request Apr 30, 2024
* Add wait for the bpkg lock to be unlocked, up to 2 minutes.
* Add a printout for the file that is holding the dpkg lock-frontend so we can further investigate in the future.
* Adding a printout that prints that we are still waiting to make when we continued more clear.
@github-actions github-actions bot locked and limited conversation to collaborators May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0