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

Fix dpkg lock #15735

Merged
merged 1 commit into from May 19, 2024
Merged

Fix dpkg lock #15735

merged 1 commit into from May 19, 2024

Conversation

k-v1
Copy link
Contributor

@k-v1 k-v1 commented Jul 7, 2023

Why I did it

Fix #15722

We don't need to use a lock file every time we call dpkg.
For some commands, like dpkg --print-architecture or dpkg --compare-versions, this action is not required.
Moreover, sometimes these commands are called by apt-get and dpkg -i, and we get a deadlock in this case.

Work item tracking
  • Microsoft ADO (number only):

How I did it

Use dpkg lock only for dpkg commands that use /var/lib/dpkg/lock or /var/lib/dpkg/lock-frontend.
I mean dpkg -i, dpkg -P, ...

How to verify it

Check there is no dpkg lock errors in build log.
Check build time of docker-sonic-vs.gz:

old:
08:57:14[ building ] [ target/docker-sonic-vs.gz ]
09:12:47 [ finished ] [ target/docker-sonic-vs.gz ]

new:
01:45:12[ building ] [ target/docker-sonic-vs.gz ]
01:50:39 [ finished ] [ target/docker-sonic-vs.gz ]

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • [ x] 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@k-v1 k-v1 marked this pull request as ready for review July 7, 2023 14:33
@k-v1
Copy link
Contributor Author

k-v1 commented Jul 7, 2023

@xumia @liushilongbuaa

Could you please review?

@liushilongbuaa
Copy link
Contributor

The issue is true. I will check the PR.

@lguohan
Copy link
Collaborator

lguohan commented May 19, 2024

/azpw run

@lguohan
Copy link
Collaborator

lguohan commented May 19, 2024

@liushilongbuaa , lgtm, merging it.

@lguohan lguohan merged commit 60b1440 into sonic-net:master May 19, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deadlock when build docker-sonic-vs.gz
3 participants