FS#65100 - [file] 5.38-1 crashes with "Bad system call" in makepkg strip.sh
Attached to Project:
Arch Linux
Opened by xnor (xnor) - Friday, 10 January 2020, 01:24 GMT
Last edited by Levente Polyak (anthraxx) - Friday, 10 January 2020, 03:12 GMT
Opened by xnor (xnor) - Friday, 10 January 2020, 01:24 GMT
Last edited by Levente Polyak (anthraxx) - Friday, 10 January 2020, 03:12 GMT
|
Details
Upgrading file from 5.37-5 to 5.38-1 broke makepkg stripping
binaries and shared libraries because
/usr/share/makepkg/tidy/strip.sh calls $(file -bi "$binary")
which crashes with "Bad system call".
Tail of strace output: openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=3035216, ...}) = 0 mmap(NULL, 3035216, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7efe9cbbe000 close(3) = 0 prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) = 0 prctl(PR_SET_DUMPABLE, SUID_DUMP_DISABLE) = 0 prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) = 0 seccomp(SECCOMP_SET_MODE_STRICT, 1, NULL) = -1 EINVAL (Invalid argument) seccomp(SECCOMP_SET_MODE_FILTER, 0, 0x55ee622dcb60) = 0 futex(0x7efe9cf01048, FUTEX_WAKE_PRIVATE, 2147483647) = 0 stat(0x55ee622dcf30, 0x7fffb989ed80) = -1 ENOENT (No such file or directory) stat(0x55ee622df3f0, 0x7fffb989ed80) = -1 ENOENT (No such file or directory) access(0x55ee622e1460, R_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, 0x55ee622e1460, O_RDONLY) = 3 fstat(3, 0x7fffb989ee60) = 0 msgget(0x35db8cad, IPC_CREAT|0600) = ? +++ killed by SIGSYS +++ Recompiling file with --disable-libseccomp fixes the crash and results in makepkg stripping binaries again. |
This task depends upon
Closed by Levente Polyak (anthraxx)
Friday, 10 January 2020, 03:12 GMT
Reason for closing: Fixed
Additional comments about closing: pacman 5.2.1-4
Friday, 10 January 2020, 03:12 GMT
Reason for closing: Fixed
Additional comments about closing: pacman 5.2.1-4
FS#58626The makepkg change in question is not what I'd call a stable backport-worthy commit...
EDIT: I'll see about getting it into release/5.2.x though. https://lists.archlinux.org/pipermail/pacman-dev/2020-January/023962.html
echo "running file..."
file -bi "$binary"
echo "running file in command substitution..."
echo "$(file -bi "$binary")"
The output looks like this:
------
running file...
/usr/share/makepkg/tidy/strip.sh: line 97: 1001875 Bad system call file -bi "$binary"
running file in command substitution...
------