Bug#948522: If I rebuild src:file with libseccomp-dev installed, then "fakeroot file ..." crashes with "Bad system call"

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug#948522: If I rebuild src:file with libseccomp-dev installed, then "fakeroot file ..." crashes with "Bad system call"

Daniel Schepler-6
Source: file
Version: 1:5.38-3
Severity: normal

As the subject says: in my environment with libseccomp-dev installed,
the resulting file package gets a dependency on libseccomp2.  And if I
install that, then I subsequently get strange errors while trying to
build src:binutils, which I eventually tracked down to:

$ fakeroot file /usr/bin/file
Bad system call
$

"fakeroot strace file /usr/bin/file" shows:

...
futex(0x7ff6fb5b06f4, FUTEX_WAKE_PRIVATE, 2147483647) = 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, 0x55c39592c300) = 0
futex(0x7ff6fb3f40c8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
stat(0x55c39592d910, 0x7ffe668c02f0)    = -1 ENOENT (No such file or directory)
stat(0x55c39592d910, 0x7ffe668c02f0)    = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, 0x55c39592d910, O_RDONLY) = -1 ENOENT (No such file
or directory)
stat(0x55c39592fb70, 0x7ffe668c02e0)    = 0
msgget(0x41c5ccd5, IPC_CREAT|0600)      = ?
+++ killed by SIGSYS +++
Bad system call (core dumped)

(It might also be relevant here that I am running the Debian
environment within a systemd-nspawn container which already applies
its own seccomp filters, and also that I am running on a locally built
kernel not an official Debian kernel - and also the host system is a
custom built system so my systemd-nspawn does not have Debian
patches.)

I would guess the easiest way to resolve this would be to add an
explicit "--disable-libseccomp" to the dh_auto_configure command.
(Which I would certainly prefer to having the source package
Build-Conflicts: libseccomp-dev.)
--
Daniel Schepler

Reply | Threaded
Open this post in threaded view
|

Bug#948522: If I rebuild src:file with libseccomp-dev installed, then "fakeroot file ..." crashes with "Bad system call"

Christoph Biedl-7
Control: tag 948522 pending

Daniel Schepler wrote...

> As the subject says: in my environment with libseccomp-dev installed,
> the resulting file package gets a dependency on libseccomp2.  And if I
> install that, then I subsequently get strange errors while trying to
> build src:binutils, (...)

It might be an interesting topic whether "Not needed packages installed
in the build system trigger a build error" should be considered a bug -
since the idea is to always use a system with only those packages
installed that are needed. That's something for another day.

Given the fact however the fix is really simple (and my experiences with
seccomp are not that good and I don't want to be remebered about them),
I'll just go ahead as suggested.

Cheers,

    Christoph

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Bug#948522: If I rebuild src:file with libseccomp-dev installed, then "fakeroot file ..." crashes with "Bad system call"

Jan Braun
Hi,
I was just passing by and noticed this:

Christoph Biedl schrob:
> It might be an interesting topic whether "Not needed packages installed
> in the build system trigger a build error" should be considered a bug -

Yes, that's a bug. Ideally, building should succeed. Otherwise, there
should be a Build-Conflicts: against the interfering package(s).

> since the idea is to always use a system with only those packages
> installed that are needed. That's something for another day.

As a user: no, that's not the idea. I value being able to occasionally
build patched debian packages locally on my machine, without having to
set up a "clean chroot" and the associated bandwidth/storage costs.

This has been treated as a valid use case in the past.

Cheers,
    Jan

signature.asc (849 bytes) Download Attachment