You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@liushilongbuaa
Could you help with this issue?
You already fixed #13150 when dpkg calls dpkg. But as you can see, apt-get also can call dpkg and we need something to avoid lock loop in this case.
One possible solution is to lock only when we install or uninstall a package using dpkg and to ignore other actions (like --compare-versions). But we need to check that we don't break anything else in this case.
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.
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 ]
Description
master branch
apt_installation_lock doesn't work correctly when we install some deb packages (e.g. openssh-server for docker-sonic-vs)
Steps to reproduce the issue:
Describe the results you received:
Elapsed time is 17 min.
From target/docker-sonic-vs.gz.log (it takes 10 min):
That's because apt-get calls dpkg when install openssh-server:
/usr/bin/dpkg --compare-versions lt-nl 1:6.6p1-1
Describe the results you expected:
Elapsed time is 3-5 min and no errors in build log.
Output of
show version
:Output of
show techsupport
:Additional information you deem important (e.g. issue happens only occasionally):
The text was updated successfully, but these errors were encountered: