Closed liudonghua123 closed 3 months ago
cannot allocate memory
Looks like you need more memory on your machine?
And I tried again. It failed with some other errors. Is it related to my network issues?
Looks like so. Could you retry the conversion?
@liudonghua123 Is that error solved?
I tried in github codespaces, and it works with wasmtime, but not with wasmer/wasmedge which seems like hang on somewhere.
They don't seem to support non-blocking stdin that is necessary to make the terminal working.
@ktock Thanks, I see now. 😄
I tried to convert the ubuntu:24.04 image via
c2w ubuntu:24.04 ubuntu-24.04.wasm
. But it failed with the following errors.Details
``` [root@localhost ~]# docker pull ubuntu:24.04 24.04: Pulling from library/ubuntu 49b384cc7b4a: Pull complete Digest: sha256:3f85b7caad41a95462cf5b787d8a04604c8262cdcdf9a472b8c52ef83375fe15 Status: Downloaded newer image for ubuntu:24.04 docker.io/library/ubuntu:24.04 [root@localhost ~]# c2w ubuntu:24.04 ubuntu-24.04.wasm 2024/05/21 15:28:19 saving "ubuntu:24.04" to "/tmp/container2wasm2131497631/img" 2024/05/21 15:28:24 buildx args: [buildx build --progress=plain --build-arg TARGETARCH=amd64 --build-arg TARGETPLATFORM=linux/amd64 --platform=linux/amd64 -f /tmp/container2wasm84066038 --output type=local,dest=/root --build-arg OUTPUT_NAME=ubuntu-24.04.wasm --build-arg LINUX_LOGLEVEL=0 --build-arg INIT_DEBUG=false /tmp/container2wasm2131497631/img] #0 building with "default" instance using docker driver #1 [internal] load build definition from container2wasm84066038 #1 transferring dockerfile: #1 transferring dockerfile: 23.46kB 0.1s done #1 DONE 0.7s #2 resolve image config for docker.io/docker/dockerfile:1.5 #2 ... #3 [auth] docker/dockerfile:pull token for registry-1.docker.io #3 DONE 0.0s #2 resolve image config for docker.io/docker/dockerfile:1.5 #2 DONE 4.3s #4 docker-image://docker.io/docker/dockerfile:1.5@sha256:39b85bbfa7536a5feceb7372a0817649ecb2724562a38360f4d6a7782a409b14 #4 resolve docker.io/docker/dockerfile:1.5@sha256:39b85bbfa7536a5feceb7372a0817649ecb2724562a38360f4d6a7782a409b14 0.0s done #4 sha256:39b85bbfa7536a5feceb7372a0817649ecb2724562a38360f4d6a7782a409b14 8.40kB / 8.40kB done #4 sha256:966d40f9ba8366e74c2fa353fc0bc7bbc167d2a0f3ad2420db8b9e633049462d 482B / 482B done #4 sha256:dbdd11720762ad504260c66161c964e59eba06b95a7aa64a68634b598a830a91 2.90kB / 2.90kB done #4 sha256:a47ff7046597eea0123ea02817165350e3680f75000dc5d69c9a310258e1bedd 0B / 11.55MB 0.1s #4 sha256:a47ff7046597eea0123ea02817165350e3680f75000dc5d69c9a310258e1bedd 1.05MB / 11.55MB 0.9s #4 sha256:a47ff7046597eea0123ea02817165350e3680f75000dc5d69c9a310258e1bedd 3.15MB / 11.55MB 1.0s #4 sha256:a47ff7046597eea0123ea02817165350e3680f75000dc5d69c9a310258e1bedd 6.29MB / 11.55MB 1.2s #4 sha256:a47ff7046597eea0123ea02817165350e3680f75000dc5d69c9a310258e1bedd 8.39MB / 11.55MB 1.3s #4 sha256:a47ff7046597eea0123ea02817165350e3680f75000dc5d69c9a310258e1bedd 11.55MB / 11.55MB 1.5s #4 sha256:a47ff7046597eea0123ea02817165350e3680f75000dc5d69c9a310258e1bedd 11.55MB / 11.55MB 1.5s done #4 extracting sha256:a47ff7046597eea0123ea02817165350e3680f75000dc5d69c9a310258e1bedd 0.1s #4 extracting sha256:a47ff7046597eea0123ea02817165350e3680f75000dc5d69c9a310258e1bedd 0.5s done #4 DONE 2.5s #5 [internal] load .dockerignore #5 transferring context: 2B 0.1s done #5 DONE 0.2s #6 [internal] load metadata for docker.io/library/ubuntu:22.04 #6 DONE 0.0s #7 [internal] load metadata for docker.io/library/golang:1.21-bullseye #7 ... #8 [auth] library/golang:pull token for registry-1.docker.io #8 DONE 0.0s #9 [auth] library/rust:pull token for registry-1.docker.io #9 DONE 0.0s #10 [auth] library/ubuntu:pull token for registry-1.docker.io #10 DONE 0.0s #11 [internal] load metadata for docker.io/library/rust:1.74.1-buster #11 ... #12 [internal] load metadata for docker.io/library/ubuntu:latest #12 DONE 5.5s #7 [internal] load metadata for docker.io/library/golang:1.21-bullseye #7 DONE 5.5s #11 [internal] load metadata for docker.io/library/rust:1.74.1-buster #11 DONE 5.7s #13 [bochs-dev-common 1/25] FROM docker.io/library/rust:1.74.1-buster@sha256:69a9eff032b76f79418e8451c156b7124e0cd89da841554fcde39e9ea0a5e882 #13 resolve docker.io/library/rust:1.74.1-buster@sha256:69a9eff032b76f79418e8451c156b7124e0cd89da841554fcde39e9ea0a5e882 0.0s done #13 ... #14 [bios-amd64-dev 1/7] FROM docker.io/library/ubuntu@sha256:3f85b7caad41a95462cf5b787d8a04604c8262cdcdf9a472b8c52ef83375fe15 #14 DONE 0.1s #13 [bochs-dev-common 1/25] FROM docker.io/library/rust:1.74.1-buster@sha256:69a9eff032b76f79418e8451c156b7124e0cd89da841554fcde39e9ea0a5e882 #13 sha256:69a9eff032b76f79418e8451c156b7124e0cd89da841554fcde39e9ea0a5e882 988B / 988B done #13 sha256:ca1dad9de65e57a6032fc6cf443e9e1d42a09ef8c4ec11c9fdc11cf58fa44260 1.38kB / 1.38kB done #13 sha256:80e14f4aaa4adf2875939a88de1ac63d82b6862086ff99dde6873fc695675a6a 6.09kB / 6.09kB done #13 sha256:30b73a2ffaab3c39355a8bcc5eae8ba1465bd7d9467f197b91f7635816b16bc9 0B / 50.50MB 0.2s #13 sha256:0b38726aed64a0804777af4106983e9686ea639add75dae8538ecaad0c0e6a58 0B / 17.58MB 0.2s #13 sha256:ea388039df9c5c51dda7a2d1d6908eac88ae220452b81495739aff1428c1f847 0B / 51.87MB 0.2s #13 ... #15 [bochs-config-dev 1/4] FROM docker.io/library/ubuntu:22.04 #15 DONE 0.3s #13 [bochs-dev-common 1/25] FROM docker.io/library/rust:1.74.1-buster@sha256:69a9eff032b76f79418e8451c156b7124e0cd89da841554fcde39e9ea0a5e882 #13 sha256:0b38726aed64a0804777af4106983e9686ea639add75dae8538ecaad0c0e6a58 1.05MB / 17.58MB 3.2s #13 sha256:0b38726aed64a0804777af4106983e9686ea639add75dae8538ecaad0c0e6a58 2.10MB / 17.58MB 3.6s #13 sha256:0b38726aed64a0804777af4106983e9686ea639add75dae8538ecaad0c0e6a58 3.13MB / 17.58MB 4.1s #13 sha256:ea388039df9c5c51dda7a2d1d6908eac88ae220452b81495739aff1428c1f847 3.15MB / 51.87MB 4.1s #13 sha256:0b38726aed64a0804777af4106983e9686ea639add75dae8538ecaad0c0e6a58 4.19MB / 17.58MB 4.4s #13 sha256:30b73a2ffaab3c39355a8bcc5eae8ba1465bd7d9467f197b91f7635816b16bc9 1.05MB / 50.50MB 5.4s #13 sha256:0b38726aed64a0804777af4106983e9686ea639add75dae8538ecaad0c0e6a58 7.34MB / 17.58MB 5.4s #13 sha256:ea388039df9c5c51dda7a2d1d6908eac88ae220452b81495739aff1428c1f847 9.44MB / 51.87MB 5.4s #13 sha256:0b38726aed64a0804777af4106983e9686ea639add75dae8538ecaad0c0e6a58 8.39MB / 17.58MB 5.5s #13 sha256:0b38726aed64a0804777af4106983e9686ea639add75dae8538ecaad0c0e6a58 10.49MB / 17.58MB 5.6s #13 ... #16 [bios-amd64-dev 2/7] RUN apt-get update && apt-get install -y build-essential #16 ERROR: process "/bin/sh -c apt-get update && apt-get install -y build-essential" did not complete successfully: failed to create endpoint vh6aabslshu1ylmqye2xv1xk8 on network bridge: failed to add the host (veth29ccddf) <=> sandbox (veth73bd838) pair interfaces: cannot allocate memory #13 [bochs-dev-common 1/25] FROM docker.io/library/rust:1.74.1-buster@sha256:69a9eff032b76f79418e8451c156b7124e0cd89da841554fcde39e9ea0a5e882 #13 ... #17 [internal] load build context #17 transferring context: 16.98MB 5.8s #17 ... #13 [bochs-dev-common 1/25] FROM docker.io/library/rust:1.74.1-buster@sha256:69a9eff032b76f79418e8451c156b7124e0cd89da841554fcde39e9ea0a5e882 #13 ... #18 [golang-base 1/1] FROM docker.io/library/golang:1.21-bullseye@sha256:6815d296f20c3cb3afa67bf5dc862a831b6080f5dd8b5b423bb5f862539299de #18 resolve docker.io/library/golang:1.21-bullseye@sha256:6815d296f20c3cb3afa67bf5dc862a831b6080f5dd8b5b423bb5f862539299de 0.1s done #18 sha256:a07117191dd06486b472d53afb6db7102e663da37ee82b573d17f547edbaefb8 2.83kB / 2.83kB done #18 sha256:6815d296f20c3cb3afa67bf5dc862a831b6080f5dd8b5b423bb5f862539299de 9.10kB / 9.10kB done #18 sha256:c5122d2f8e2cae82d7c65140a298031c4b0201f44012e40aa96060f96e94a58f 2.32kB / 2.32kB done #18 CANCELED #13 [bochs-dev-common 1/25] FROM docker.io/library/rust:1.74.1-buster@sha256:69a9eff032b76f79418e8451c156b7124e0cd89da841554fcde39e9ea0a5e882 #13 sha256:30b73a2ffaab3c39355a8bcc5eae8ba1465bd7d9467f197b91f7635816b16bc9 4.19MB / 50.50MB 6.6s #13 ... #17 [internal] load build context #17 transferring context: 17.84MB 6.1s done #17 CANCELED #13 [bochs-dev-common 1/25] FROM docker.io/library/rust:1.74.1-buster@sha256:69a9eff032b76f79418e8451c156b7124e0cd89da841554fcde39e9ea0a5e882 #13 sha256:0b38726aed64a0804777af4106983e9686ea639add75dae8538ecaad0c0e6a58 11.53MB / 17.58MB 8.5s #13 ... #19 [gcc-x86-64-linux-gnu-base 2/2] RUN apt-get update && apt-get install -y gcc-x86-64-linux-gnu linux-libc-dev-amd64-cross git make #19 ... #20 [assets-base 2/3] RUN apt-get update && apt-get install -y git #20 ... #21 [rootfs-amd64-dev 2/10] RUN apt-get update -y && apt-get install -y mkisofs #21 ... #22 [bochs-config-dev 2/4] RUN apt-get update && apt-get install -y gettext-base && mkdir /out #22 ... #13 [bochs-dev-common 1/25] FROM docker.io/library/rust:1.74.1-buster@sha256:69a9eff032b76f79418e8451c156b7124e0cd89da841554fcde39e9ea0a5e882 #13 sha256:ea388039df9c5c51dda7a2d1d6908eac88ae220452b81495739aff1428c1f847 12.58MB / 51.87MB 9.7s #13 sha256:30b73a2ffaab3c39355a8bcc5eae8ba1465bd7d9467f197b91f7635816b16bc9 17.83MB / 50.50MB 32.0s #13 sha256:0b38726aed64a0804777af4106983e9686ea639add75dae8538ecaad0c0e6a58 17.58MB / 17.58MB 32.0s #13 sha256:ea388039df9c5c51dda7a2d1d6908eac88ae220452b81495739aff1428c1f847 23.07MB / 51.87MB 32.0s #13 sha256:0b38726aed64a0804777af4106983e9686ea639add75dae8538ecaad0c0e6a58 17.58MB / 17.58MB 34.1s done #13 sha256:0dd4fbda45c5750b2808bd8a3385ffd64974432821cfa42ae41da8450163d1f1 0B / 191.91MB 34.6s #13 sha256:30b73a2ffaab3c39355a8bcc5eae8ba1465bd7d9467f197b91f7635816b16bc9 20.97MB / 50.50MB 35.7s #13 sha256:30b73a2ffaab3c39355a8bcc5eae8ba1465bd7d9467f197b91f7635816b16bc9 29.36MB / 50.50MB 37.4s #13 sha256:ea388039df9c5c51dda7a2d1d6908eac88ae220452b81495739aff1428c1f847 33.55MB / 51.87MB 37.4s #13 ... #19 [gcc-x86-64-linux-gnu-base 2/2] RUN apt-get update && apt-get install -y gcc-x86-64-linux-gnu linux-libc-dev-amd64-cross git make #19 CANCELED #13 [bochs-dev-common 1/25] FROM docker.io/library/rust:1.74.1-buster@sha256:69a9eff032b76f79418e8451c156b7124e0cd89da841554fcde39e9ea0a5e882 #13 sha256:30b73a2ffaab3c39355a8bcc5eae8ba1465bd7d9467f197b91f7635816b16bc9 32.51MB / 50.50MB 39.7s #13 sha256:ea388039df9c5c51dda7a2d1d6908eac88ae220452b81495739aff1428c1f847 37.75MB / 51.87MB 39.7s #13 sha256:0dd4fbda45c5750b2808bd8a3385ffd64974432821cfa42ae41da8450163d1f1 0B / 191.91MB 39.7s #13 sha256:30b73a2ffaab3c39355a8bcc5eae8ba1465bd7d9467f197b91f7635816b16bc9 35.07MB / 50.50MB 40.2s #13 sha256:ea388039df9c5c51dda7a2d1d6908eac88ae220452b81495739aff1428c1f847 40.89MB / 51.87MB 40.4s #13 sha256:30b73a2ffaab3c39355a8bcc5eae8ba1465bd7d9467f197b91f7635816b16bc9 38.80MB / 50.50MB 40.7s #13 ... #21 [rootfs-amd64-dev 2/10] RUN apt-get update -y && apt-get install -y mkisofs #21 CANCELED #13 [bochs-dev-common 1/25] FROM docker.io/library/rust:1.74.1-buster@sha256:69a9eff032b76f79418e8451c156b7124e0cd89da841554fcde39e9ea0a5e882 #13 sha256:30b73a2ffaab3c39355a8bcc5eae8ba1465bd7d9467f197b91f7635816b16bc9 41.94MB / 50.50MB 40.8s #13 sha256:ea388039df9c5c51dda7a2d1d6908eac88ae220452b81495739aff1428c1f847 45.09MB / 51.87MB 40.8s #13 sha256:30b73a2ffaab3c39355a8bcc5eae8ba1465bd7d9467f197b91f7635816b16bc9 46.88MB / 50.50MB 41.2s #13 sha256:ea388039df9c5c51dda7a2d1d6908eac88ae220452b81495739aff1428c1f847 49.28MB / 51.87MB 41.2s #13 sha256:ea388039df9c5c51dda7a2d1d6908eac88ae220452b81495739aff1428c1f847 51.87MB / 51.87MB 41.8s done #13 sha256:0dd4fbda45c5750b2808bd8a3385ffd64974432821cfa42ae41da8450163d1f1 10.49MB / 191.91MB 42.0s #13 sha256:416e1b8c4c0326712124efdb1ea763c0c0ddce6d3c05805c2303ce5908d8c46f 0B / 171.12MB 42.6s #13 sha256:416e1b8c4c0326712124efdb1ea763c0c0ddce6d3c05805c2303ce5908d8c46f 9.44MB / 171.12MB 45.2s #13 CANCELED #22 [bochs-config-dev 2/4] RUN apt-get update && apt-get install -y gettext-base && mkdir /out #22 42.94 runc run failed: container process is already dead #22 CANCELED #20 [assets-base 2/3] RUN apt-get update && apt-get install -y git #20 48.97 runc run failed: container process is already dead #20 CANCELED ------ > [bios-amd64-dev 2/7] RUN apt-get update && apt-get install -y build-essential: ------ container2wasm84066038:373 -------------------- 371 | 372 | FROM ubuntu AS bios-amd64-dev 373 | >>> RUN apt-get update && apt-get install -y build-essential 374 | COPY --link --from=assets ./patches/bochs/Bochs /Bochs 375 | WORKDIR /Bochs/bochs -------------------- ERROR: failed to solve: process "/bin/sh -c apt-get update && apt-get install -y build-essential" did not complete successfully: failed to create endpoint vh6aabslshu1ylmqye2xv1xk8 on network bridge: failed to add the host (veth29ccddf) <=> sandbox (veth73bd838) pair interfaces: cannot allocate memory exit status 1 [root@localhost ~]# ```