Package: dash Version: 0.5.7-4 Severity: normal Dear Maintainer,
When I create i386 chroot environment on filesystem that have 64bit inode (large xfs/btrfs volume or xfs on 64bit kernel), dash glob may not work properly by useing 32-bit APIs. By this reason, pbuilder may fail when building i386 package on amd64 host with xfs/btrfs volume. I hope to work i386 chroot on amd64 if it's possible. Same issue has been reported on icedove; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757199 Details: 1) my ~/tmp is xfs with inode64 option (this is defualt by kernel). sugi@tempest:~% mount |grep /pub/tmp /dev/mapper/data_store-pub_tmp on /pub/tmp type xfs (rw,noatime,attr2,inode64,logbufs=8,noquota) sugi@tempest:~% ls -l ~/tmp lrwxrwxrwx 1 sugi sugi 13 Nov 11 2007 /home/sugi/tmp -> /pub/tmp/sugi/ 2) make i386 environemnt sugi@tempest:~% cd ~/tmp sugi@tempest:~/tmp% sudo debootstrap --arch=i386 sid root-i386 (snip...) 3) test glob on chroot dash 'echo *' returns only var in this case; sugi@tempest:~/tmp% echo 'echo "==> ls"; ls; echo "==> echo * on dash"; echo *; echo "==> echo * on bash"; bash -c "echo *"' | sudo chroot ~/tmp/root-i386 sh - ==> ls bin dev home media opt root sbin sys usr boot etc lib mnt proc run srv tmp var ==> echo * on dash var ==> echo * on bash bin boot dev etc home lib media mnt opt proc root run sbin srv sys tmp usr var By strace, getdents() fails with EOVERFLOW; sugi@tempest:~/tmp% echo 'echo *' | sudo chroot ~/tmp/root-i386 strace sh - execve("/bin/sh", ["sh", "-"], [/* 18 vars */]) = 0 brk(0) = 0xf93d4000 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf77a4000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=10718, ...}) = 0 mmap2(NULL, 10718, PROT_READ, MAP_PRIVATE, 3, 0) = 0xf77a1000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/i386-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200\230\1\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1508804, ...}) = 0 mmap2(NULL, 1514012, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xf762f000 mmap2(0xf779b000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16c000) = 0xf779b000 mmap2(0xf779e000, 10780, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xf779e000 close(3) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf762e000 set_thread_area({entry_number:-1, base_addr:0xf762e940, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0 (entry_number:12) mprotect(0xf779b000, 8192, PROT_READ) = 0 mprotect(0xf77e3000, 4096, PROT_READ) = 0 mprotect(0xf77c6000, 4096, PROT_READ) = 0 munmap(0xf77a1000, 10718) = 0 getpid() = 12983 rt_sigaction(SIGCHLD, {0xf77d81c0, ~[RTMIN RT_1], 0}, NULL, 8) = 0 geteuid32() = 0 brk(0) = 0xf93d4000 brk(0xf93f5000) = 0xf93f5000 getppid() = 12980 getcwd("/", 4096) = 2 ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0xffc9aaa8) = -1 ENOTTY (Inappropriate ioctl for device) rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0 rt_sigaction(SIGINT, {SIG_DFL, ~[RTMIN RT_1], 0}, NULL, 8) = 0 rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0 rt_sigaction(SIGQUIT, {SIG_DFL, ~[RTMIN RT_1], 0}, NULL, 8) = 0 rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0 rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], 0}, NULL, 8) = 0 read(0, "echo *\n", 8192) = 7 openat(AT_FDCWD, ".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3 getdents(3, /* 3 entries */, 32768) = 48 getdents(3, 0xf93d4a0c, 32768) = -1 EOVERFLOW (Value too large for defined data type) close(3) = 0 write(1, "var\n", 4var ) = 4 read(0, "", 8192) = 0 exit_group(0) = ? +++ exited with 0 +++ ls -i results; sugi@tempest:~/tmp% ls -fi ~/tmp/root-i386 985027 ./ 3395378186 lib/ 2152506308 run/ 1147151605 dev/ 2151365056 ../ 21890043 etc/ 3427148892 root/ 2152506323 boot/ 2152312479 var/ 5369973824 tmp/ 4321700710 proc/ 1147188162 srv/ 5369967598 bin/ 23245323 sys/ 5369973828 mnt/ 2152506326 opt/ 21890021 usr/ 1147151603 sbin/ 23245329 home/ 5437177571 media/ 4) check by script reported on #757199 sugi@tempest:~% perl ~/summarise_stat.pl ~/tmp/root-i386/bin Summary by status ----------------- 16 18.0% are scripts (shell, perl, whatever) 20 22.5% don't use any stat() family calls at all 6 6.7% use 32-bit stat() family interfaces only [BROKEN] 46 51.7% use 64-bit stat64() family interfaces only 1 1.1% use both 32-bit and 64-bit stat() family interfaces [BROKEN] 7 7.9% BROKEN List of broken files -------------------- These use 32-bit stat() family interfaces only /home/sugi/tmp/root-i386/bin/run-parts /home/sugi/tmp/root-i386/bin/hostname /home/sugi/tmp/root-i386/bin/kill /home/sugi/tmp/root-i386/bin/ps /home/sugi/tmp/root-i386/bin/ip /home/sugi/tmp/root-i386/bin/netstat These use both 32-bit and 64-bit stat() family interfaces /home/sugi/tmp/root-i386/bin/dash -- System Information: Debian Release: jessie/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.14-2-amd64 (SMP w/8 CPU cores) Locale: LANG=C, LC_CTYPE=ja_JP.utf-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages dash depends on: ii debianutils 4.4 ii dpkg 1.17.13 ii libc6 2.19-9 dash recommends no packages. dash suggests no packages. -- debconf information excluded -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

