Skip to content

"Failed to take /etc/passwd lock" on latest qemu-aarch64-static environment. #214

@yangjianying

Description

@yangjianying

On my x86 ubuntu 20.04 vmware machine,

i installed qemu-aarch64-static (which version is "qemu-aarch64 version 4.2.1 (Debian 1:4.2-3ubuntu6.30)" ),

then i create a new buildx builder by using commands :
sudo docker buildx create --name mybuilder --driver-opt network=host --driver docker-container --config ../buildkitd.toml
sudo docker buildx inspect mybuilder --bootstrap
sudo docker update --restart=always buildx_buildkit_mybuilder0

then try to build an arm64 arch docker image by using command:
sudo docker buildx build --platform linux/arm64 -t ubuntu-with-systemd --load .

the content of the according Dockerfile ( which under the same directory )  is:
    FROM ubuntu:24.04
    RUN apt-get update
    ENV DEBIAN_FRONTEND=noninteractive
    RUN sudo apt-get install -y systemd

the "RUN sudo apt-get install -y systemd" step always report error : Failed to take /etc/passwd lock

as for comparison, i try to run a arm64 docker images directly on the same x86 ubuntu 20.04 vmware machine using the following commands:

sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
sudo docker pull --platform arm64 ubuntu // which pulls the latest , which is 24.04
sudo docker run -itd --rm --platform arm64 -v /usr/bin/qemu-aarch64-static:/usr/bin/qemu-aarch64-static ubuntu bash // start the container

then using "sudo docker exec -it bold_aryabhata bash" enter this container, executes :
root@a198e719330e:/# apt-get update
root@a198e719330e:/# apt-get install -y systemd
and, "apt-get install -y systemd" report the same error : Failed to take /etc/passwd lock
as this article https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2069555 mentioned,
Linux-specific `fcntl(F_OFD_SETLKW) is not supported on such environment.

i tried the latest version qemu-aarch64-static (qemu-aarch64 version 7.2.0 (Debian 1:7.2+dfsg-1~bpo11+2)), still the same error !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions