microsoft / vscode-dev-containers

NOTE: Most of the contents of this repository have been migrated to the new devcontainers GitHub org (https://github.com/devcontainers). See https://github.com/devcontainers/template-starter and https://github.com/devcontainers/feature-starter for information on creating your own!
https://aka.ms/vscode-remote
MIT License
4.72k stars 1.4k forks source link

Hash Sum Mismatch docker-in-docker #1165

Closed DanceParty closed 2 years ago

DanceParty commented 3 years ago

Steps to Reproduce:

  1. Following the instructions to add docker-in-docker-debian to my Dockerfile
  2. Run docker build -t <name> -f <path> .

The above steps get me this error:

 => ERROR [13/14] RUN apt-get update && /bin/bash /tmp/library-scripts/docker-in-docker-debian.sh                                                                                                                    23.7s
------                                                                                                                                                                                                                     
 > [13/14] RUN apt-get update && /bin/bash /tmp/library-scripts/docker-in-docker-debian.sh:                                                                                                                                
#17 0.346 Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]                                                                                                                              
#17 0.357 Hit:2 http://deb.debian.org/debian buster InRelease                                                                                                                                                              
#17 0.357 Hit:3 http://repo.mysql.com/apt/debian jessie InRelease                                                                                                                                                          
#17 0.365 Get:4 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]                                                                                                                                            
#17 0.373 Hit:5 https://dl.yarnpkg.com/debian stable InRelease
#17 0.384 Hit:6 https://deb.nodesource.com/node_16.x buster InRelease
#17 0.728 Get:7 http://security.debian.org/debian-security buster/updates/main amd64 Packages [309 kB]
#17 0.993 Fetched 426 kB in 1s (596 kB/s)
#17 0.993 Reading package lists...
#17 1.639 Skipping apt-get update.
#17 1.651 Reading package lists...
#17 2.258 Building dependency tree...
#17 2.394 Reading state information...
#17 2.522 ca-certificates is already the newest version (20200601~deb10u2).
#17 2.522 curl is already the newest version (7.64.0-4+deb10u2).
#17 2.522 dirmngr is already the newest version (2.2.12-1+deb10u1).
#17 2.522 The following packages were automatically installed and are no longer required:
#17 2.522   libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libgnutls-dane0
#17 2.522   libgnutls-openssl27 libgnutls28-dev libgnutlsxx28 libidn2-dev libmariadb3
#17 2.522   libp11-kit-dev libreadline5 libsnappy1v5 libtasn1-6-dev libterm-readkey-perl
#17 2.523   libunbound8 mariadb-common nettle-dev
#17 2.523 Use 'apt autoremove' to remove them.
#17 2.523 The following additional packages will be installed:
#17 2.523   cgroupfs-mount libip4tc0 libip6tc0 libiptc0 liblxc1 libnetfilter-conntrack3
#17 2.524   libnfnetlink0 libnftnl11
#17 2.525 Suggested packages:
#17 2.525   kmod btrfs-progs lvm2 python3-lxc
#17 2.525 Recommended packages:
#17 2.525   nftables apparmor bridge-utils debootstrap dnsmasq-base libpam-cgfs lxcfs
#17 2.525   lxc-templates rsync uidmap
#17 2.617 The following NEW packages will be installed:
#17 2.617   apt-transport-https cgroupfs-mount gnupg2 iptables libip4tc0 libip6tc0
#17 2.618   libiptc0 liblxc1 libnetfilter-conntrack3 libnfnetlink0 libnftnl11 lxc pigz
#17 2.718 0 upgraded, 13 newly installed, 0 to remove and 24 not upgraded.
#17 2.718 Need to get 2368 kB of archives.
#17 2.718 After this operation, 7607 kB of additional disk space will be used.
#17 2.718 Get:1 http://deb.debian.org/debian buster/main amd64 pigz amd64 2.4-1 [57.8 kB]
#17 2.770 Get:2 http://deb.debian.org/debian buster/main amd64 libip4tc0 amd64 1.8.2-4 [70.2 kB]
#17 2.801 Get:3 http://deb.debian.org/debian buster/main amd64 libip6tc0 amd64 1.8.2-4 [70.5 kB]
#17 2.837 Get:4 http://deb.debian.org/debian buster/main amd64 libiptc0 amd64 1.8.2-4 [59.6 kB]
#17 2.874 Get:5 http://deb.debian.org/debian buster/main amd64 libnfnetlink0 amd64 1.0.1-3+b1 [13.9 kB]
#17 2.879 Get:6 http://deb.debian.org/debian buster/main amd64 libnetfilter-conntrack3 amd64 1.0.7-1 [42.4 kB]
#17 2.896 Get:7 http://deb.debian.org/debian buster/main amd64 libnftnl11 amd64 1.1.2-2 [56.2 kB]
#17 2.931 Get:8 http://deb.debian.org/debian buster/main amd64 iptables amd64 1.8.2-4 [399 kB]
#17 3.068 Get:9 http://deb.debian.org/debian buster/main amd64 apt-transport-https all 1.8.2.3 [149 kB]
#17 3.120 Get:10 http://deb.debian.org/debian buster/main amd64 cgroupfs-mount all 1.4 [6276 B]
#17 3.122 Get:11 http://deb.debian.org/debian buster/main amd64 gnupg2 all 2.2.12-1+deb10u1 [393 kB]
#17 3.237 Get:12 http://deb.debian.org/debian buster/main amd64 liblxc1 amd64 1:3.1.0+really3.0.3-8 [298 kB]
#17 3.327 Get:13 http://deb.debian.org/debian buster/main amd64 lxc amd64 1:3.1.0+really3.0.3-8 [752 kB]
#17 3.703 debconf: delaying package configuration, since apt-utils is not installed
#17 3.727 Fetched 2368 kB in 1s (2518 kB/s)
#17 3.745 Selecting previously unselected package pigz.
(Reading database ... 27742 files and directories currently installed.)
#17 3.766 Preparing to unpack .../00-pigz_2.4-1_amd64.deb ...
#17 3.770 Unpacking pigz (2.4-1) ...
#17 3.800 Selecting previously unselected package libip4tc0:amd64.
#17 3.802 Preparing to unpack .../01-libip4tc0_1.8.2-4_amd64.deb ...
#17 3.807 Unpacking libip4tc0:amd64 (1.8.2-4) ...
#17 3.837 Selecting previously unselected package libip6tc0:amd64.
#17 3.840 Preparing to unpack .../02-libip6tc0_1.8.2-4_amd64.deb ...
#17 3.843 Unpacking libip6tc0:amd64 (1.8.2-4) ...
#17 3.873 Selecting previously unselected package libiptc0:amd64.
#17 3.875 Preparing to unpack .../03-libiptc0_1.8.2-4_amd64.deb ...
#17 3.877 Unpacking libiptc0:amd64 (1.8.2-4) ...
#17 3.904 Selecting previously unselected package libnfnetlink0:amd64.
#17 3.906 Preparing to unpack .../04-libnfnetlink0_1.0.1-3+b1_amd64.deb ...
#17 3.909 Unpacking libnfnetlink0:amd64 (1.0.1-3+b1) ...
#17 3.934 Selecting previously unselected package libnetfilter-conntrack3:amd64.
#17 3.936 Preparing to unpack .../05-libnetfilter-conntrack3_1.0.7-1_amd64.deb ...
#17 3.939 Unpacking libnetfilter-conntrack3:amd64 (1.0.7-1) ...
#17 3.967 Selecting previously unselected package libnftnl11:amd64.
#17 3.969 Preparing to unpack .../06-libnftnl11_1.1.2-2_amd64.deb ...
#17 3.972 Unpacking libnftnl11:amd64 (1.1.2-2) ...
#17 3.999 Selecting previously unselected package iptables.
#17 4.001 Preparing to unpack .../07-iptables_1.8.2-4_amd64.deb ...
#17 4.003 Unpacking iptables (1.8.2-4) ...
#17 4.063 Selecting previously unselected package apt-transport-https.
#17 4.066 Preparing to unpack .../08-apt-transport-https_1.8.2.3_all.deb ...
#17 4.069 Unpacking apt-transport-https (1.8.2.3) ...
#17 4.132 Selecting previously unselected package cgroupfs-mount.
#17 4.134 Preparing to unpack .../09-cgroupfs-mount_1.4_all.deb ...
#17 4.142 Unpacking cgroupfs-mount (1.4) ...
#17 4.164 Selecting previously unselected package gnupg2.
#17 4.166 Preparing to unpack .../10-gnupg2_2.2.12-1+deb10u1_all.deb ...
#17 4.168 Unpacking gnupg2 (2.2.12-1+deb10u1) ...
#17 4.198 Selecting previously unselected package liblxc1.
#17 4.200 Preparing to unpack .../11-liblxc1_1%3a3.1.0+really3.0.3-8_amd64.deb ...
#17 4.202 Unpacking liblxc1 (1:3.1.0+really3.0.3-8) ...
#17 4.252 Selecting previously unselected package lxc.
#17 4.255 Preparing to unpack .../12-lxc_1%3a3.1.0+really3.0.3-8_amd64.deb ...
#17 4.257 Unpacking lxc (1:3.1.0+really3.0.3-8) ...
#17 4.356 Setting up gnupg2 (2.2.12-1+deb10u1) ...
#17 4.363 Setting up libip6tc0:amd64 (1.8.2-4) ...
#17 4.369 Setting up libip4tc0:amd64 (1.8.2-4) ...
#17 4.376 Setting up apt-transport-https (1.8.2.3) ...
#17 4.382 Setting up libnftnl11:amd64 (1.1.2-2) ...
#17 4.388 Setting up libiptc0:amd64 (1.8.2-4) ...
#17 4.394 Setting up pigz (2.4-1) ...
#17 4.400 Setting up libnfnetlink0:amd64 (1.0.1-3+b1) ...
#17 4.405 Setting up cgroupfs-mount (1.4) ...
#17 4.423 invoke-rc.d: could not determine current runlevel
#17 4.427 invoke-rc.d: policy-rc.d denied execution of start.
#17 4.435 Setting up liblxc1 (1:3.1.0+really3.0.3-8) ...
#17 4.441 Setting up libnetfilter-conntrack3:amd64 (1.0.7-1) ...
#17 4.447 Setting up lxc (1:3.1.0+really3.0.3-8) ...
#17 4.774 Setting up iptables (1.8.2-4) ...
#17 4.788 update-alternatives: using /usr/sbin/iptables-legacy to provide /usr/sbin/iptables (iptables) in auto mode
#17 4.791 update-alternatives: using /usr/sbin/ip6tables-legacy to provide /usr/sbin/ip6tables (ip6tables) in auto mode
#17 4.794 update-alternatives: using /usr/sbin/iptables-nft to provide /usr/sbin/iptables (iptables) in auto mode
#17 4.797 update-alternatives: using /usr/sbin/ip6tables-nft to provide /usr/sbin/ip6tables (ip6tables) in auto mode
#17 4.800 update-alternatives: using /usr/sbin/arptables-nft to provide /usr/sbin/arptables (arptables) in auto mode
#17 4.803 update-alternatives: using /usr/sbin/ebtables-nft to provide /usr/sbin/ebtables (ebtables) in auto mode
#17 4.807 Processing triggers for libc-bin (2.28-10) ...
#17 4.848 update-alternatives: using /usr/sbin/iptables-legacy to provide /usr/sbin/iptables (iptables) in manual mode
#17 4.852 update-alternatives: using /usr/sbin/ip6tables-legacy to provide /usr/sbin/ip6tables (ip6tables) in manual mode
#17 5.284 MICROSOFT_GPG_KEYS_URI=https://packages.microsoft.com/keys/microsoft.asc
#17 5.588 Hit:1 http://deb.debian.org/debian buster InRelease
#17 5.589 Hit:2 http://security.debian.org/debian-security buster/updates InRelease
#17 5.589 Hit:3 http://repo.mysql.com/apt/debian jessie InRelease
#17 5.592 Hit:4 http://deb.debian.org/debian buster-updates InRelease
#17 5.615 Hit:5 https://deb.nodesource.com/node_16.x buster InRelease
#17 5.628 Hit:6 https://dl.yarnpkg.com/debian stable InRelease
#17 6.103 Get:7 https://packages.microsoft.com/repos/microsoft-debian-buster-prod buster InRelease [29.8 kB]
#17 6.277 Get:8 https://packages.microsoft.com/repos/microsoft-debian-buster-prod buster/main amd64 Packages [132 kB]
#17 6.381 Get:9 https://packages.microsoft.com/repos/microsoft-debian-buster-prod buster/main all Packages [3654 B]
#17 6.395 Fetched 166 kB in 1s (194 kB/s)
#17 6.395 Reading package lists...
#17 7.129 Reading package lists...
#17 7.741 Building dependency tree...
#17 7.883 Reading state information...
#17 8.007 The following packages were automatically installed and are no longer required:
#17 8.007   libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libgnutls-dane0
#17 8.007   libgnutls-openssl27 libgnutls28-dev libgnutlsxx28 libidn2-dev libmariadb3
#17 8.007   libp11-kit-dev libreadline5 libsnappy1v5 libtasn1-6-dev libterm-readkey-perl
#17 8.008   libunbound8 mariadb-common nettle-dev
#17 8.008 Use 'apt autoremove' to remove them.
#17 8.008 The following additional packages will be installed:
#17 8.008   dmsetup libdevmapper1.02.1 moby-containerd moby-runc
#17 8.009 Suggested packages:
#17 8.009   aufs-tools
#17 8.009 Recommended packages:
#17 8.009   apparmor kmod
#17 8.065 The following NEW packages will be installed:
#17 8.066   dmsetup libdevmapper1.02.1 moby-buildx moby-cli moby-containerd moby-engine
#17 8.066   moby-runc
#17 8.159 0 upgraded, 7 newly installed, 0 to remove and 24 not upgraded.
#17 8.159 Need to get 87.1 MB of archives.
#17 8.159 After this operation, 370 MB of additional disk space will be used.
#17 8.159 Get:1 http://deb.debian.org/debian buster/main amd64 libdevmapper1.02.1 amd64 2:1.02.155-3 [141 kB]
#17 8.217 Get:2 http://deb.debian.org/debian buster/main amd64 dmsetup amd64 2:1.02.155-3 [90.8 kB]
#17 8.365 Get:3 https://packages.microsoft.com/repos/microsoft-debian-buster-prod buster/main amd64 moby-buildx amd64 0.7.0+azure-1 [22.8 MB]
#17 12.53 Err:3 https://packages.microsoft.com/repos/microsoft-debian-buster-prod buster/main amd64 moby-buildx amd64 0.7.0+azure-1
#17 12.53   Hash Sum mismatch
#17 12.53   Hashes of expected file:
#17 12.53    - SHA512:d473ab82e874da69f1313a675df1b8c8297c66a82d94c02b1dbf53891938e7eb129c3d7d2fb8a07396910dc2dfdded6c35379254b58285c053650aa628779631
#17 12.53    - SHA256:eb2e9e65089e1c65feaba4f148239ec8b624ff1be0b55dcd5207174329d1e9b6
#17 12.53    - SHA1:c827ebd2bf20f7c001b3fa133f2be76141805873 [weak]
#17 12.53    - MD5Sum:6da5439c2fb34c72ec5f6981c8166f9a [weak]
#17 12.53    - Filesize:22790980 [weak]
#17 12.53   Hashes of received file:
#17 12.53    - SHA512:91d4c4e7ee93661bb7b67b45c8d30cd43908151997341268ede90379ab09464864875501210e078063d52e3642a052ff58423db58e8f5b86a817779b1e84d170
#17 12.53    - SHA256:e0b56001b2f1b6cfc4f4adc3c0d5cc06e682576f83dcc75b55afa8e950e97171
#17 12.53    - SHA1:afd0f4b94a06004de2e1ec3ce41569dee34bcab0 [weak]
#17 12.53    - MD5Sum:e18b8e93ec9879b46570abc7a357bde5 [weak]
#17 12.53    - Filesize:22790980 [weak]
#17 12.53   Last modification reported: Thu, 11 Nov 2021 18:00:31 +0000
#17 12.56 Get:4 https://packages.microsoft.com/repos/microsoft-debian-buster-prod buster/main amd64 moby-cli amd64 20.10.10+azure-1 [10.6 MB]
#17 14.54 Get:5 https://packages.microsoft.com/repos/microsoft-debian-buster-prod buster/main amd64 moby-runc amd64 1.0.2+azure-1 [5334 kB]
#17 15.62 Get:6 https://packages.microsoft.com/repos/microsoft-debian-buster-prod buster/main amd64 moby-containerd amd64 1.4.11+azure-1 [27.0 MB]
#17 20.25 Get:7 https://packages.microsoft.com/repos/microsoft-debian-buster-prod buster/main amd64 moby-engine amd64 20.10.10+azure-1 [21.2 MB]
#17 23.66 Fetched 87.1 MB in 16s (5585 kB/s)
#17 23.66 E: Failed to fetch https://packages.microsoft.com/repos/microsoft-debian-buster-prod/pool/main/m/moby-buildx/moby-buildx_0.7.0+azure-1_amd64.deb  Hash Sum mismatch
#17 23.66    Hashes of expected file:
#17 23.66     - SHA512:d473ab82e874da69f1313a675df1b8c8297c66a82d94c02b1dbf53891938e7eb129c3d7d2fb8a07396910dc2dfdded6c35379254b58285c053650aa628779631
#17 23.66     - SHA256:eb2e9e65089e1c65feaba4f148239ec8b624ff1be0b55dcd5207174329d1e9b6
#17 23.66     - SHA1:c827ebd2bf20f7c001b3fa133f2be76141805873 [weak]
#17 23.66     - MD5Sum:6da5439c2fb34c72ec5f6981c8166f9a [weak]
#17 23.66     - Filesize:22790980 [weak]
#17 23.66    Hashes of received file:
#17 23.66     - SHA512:91d4c4e7ee93661bb7b67b45c8d30cd43908151997341268ede90379ab09464864875501210e078063d52e3642a052ff58423db58e8f5b86a817779b1e84d170
#17 23.66     - SHA256:e0b56001b2f1b6cfc4f4adc3c0d5cc06e682576f83dcc75b55afa8e950e97171
#17 23.66     - SHA1:afd0f4b94a06004de2e1ec3ce41569dee34bcab0 [weak]
#17 23.66     - MD5Sum:e18b8e93ec9879b46570abc7a357bde5 [weak]
#17 23.66     - Filesize:22790980 [weak]
#17 23.66    Last modification reported: Thu, 11 Nov 2021 18:00:31 +0000
#17 23.66 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Chuxel commented 3 years ago

@DanceParty I'm not currently able to reproduce this. It's possible it was related to a blip in the apt feed. Please retry.

I'd also suggest taking a look at the dev container CLI (or just the docker CLI) once you've gotten things set up so you can pre-build dependencies into your image to avoid this happening in the future.

DanceParty commented 3 years ago

Hmm, this has been happening since Friday so not sure there is a blip here. Very possible I could have done something wrong here but not sure :/

Chuxel commented 3 years ago

It's difficult to know without the entire Dockerfile. Try using the docker-in-docker definition to see if you experience an issue there. That's what I did to try to reproduce.

One possible cuplrit is it looks like you have a Debian 8/Jessie feed in your setup:

#17 0.357 Hit:3 http://repo.mysql.com/apt/debian jessie InRelease 

In theory that could cause all sorts of problems since you're mixing distribution versions.

jkeech commented 3 years ago

@Chuxel, is it possible that one of the mirrors of the https://packages.microsoft.com/repos/microsoft-debian-buster-prod/pool/main/m/moby-buildx/moby-buildx_0.7.0+azure-1_amd64.deb package has inconsistent metadata around the expected hashes? Not sure why else that hash mismatch would occur. It seems like an issue with the package feed.

DanceParty commented 3 years ago

I stripped down my dockerfile as much as possible and still having the same issue:

Dockerfile in current form:

FROM ruby:3.0.2-buster

WORKDIR /workspace/project-name

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get clean && rm -rf /var/lib/apt/lists/* && apt-get update

# Docker in docker setup
COPY .devcontainer/library-scripts/*.sh /tmp/library-scripts/
ENV DOCKER_BUILDKIT=1
RUN apt-get update && /bin/bash /tmp/library-scripts/docker-in-docker-debian.sh
ENTRYPOINT ["/usr/local/share/docker-init.sh"]
VOLUME [ "/var/lib/docker" ]
CMD ["sleep", "infinity"]
DanceParty commented 3 years ago

Switching from ruby:3.0.2-buster (even ruby:3.0.2 seems to use buster by default) to ruby:3.0.2-bullseye seemed to fix this issue which is strange that this past friday was the day it stopped working (it worked fine on buster before friday Nov 12)

Chuxel commented 3 years ago

@Chuxel, is it possible that one of the mirrors of the https://packages.microsoft.com/repos/microsoft-debian-buster-prod/pool/main/m/moby-buildx/moby-buildx_0.7.0+azure-1_amd64.deb package has inconsistent metadata around the expected hashes? Not sure why else that hash mismatch would occur. It seems like an issue with the package feed.

It would have to be regional if so. I can't repro this in Codespace or my local machine. @DanceParty where are you located? @jkeech @joshspicer, can you repro?

Chuxel commented 3 years ago

OK - I see it in WestUS2 specifically (not in EastUS where I'm at). Will shoot a note to the internal package feed team to see if this is known.

Chuxel commented 3 years ago

They will be re-pushing the package soon - hopefully that will resolve it!

Chuxel commented 3 years ago

@DanceParty This should be resolved now. Can you retry?

alangroszTP commented 3 years ago

@Chuxel I have the same problem and it won't resolved yet I looked the packages dates and the last one is from November 11 image

Chuxel commented 3 years ago

@alangroszTP They were redeployed not rebuilt, so the update date won't change. It only occurred in certain geographies.

Where are you located? WestUS2 seems to be working, so it's possible something is up in another region. I'll ping the team and see if it was redeployed everywhere or just the west coast.

Also, try to rebuild without cache to make sure you aren't experiencing some sort of caching challenge.

DanceParty commented 3 years ago

Switched the main image back to ruby:3.0.1 which is what was originally failing for me and it worked fine!

alangroszTP commented 3 years ago

@alangroszTP They were redeployed not rebuilt, so the update date won't change. It only occurred in certain geographies.

Where are you located? WestUS2 seems to be working, so it's possible something is up in another region. I'll ping the team and see if it was redeployed everywhere or just the west coast.

Also, try to rebuild without cache to make sure you aren't experiencing some sort of caching challenge.

@Chuxel I'm from Argentina

daten commented 3 years ago

Still seeing this problem currently.

Chuxel commented 3 years ago

The Linux package team is looking into this right now. It seems like what happened is West US started working, but other regions then broke. The team is trying to determine why this is happening and remediate.

Near term, if you are using Codespaces, you can force your Codespace into the West US region. Go to https://github.com/settings/codespaces and you can specify choosing "select manually":

image

Chuxel commented 3 years ago

Okay - the package feed team found the problem and believes they've resolved it. Checked East US, West US, West Europe, and Southeast Asia all appear to look good now.

If you still see this error, let us know where you are located so we can relay that to the package team. (Also include the OS in your container not Debian 10/buster - run cat /etc/os-release to find out.) Otherwise things should work now.

Chuxel commented 2 years ago

Closing as resolved. Let us know if you are still hitting issues.

woehrl01 commented 2 years ago

@Chuxel

I'm still seeing this error:

#18 69.30 Get:4 https://packages.microsoft.com/repos/microsoft-debian-buster-prod buster/main arm64 moby-cli arm64 20.10.11+azure-1 [9213 kB]
#18 70.30 Get:5 https://packages.microsoft.com/repos/microsoft-debian-buster-prod buster/main arm64 moby-runc arm64 1.0.2+azure-1 [4879 kB]
#18 70.83 Get:6 https://packages.microsoft.com/repos/microsoft-debian-buster-prod buster/main arm64 moby-containerd arm64 1.4.12+azure-1 [19.3 MB]
#18 72.91 Get:7 https://packages.microsoft.com/repos/microsoft-debian-buster-prod buster/main arm64 moby-engine arm64 20.10.11+azure-1 [14.0 MB]
#18 74.43 Fetched 68.6 MB in 8s (8778 kB/s)
Failed to fetch https://packages.microsoft.com/repos/microsoft-debian-buster-prod/pool/main/m/moby-buildx/moby-buildx_0.7.0+azure-1_arm64.deb  Hash Sum mismatch
#18 74.43    Hashes of expected file:
#18 74.43     - SHA512:e9d5b2a378cef5b407ebf4dadb72044a5c0846e05d1b02e73b912b18d84f103268f9d062c34ba5880cb5df8603a678b4b4be1da506f91a0a7965b30e12325385
#18 74.43     - SHA256:2931feca352c35f9bd0861800c21dfee40b4f012d38bf2c1825ab679bbec4cfc
#18 74.43     - SHA1:661b66a246058509167a3ce875c1e82beb35e642 [weak]
#18 74.43     - MD5Sum:1b1626c8ad558f2dc3b53ee76b8471c8 [weak]
#18 74.43     - Filesize:21084004 [weak]
#18 74.43    Hashes of received file:
#18 74.43     - SHA512:0d62dac0a3837a40ad3560a026b07cce3f985966f3fd1f239bce71c30ea7c8cbb6a78810ccdbfd4c574f31b79435b3f4e7e3e7264ff9a52fbfec093c5029e180
#18 74.43     - SHA256:e09924028e6ec11d9cfce0af80921c7b6ce973b66ed9a1a0cfe4fbf73813b573
#18 74.43     - SHA1:5fd7ef4417f99695825e4e00e091cc88d7a5549e [weak]
#18 74.43     - MD5Sum:181010a473b481e8f5630da08b240904 [weak]
#18 74.43     - Filesize:21084004 [weak]
#18 74.43    Last modification reported: Thu, 11 Nov 2021 17:43:42 +0000
#18 74.43 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
#18 ERROR: process "/bin/sh -c apt-get update && /bin/bash /tmp/library-scripts/docker-in-docker-debian.sh && apt-get clean -y" did not complete successfully: exit code: 100

I'm prebuilding this image in a self-hosted GitHub action runner in AWS eu-central-1.

Chuxel commented 2 years ago

@woehrl01 Is this happening for linux/amd64 as well or just arm64?

woehrl01 commented 2 years ago

@Chuxel Just arm64, linux/amd64 is working fine.

Chuxel commented 2 years ago

Reopening to track arm64.

Chuxel commented 2 years ago

@woehrl01 One question for you here - did this originally work?

Also, are you using buildx to build the image on x86 hardware? I know that buster does not work well in emulated ARM64 because of an OS bug. We recommend anyone building arm64 images move to bullseye because of it (and our pre-built images are only x86_64 for this reason).

This isn't showing up like the typical segfault we'd see there, but Debian 10/buster and Ubuntu 20.04/focal do not work well on Apple Silicon macs because of this.

woehrl01 commented 2 years ago

@Chuxel

I actually don't know. I'm currently migrating to arm64 and stumbled over that issue. Thank you for the hint, I'll try bullseye.

Yes, I'm using buildx to build on x86.

woehrl01 commented 2 years ago

@Chuxel I just would like to confirm that it's working great with debian/bullseye. Thank you.

Chuxel commented 2 years ago

Ok - this should be resolved now. As before, let us know the region you are located if you still experience this error.

danielscholl commented 2 years ago

@Chuxel -- This issue appears to have started again here this evening, was working earlier today but something is now out of sync.
CodeSpace Region - East US2 (Virginia) & West US2 (California) VS Code (VPN Connect -- CentralUS Connected && London Connected)

Reproduce: Add new Development Container Configuration File Configuration Python 3 3.10-bullseye (default) -- lts/* (default) Feature - Docker (Moby) support (Docker-in-Docker) - latest version

#7 32.04    - Filesize:26966076 [weak]
#7 32.04   Last modification reported: Wed, 12 Jan 2022 19:11:38 +0000
#7 32.07 Get:7 https://packages.microsoft.com/repos/microsoft-debian-bullseye-prod bullseye/main amd64 moby-engine amd64 20.10.11+azure-3 [21.2 MB]
#7 38.82 E: Failed to fetch https://packages.microsoft.com/repos/microsoft-debian-bullseye-prod/pool/main/m/moby-containerd/moby-containerd_1.4.12%2bazure-1_amd64.deb  Hash Sum mismatch
#7 38.82    Hashes of expected file:
#7 38.82     - SHA512:7f0059afb6124d756508792fbdc972fdc1e6c8f178ace40d999acb4441d9e2a282a3e07798d3e622dfd5af309a3c1549dc7280ac42c58ea2bbe1748b271271b2
#7 38.82     - SHA256:b1aa4dc0b8116bcc98b7e9d5270f154a382549081bb4df1c20475c567813dd08
#7 38.82     - SHA1:4736318f2973caf3cc0263b03659a928225471fb [weak]
#7 38.82     - MD5Sum:7bbf6db138a768c15b23a73f971a89cf [weak]
#7 38.82     - Filesize:26966076 [weak]
#7 38.82    Hashes of received file:
#7 38.82     - SHA512:fab0f7992983f4cb633c7b77fa55cfb424d57d2ca79cd15458934461b5890a1a68226e7d822a51cbb5c395aaa6b5e8c49beab63ed1afb5faebe953e4b9da6949
#7 38.82     - SHA256:064e2676231cdb018c34936c41589ef8a53bf4059139ebbd250517a0cdfa4d02
#7 38.82     - SHA1:d7fb6bb3fc78caaa50a686bc607ebf86e8d59d57 [weak]
#7 38.82     - MD5Sum:65fce0295bd00e762e84351d89807828 [weak]
#7 38.82     - Filesize:26966076 [weak]
#7 38.82    Last modification reported: Wed, 12 Jan 2022 19:11:38 +0000
#7 38.82 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
#7 38.82 Fetched 87.2 MB in 26s (3326 kB/s)
2022-01-12_22-58-40
guybartal commented 2 years ago

We have the same problem, a workaround fix that worked for us is to add moby-containerd=1.4.11+azure-1 inside /library-scripts/docker-in-docker-debian.sh file like this:

apt-get -y install --no-install-recommends moby-cli moby-containerd=1.4.11+azure-1 moby-buildx moby-engine
anatbal commented 2 years ago

In addition, this problem happens only when using https://packages.microsoft.com/repos/microsoft-debian-bullseye-prod/dists/bullseye/. If you try replacing it to "buster", it works.

Chuxel commented 2 years ago

Confirmed. We've contacted the MS package feed team.

Chuxel commented 2 years ago

Fix is propagating. Things should start working soon if they are not already.

Chuxel commented 2 years ago

This should be resolved.