Package: debootstrap
Version: 1.0.141
Severity: normal
X-Debbugs-Cc: [email protected], [email protected]
User: [email protected]
Usertags: arm64

Dear Maintainer,

This occurs when creating an amd64 rootfs on an arm64 Debian VM
running under Apple Virtualization with Rosetta enabled.

The bootstrap is performed with:

    debootstrap --foreign --arch=amd64 ...

followed by:

    chroot <target> /debootstrap/debootstrap --second-stage

During second stage, setup_proc() temporarily unmounts /proc before
remounting it.

Rosetta appears to require /proc/self/exe in order to launch translated
amd64 binaries. Once /proc is unmounted, subsequent amd64 binaries fail
with:

    rosetta error: Unable to open /proc/self/exe: 2
    Trace/breakpoint trap

This creates a deadlock because debootstrap can no longer execute the
translated amd64 mount binary needed to restore /proc.

A local workaround is to replace setup_proc() with a no-op in cases
where /proc, /sys, /dev and /dev/pts have already been mounted by the
caller. With this change, second stage completes successfully.

This appears similar in spirit to bug #921815, where debootstrap's
handling of /proc caused problems in containerized environments, but in
this case the affected environment is Apple Rosetta rather than Docker.



-- System Information:
Debian Release: 13.7
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: arm64 (aarch64)
Foreign Architectures: amd64, i386

Kernel: Linux 6.12.117+deb13-arm64 (SMP w/8 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages debootstrap depends on:
ii  distro-info  1.13
ii  wget         1.25.0-2

Versions of packages debootstrap recommends:
ii  arch-test               0.22-1
ii  debian-archive-keyring  2025.1
ii  gpgv                    2.4.7-21+deb13u1+b5
ii  mount                   2.41.5-0+deb13u1
ii  sqv                     1.3.0-3+b2

Versions of packages debootstrap suggests:
ii  binutils                2.44-3
pn  squid-deb-proxy-client  <none>
pn  ubuntu-archive-keyring  <none>
ii  xz-utils                5.8.1-1+deb13u2
ii  zstd                    1.5.7+dfsg-1

-- no debconf information

Reply via email to