Package: fakeroot
Version: 1.25.2-1
Severity: important

Hi,

I'm the maintainer of mmdebstrap which uses fakeroot and fakechroot to
also create foreign architecture chroots. Doing something like this
worked fine until 2020-09-15:

    $ mmdebstrap --mode=fakechroot --variant=apt --arch=armhf sid ./sid-chroot

With amd64 on my machine I also tried other architectures and as of
today, the following arches result in an infinite timeout with above
command: armel, armhf, mipsel and s390x.

For armhf I was able to bisect Debian using snapshot.debian.net and find
out that the first snapshot timestamp that produces the timeout is
2020-09-15 06:00:00+01:00. For the other architectures, I am not able to
produce a precise timestamp because fakeroot suffered from #971070 and
thus I was unable to test two weeks of snapshot.d.o data.

To run the precise command producing the infinite hang, try creating a
armhf chroot using mmdebstrap (I'm unaware of another tool that is able
to create foreign architecture chroots using fakeroot and fakechroot):

    $ mmdebstrap --mode=fakechroot --variant=apt --arch=armhf unstable 
/tmp/debian-unstable

You have to ctrl+C above command at the "Installing..." step because
that one will stall forever. Then run:

    $ fakechroot fakeroot sh -c 'env QEMU_LD_PREFIX=/tmp/debian-unstable 
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/arm-linux-gnueabihf/fakechroot:/usr/lib/arm-linux-gnueabihf/libfakeroot
 /usr/sbin/chroot debian-unstable dpkg --install /var/cache/apt/archives/*.deb'

If I run above via strace, then the last lines are:

    1830621 msgget(0x223a3efb, IPC_CREAT|0600) = 6881280
    1830621 msgget(0x223a3efc, IPC_CREAT|0600) = 6914049
    1830621 getpid()                        = 1830621
    1830621 semget(0x223a3efd, 1, IPC_CREAT|0600) = 3506176
    1830621 semtimedop(3506176, [{0, -1, SEM_UNDO}], 1, NULL) = 0
    1830621 msgsnd(6881280, {1, 
"\0\0\0\0\3\0\0\0\335\356\33\0\1\0\0\0\350\3\0\0\350\3\0\0.0\313\0\0\0\0\0"...},
 1088, 0) = 0
    1830613 <... msgrcv resumed> {1, 
"\0\0\0\0\3\0\0\0\335\356\33\0\1\0\0\0\350\3\0\0\350\3\0\0.0\313\0\0\0\0\0"...},
 1096, 0, 0) = 1088
    1830613 msgrcv(6881280,

A workaround for this problem is to explicitly use fakeroot-tcp. The
command will be much slower but it will finish successfully. So it seems
only fakeroot-sysv is broken between amd64 and armel, armhf, mipsel and s390x.

Thanks!

cheers, josch

Reply via email to