Bug#916043: qemu-user-static: qemu-arm-static running armel dash breaks globbing
On Sun, 2020-07-26 at 19:26 +0300, Michael Tokarev wrote: > Control: tag -1 + moreinfo > > [ https://bugs.debian.org/916043 ] > > On Sun, 09 Dec 2018 15:19:55 + Ian Campbell wrote: > > Package: qemu-user-static > > Version: 1:2.12+dfsg-3+b1 > > Severity: normal > > > > Dear Maintainer, > > > > While working on a new qcontrol package, using a cross-schroot via > > qemu-arm-static on an amd64 host, I noticed that globs did not appear to be > > expanded when running dash. It appears to relate to libc 2.28-2 but only > > when > > running under qemu-arm-static: > ... > > ijc@dagon:dash-bug$ sudo chroot 2.27-8/ dash -c 'echo *' > > bin etc lib usr > > ijc@dagon:dash-bug$ sudo chroot 2.28-2/ dash -c 'echo *' > > * > > I can't reproduce this anymore with any version of qemu-user-static. > Maybe I really should have glibc_2.28-2 for this, lemme try it from > snapshot.debian.org.. nope, installing it in an armel chroot over > 2.28-10 version does not change anything there. > > So I don't really know what to do with this bugreport. Tried even > jessie version of qemu, and also sid version (5.0), - it all Just Works. > > Can you please try it again and see what's going in? It still reproduced for me with the same dash + glibc as the original report (I still had the dir in my ~/tmp), but not with anything newer. I think the issue might actually be with _dash_ 0.5.10.2-1 specifically when combined with glibc 2.28+. Given the two attached I ran: $ for i in $(cat urls) ; do curl -LOJv $i; done ... $ ./test.sh Which produced the table at the end. Rows are glibc versions, columns are dash. It looks like dash 0.5.10.2-1 + glibc 2.28 onwards exhibits the issue. But dash 0.5.10.2-2 onwards does not exhibit the issue when running with glibc 2.28 onwards. That version of dash can't be tested against glibc 2.27-8 due to dynamic linker error (which is normal and expected when building with a newer glibc than you run with, I believe): /bin/dash: /lib/arm-linux-gnueabi/libc.so.6: version `GLIBC_2.28' not found (required by /bin/dash) My guess is that dash built against glibc 2.27 but running with glibc 2.28 is what triggers the problem. Given that neither dash 0.5.10.2-1 nor glibc 2.27 were ever in any Debian release I'm personally not too worried about this bug any longer so I'm happy if you want to close. Ian. 0.5.10.2-1 0.5.10.2-2 0.5.10.2-3 0.5.10.2-4 0.5.10.2-5 0.5.10.2-6 0.5.10.2-7 2.27-8 OK GLIBC_2.28 GLIBC_2.28 GLIBC_2.28 GLIBC_2.28 GLIBC_2.28 GLIBC_2.28 2.28-10 BUG OK OK OK OK OK OK 2.28-1 BUG OK OK OK OK OK OK 2.28-2 BUG OK OK OK OK OK OK 2.28-3 BUG OK OK OK OK OK OK 2.28-4 BUG OK OK OK OK OK OK 2.28-5 BUG OK OK OK OK OK OK 2.28-6 BUG OK OK OK OK OK OK 2.28-7 BUG OK OK OK OK OK OK 2.28-8 BUG OK OK OK OK OK OK 2.28-9 BUG OK OK OK OK OK OK 2.29-10 BUG OK OK OK OK OK OK 2.29-1 BUG OK OK OK OK OK OK 2.29-2 BUG OK OK OK OK OK OK 2.29-3 BUG OK OK OK OK OK OK 2.29-4 BUG OK OK OK OK OK OK 2.29-5 BUG OK OK OK OK OK OK 2.29-6 BUG OK OK OK OK OK OK 2.29-7
Bug#916043: qemu-user-static: qemu-arm-static running armel dash breaks globbing
Control: tag -1 + moreinfo [ https://bugs.debian.org/916043 ] On Sun, 09 Dec 2018 15:19:55 + Ian Campbell wrote: > Package: qemu-user-static > Version: 1:2.12+dfsg-3+b1 > Severity: normal > > Dear Maintainer, > > While working on a new qcontrol package, using a cross-schroot via > qemu-arm-static on an amd64 host, I noticed that globs did not appear to be > expanded when running dash. It appears to relate to libc 2.28-2 but only when > running under qemu-arm-static: ... > ijc@dagon:dash-bug$ sudo chroot 2.27-8/ dash -c 'echo *' > bin etc lib usr > ijc@dagon:dash-bug$ sudo chroot 2.28-2/ dash -c 'echo *' > * I can't reproduce this anymore with any version of qemu-user-static. Maybe I really should have glibc_2.28-2 for this, lemme try it from snapshot.debian.org.. nope, installing it in an armel chroot over 2.28-10 version does not change anything there. So I don't really know what to do with this bugreport. Tried even jessie version of qemu, and also sid version (5.0), - it all Just Works. Can you please try it again and see what's going in? Thanks, /mjt
Bug#916043: qemu-user-static: qemu-arm-static running armel dash breaks globbing
On Sat, 22 Dec 2018 12:34:02 + Ian Campbell wrote: > > Package: qemu-user-static > > Version: 1:2.12+dfsg-3+b1 > > While working on a new qcontrol package, using a cross-schroot via > > qemu-arm-static on an amd64 host, I noticed that globs did not appear to be So, as one of qemu developers put it, this looks like not an easy one. looks like the "ext4 puts 64 bit hashes into its directory offsets, which means QEMU can't emulate a guest syscall that wants a 32-bit offset" Fix is to use something other than ext4 on the host Or to get the host kernel folks to add a new API so we can ask it for a 32-bit offset; there's a thread on the list about this Here's the discussion thread (on LKML and on QEMU lists): https://lkml.org/lkml/2018/12/27/155 Thanks, /mjt
Bug#916043: qemu-user-static: qemu-arm-static running armel dash breaks globbing
On Fri, 2018-12-21 at 21:30 +0300, Michael Tokarev wrote: > 09.12.2018 18:19, Ian Campbell wrote: > > Package: qemu-user-static > > Version: 1:2.12+dfsg-3+b1 > > Severity: normal > > > > Dear Maintainer, > > > > While working on a new qcontrol package, using a cross-schroot via > > qemu-arm-static on an amd64 host, I noticed that globs did not appear to be > > Oh. It happens on amd64 host! I thought it is happening on ARM64 host! -- > that's why I asked you to verify... Oh well. I misread them for each other all the time! > I'll try it at home ;) Excellent, thanks! Ian.
Bug#916043: qemu-user-static: qemu-arm-static running armel dash breaks globbing
09.12.2018 18:19, Ian Campbell wrote: Package: qemu-user-static Version: 1:2.12+dfsg-3+b1 Severity: normal Dear Maintainer, While working on a new qcontrol package, using a cross-schroot via qemu-arm-static on an amd64 host, I noticed that globs did not appear to be Oh. It happens on amd64 host! I thought it is happening on ARM64 host! -- that's why I asked you to verify... Oh well. I'll try it at home ;) Thanks! /mjt
Bug#916043: qemu-user-static: qemu-arm-static running armel dash breaks globbing
Control: found -1 3.1+dfsg-1 On Fri, 2018-12-21 at 16:38 +0300, Michael Tokarev wrote: > > Can you please verify if this is still a problem for version 3.1 currently > in unstable? (since it is a static binary you can install the package > directly from unstable or just grab the binary you need from that package). Unfortunately it seems to still be a problem, yes. Using the chroot setup I described in my original report (same actual one, I never cleaned it up, only difference is I updated my host kernel since but I think that shouldn't matter): ijc@dagon:dash-bug$ uname -a Linux dagon 4.18.0-3-amd64 #1 SMP Debian 4.18.20-2 (2018-11-23) x86_64 GNU/Linux ijc@dagon:dash-bug$ sudo chroot 2.27-8/ dash -c 'echo *' bin etc lib usr ijc@dagon:dash-bug$ sudo chroot 2.28-2/ dash -c 'echo *' * ijc@dagon:dash-bug$ curl -LOJ "http://ftp.uk.debian.org/debian/pool/main/q/qemu/qemu-user-static_3.1+dfsg-1_amd64.deb; % Total% Received % Xferd Average Speed TimeTime Time Current Dload Upload Total SpentLeft Speed 100 20.0M 100 20.0M0 0 6495k 0 0:00:03 0:00:03 --:--:-- 6493k ijc@dagon:dash-bug$ dpkg-deb -x qemu-user-static_3.1+dfsg-1_amd64.deb qemu ijc@dagon:dash-bug$ sudo cp qemu/usr/bin/qemu-arm-static 2.27-8/usr/bin/ ijc@dagon:dash-bug$ sudo chroot 2.27-8/ dash -c 'echo *' bin etc lib usr ijc@dagon:dash-bug$ sudo cp qemu/usr/bin/qemu-arm-static 2.28-2/usr/bin/ ijc@dagon:dash-bug$ sudo chroot 2.28-2/ dash -c 'echo *' * ijc@dagon:dash-bug$ cat /proc/sys/fs/binfmt_misc/qemu-arm enabled interpreter /usr/bin/qemu-arm-static flags: OCF offset 0 magic 7f454c460101010002002800 mask ff00feff ijc@dagon:dash-bug$ Cheers, Ian.
Bug#916043: qemu-user-static: qemu-arm-static running armel dash breaks globbing
On Sun, 09 Dec 2018 15:19:55 + Ian Campbell wrote: Package: qemu-user-static Version: 1:2.12+dfsg-3+b1 Severity: normal Dear Maintainer, While working on a new qcontrol package, using a cross-schroot via qemu-arm-static on an amd64 host, I noticed that globs did not appear to be expanded when running dash. It appears to relate to libc 2.28-2 but only when running under qemu-arm-static: Can you please verify if this is still a problem for version 3.1 currently in unstable? (since it is a static binary you can install the package directly from unstable or just grab the binary you need from that package). Thanks! /mjt
Bug#916043: qemu-user-static: qemu-arm-static running armel dash breaks globbing
Package: qemu-user-static Version: 1:2.12+dfsg-3+b1 Severity: normal Dear Maintainer, While working on a new qcontrol package, using a cross-schroot via qemu-arm-static on an amd64 host, I noticed that globs did not appear to be expanded when running dash. It appears to relate to libc 2.28-2 but only when running under qemu-arm-static: ijc@dagon:dash-bug$ curl -LOJ "http://ftp.uk.debian.org/debian/pool/main/d/dash/dash_0.5.10.2-1_armel.deb; % Total% Received % Xferd Average Speed TimeTime Time Current Dload Upload Total SpentLeft Speed 100 105k 100 105k0 0 1074k 0 --:--:-- --:--:-- --:--:-- 1074k ijc@dagon:dash-bug$ curl -LOJ "http://ftp.uk.debian.org/debian/pool/main/g/glibc/libc6_2.28-2_armel.deb; % Total% Received % Xferd Average Speed TimeTime Time Current Dload Upload Total SpentLeft Speed 100 2340k 100 2340k0 0 5454k 0 --:--:-- --:--:-- --:--:-- 5454k ijc@dagon:dash-bug$ curl -LOJ "http://ftp.uk.debian.org/debian/pool/main/g/glibc/libc6_2.27-8_armel.deb; % Total% Received % Xferd Average Speed TimeTime Time Current Dload Upload Total SpentLeft Speed 100 2371k 100 2371k0 0 5305k 0 --:--:-- --:--:-- --:--:-- 5293k ijc@dagon:dash-bug$ dpkg-deb -x libc6_2.27-8_armel.deb 2.27-8 ijc@dagon:dash-bug$ dpkg-deb -x dash_0.5.10.2-1_armel.deb 2.27-8 ijc@dagon:dash-bug$ dpkg-deb -x libc6_2.28-2_armel.deb 2.28-2 ijc@dagon:dash-bug$ dpkg-deb -x dash_0.5.10.2-1_armel.deb 2.28-2 ijc@dagon:dash-bug$ dpkg -l qemu-user-static Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ NameVersion Architecture Description +++-===--- ii qemu-user-static1:2.12+dfsg-3+b1 amd64QEMU user mode emulation binaries (static version) ijc@dagon:dash-bug$ mkdir 2.27-8/usr/bin/ 2.28-2/usr/bin ijc@dagon:dash-bug$ cp /usr/bin/qemu-arm-static 2.27-8/usr/bin/ ijc@dagon:dash-bug$ cp /usr/bin/qemu-arm-static 2.28-2/usr/bin/ ijc@dagon:dash-bug$ sudo chroot 2.27-8/ dash -c 'echo *' bin etc lib usr ijc@dagon:dash-bug$ sudo chroot 2.28-2/ dash -c 'echo *' * ijc@dagon:dash-bug$ uname -a Linux dagon 4.17.0-1-amd64 #1 SMP Debian 4.17.8-1 (2018-07-20) x86_64 GNU/Linux However I cannot reproduce on my qnap (armel): root@qnap:~/dash-bug# curl -LOJ "http://ftp.uk.debian.org/debian/pool/main/d/dash/dash_0.5.10.2-1_armel.deb; % Total% Received % Xferd Average Speed TimeTime Time Current Dload Upload Total SpentLeft Speed 100 105k 100 105k0 0 1012k 0 --:--:-- --:--:-- --:--:-- 1012k root@qnap:~/dash-bug# curl -LOJ "http://ftp.uk.debian.org/debian/pool/main/g/glibc/libc6_2.28-2_armel.deb; % Total% Received % Xferd Average Speed TimeTime Time Current Dload Upload Total SpentLeft Speed 100 2340k 100 2340k0 0 3720k 0 --:--:-- --:--:-- --:--:-- 3720k root@qnap:~/dash-bug# curl -LOJ "http://ftp.uk.debian.org/debian/pool/main/g/glibc/libc6_2.27-8_armel.deb; % Total% Received % Xferd Average Speed TimeTime Time Current Dload Upload Total SpentLeft Speed 100 2371k 100 2371k0 0 3676k 0 --:--:-- --:--:-- --:--:-- 3676k root@qnap:~/dash-bug# dpkg-deb -x libc6_2.27-8_armel.deb 2.27-8 root@qnap:~/dash-bug# dpkg-deb -x dash_0.5.10.2-1_armel.deb 2.27-8 root@qnap:~/dash-bug# dpkg-deb -x libc6_2.28-2_armel.deb 2.28-2 root@qnap:~/dash-bug# dpkg-deb -x dash_0.5.10.2-1_armel.deb 2.28-2 root@qnap:~/dash-bug# chroot 2.27-8/ dash -c 'echo *' bin etc lib usr root@qnap:~/dash-bug# chroot 2.28-2/ dash -c 'echo *' bin etc lib usr root@qnap:~/dash-bug# uname -a Linux qnap 4.18.0-3-marvell #1 Debian 4.18.20-2 (2018-11-23) armv5tel GNU/Linux Nor on abel.debian.org (armel porter box, but with armhf kernel so not necessarily a good data point): (sid_armel-dchroot)ijc@abel:/$ apt policy dash libc6 dash: Installed: 0.5.10.2-1 Candidate: 0.5.10.2-1 Version table: *** 0.5.10.2-1 500 500 http://ftp.uk.debian.org/debian sid/main armel Packages 100 /var/lib/dpkg/status libc6: Installed: 2.28-2 Candidate: 2.28-2 Version table: *** 2.28-2 500 500 http://ftp.uk.debian.org/debian sid/main armel Packages 100