- Package:
- fakechroot
- Source:
- fakechroot
- Submitter:
- Valentin Lorentz
- Date:
- 2021-10-12 14:15:09 UTC
- Severity:
- normal
- Tags:
Dear maintainer,
Running fakechroot chroot dpkg-dev triggers a segmentation fault.
You can reproduce it by running this on Debian Stretch (maybe on other
versions too):
$ /usr/bin/fakeroot /usr/bin/fakechroot /usr/sbin/debootstrap
--variant=fakechroot stable /tmp/test/
[...]
I: Extracting liblzma5...
I: Extracting zlib1g...
W: Failure trying to run: chroot /tmp/test dpkg-deb -f
/var/cache/apt/archives/dpkg_1.17.27_amd64.deb Version
W: See /tmp/test/debootstrap/debootstrap.log for details
I: Installing core packages...
W: Failure trying to run: chroot /tmp/test dpkg --force-depends
--install /var/cache/apt/archives/base-passwd_3.5.37_amd64.deb
W: See /tmp/test/debootstrap/debootstrap.log for details
The failure is caused by this:
$ fakechroot chroot /tmp/test/ dpkg-deb -f
/var/cache/apt/archives/dpkg_1.17.27_amd64.deb Version
/usr/sbin/chroot.fakechroot : ligne 105 : 17261 Erreur de segmentation
env -u FAKECHROOT_BASE_ORIG FAKECHROOT_CMD_ORIG=
LD_LIBRARY_PATH="$fakechroot_chroot_paths"
FAKECHROOT_BASE="$fakechroot_chroot_base" "$fakechroot_chroot_chroot"
"${@:1:$(($fakechroot_chroot_n - 1))}"
"${fakechroot_chroot_newroot#$FAKECHROOT_BASE_ORIG}"
"${@:$(($fakechroot_chroot_n + 1))}"
Which works without fakechroot:
$ sudo chroot /tmp/test/ dpkg-deb -f
/var/cache/apt/archives/dpkg_1.17.27_amd64.deb Version
1.17.27
See the attached file for the output of this command: LANG=C valgrind
fakechroot chroot /tmp/test_debian_anywhere/target/root dpkg-deb -f
/var/cache/apt/archives/dpkg_1.17.27_amd64.deb Version
Relevant versions:
* fakechroot 2.19-3
* fakeroot 1.21-2
* debootstrap 1.0.87
* dpkg 1.17.27 (inside the chroot)
* bash 4.4-2 (the valgrind error seems to be related to bash)
Best regards,
Valentin
Hi, I am afraid there is no easy workaround : libc6 version 2.19-18+deb8u7 (jessie) and version 2.24-9 (stretch) are very different. You need the same version of libc6 inside and outside of the (fake)chroot in order that fakechroot works correctly. If not, it may work by chance (if the versions are not too far away) - but there is no warranty. fakechroot does its work by wrapping some libc6 library functions. There is no interface mismatch if the version numbers coincide. It may be different in the other case. From fakechroot's manpage : LIMITATIONS · Every command executed within fakechroot needs to be linked to the same version of the dynamic linker from real environment. Regards, JH Chatenet