vn971 / rua

Build tool for Arch Linux providing control, review and jailed build options
GNU General Public License v3.0
425 stars 42 forks source link

Missing syscall when installing streamlink #91

Open kuon opened 4 years ago

kuon commented 4 years ago

I tried to install streamlink-git AUR, and I get the following error:

...
UPDATING build/lib/streamlink/_version.py
set build/lib/streamlink/_version.py to '1.2.0+41.gcc32730'
running build_sphinx
Running Sphinx v2.2.1
making output directory... done
/usr/lib/python3.8/site-packages/sphinx/util/compat.py:30: RemovedInSphinx30Warning: The config variable "source_parsers" is deprecated. Please update your extension for the parser and remove the setting.
  warnings.warn('The config variable "source_parsers" is deprecated. '
/usr/lib/python3.8/site-packages/sphinx/util/compat.py:36: RemovedInSphinx30Warning: app.add_source_parser() does not support suffix argument. Use app.add_source_suffix() instead.
  app.add_source_parser(suffix, parser)
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 13 added, 0 changed, 0 removed
/usr/lib/python3.8/site-packages/recommonmark/parser.py:75: UserWarning: Container node skipped: type=document
  warn("Container node skipped: type={0}".format(mdnode.t))
/home/kuon/.cache/rua/build/streamlink-git/PKGBUILD: line 41:   720 Bad system call         (core dumped) python setup.py build_sphinx -b man
==> ERROR: A failure occurred in build().

It installs fine with makepkg.

Coredump:

           PID: 695330 (python)
           UID: 1000 (kuon)
           GID: 1000 (kuon)
        Signal: 31 (SYS)
     Timestamp: Fri 2019-11-15 21:02:46 CET (3min 41s ago)
  Command Line: python setup.py build_sphinx -b man
    Executable: /usr/bin/python3.8
 Control Group: /user.slice/user-1000.slice/session-1.scope
          Unit: session-1.scope
         Slice: user-1000.slice
       Session: 1
     Owner UID: 1000 (kuon)
       Boot ID: 3a90871f2e1042bf847e13c2b23b0c32
    Machine ID: b20570e1eb354484842cd3f69b841431
      Hostname: yoda
       Storage: /var/lib/systemd/coredump/core.python.1000.3a90871f2e1042bf847e13c2b23b0c32.695330.1573848166000000000000.lz4
       Message: Process 695330 (python) of user 1000 dumped core.

                Stack trace of thread 720:
                #0  0x00007f09fe442e9d syscall (libc.so.6)
                #1  0x00007f09f8fe9988 n/a (libblas.so.3)
                #2  0x00007f09f8fe9dca blas_memory_alloc (libblas.so.3)
                #3  0x00007f09f8fea932 blas_thread_init (libblas.so.3)
                #4  0x00007f09f8dd7084 gotoblas_init (libblas.so.3)
                #5  0x00007f09fe59872a call_init.part.0 (ld-linux-x86-64.so.2)
                #6  0x00007f09fe598831 _dl_init (ld-linux-x86-64.so.2)
                #7  0x00007f09fe59c603 dl_open_worker (ld-linux-x86-64.so.2)
                #8  0x00007f09fe482d79 _dl_catch_exception (libc.so.6)
                #9  0x00007f09fe59beee _dl_open (ld-linux-x86-64.so.2)
                #10 0x00007f09fdfad34c n/a (libdl.so.2)
                #11 0x00007f09fe482d79 _dl_catch_exception (libc.so.6)
                #12 0x00007f09fe482e13 _dl_catch_error (libc.so.6)
                #13 0x00007f09fdfadab9 n/a (libdl.so.2)
                #14 0x00007f09fdfad3da dlopen (libdl.so.2)
                #15 0x00007f09fe1f5ba5 _PyImport_FindSharedFuncptr (libpython3.8.so.1.0)
                #16 0x00007f09fe1f5e3f _PyImport_LoadDynamicModuleWithSpec (libpython3.8.so.1.0)
                #17 0x00007f09fe1f606a n/a (libpython3.8.so.1.0)
                #18 0x00007f09fe104957 n/a (libpython3.8.so.1.0)
                #19 0x00007f09fe113f11 PyVectorcall_Call (libpython3.8.so.1.0)
                #20 0x00007f09fe168841 _PyEval_EvalFrameDefault (libpython3.8.so.1.0)
                #21 0x00007f09fe1331ea _PyEval_EvalCodeWithName (libpython3.8.so.1.0)
                #22 0x00007f09fe133f9f _PyFunction_Vectorcall (libpython3.8.so.1.0)
                #23 0x00007f09fe167aad _PyEval_EvalFrameDefault (libpython3.8.so.1.0)
                #24 0x00007f09fe133f0b _PyFunction_Vectorcall (libpython3.8.so.1.0)
                #25 0x00007f09fe163a11 _PyEval_EvalFrameDefault (libpython3.8.so.1.0)
                #26 0x00007f09fe133f0b _PyFunction_Vectorcall (libpython3.8.so.1.0)
                #27 0x00007f09fe16361c _PyEval_EvalFrameDefault (libpython3.8.so.1.0)
                #28 0x00007f09fe133f0b _PyFunction_Vectorcall (libpython3.8.so.1.0)
                #29 0x00007f09fe16361c _PyEval_EvalFrameDefault (libpython3.8.so.1.0)
                #30 0x00007f09fe133f0b _PyFunction_Vectorcall (libpython3.8.so.1.0)
                #31 0x00007f09fe16361c _PyEval_EvalFrameDefault (libpython3.8.so.1.0)
                #32 0x00007f09fe133f0b _PyFunction_Vectorcall (libpython3.8.so.1.0)
                #33 0x00007f09fe101ec8 n/a (libpython3.8.so.1.0)
                #34 0x00007f09fe128b93 _PyObject_CallMethodIdObjArgs (libpython3.8.so.1.0)
                #35 0x00007f09fe0f7a2a PyImport_ImportModuleLevelObject (libpython3.8.so.1.0)
                #36 0x00007f09fe167041 _PyEval_EvalFrameDefault (libpython3.8.so.1.0)
                #37 0x00007f09fe1331ea _PyEval_EvalCodeWithName (libpython3.8.so.1.0)
                #38 0x00007f09fe133e0a PyEval_EvalCodeEx (libpython3.8.so.1.0)
                #39 0x00007f09fe1bfa9c PyEval_EvalCode (libpython3.8.so.1.0)
                #40 0x00007f09fe1fba23 n/a (libpython3.8.so.1.0)
                #41 0x00007f09fe104957 n/a (libpython3.8.so.1.0)
                #42 0x00007f09fe113f11 PyVectorcall_Call (libpython3.8.so.1.0)
                #43 0x00007f09fe168841 _PyEval_EvalFrameDefault (libpython3.8.so.1.0)
                #44 0x00007f09fe1331ea _PyEval_EvalCodeWithName (libpython3.8.so.1.0)
                #45 0x00007f09fe133f9f _PyFunction_Vectorcall (libpython3.8.so.1.0)
                #46 0x00007f09fe167aad _PyEval_EvalFrameDefault (libpython3.8.so.1.0)
                #47 0x00007f09fe133f0b _PyFunction_Vectorcall (libpython3.8.so.1.0)
                #48 0x00007f09fe163a11 _PyEval_EvalFrameDefault (libpython3.8.so.1.0)
                #49 0x00007f09fe133f0b _PyFunction_Vectorcall (libpython3.8.so.1.0)
                #50 0x00007f09fe16361c _PyEval_EvalFrameDefault (libpython3.8.so.1.0)
                #51 0x00007f09fe133f0b _PyFunction_Vectorcall (libpython3.8.so.1.0)
                #52 0x00007f09fe16361c _PyEval_EvalFrameDefault (libpython3.8.so.1.0)
                #53 0x00007f09fe133f0b _PyFunction_Vectorcall (libpython3.8.so.1.0)
                #54 0x00007f09fe101ec8 n/a (libpython3.8.so.1.0)
                #55 0x00007f09fe128b93 _PyObject_CallMethodIdObjArgs (libpython3.8.so.1.0)
                #56 0x00007f09fe0f7a2a PyImport_ImportModuleLevelObject (libpython3.8.so.1.0)
                #57 0x00007f09fe16325a n/a (libpython3.8.so.1.0)
                #58 0x00007f09fe155977 PyCFunction_Call (libpython3.8.so.1.0)
                #59 0x00007f09fe168841 _PyEval_EvalFrameDefault (libpython3.8.so.1.0)
                #60 0x00007f09fe1331ea _PyEval_EvalCodeWithName (libpython3.8.so.1.0)
                #61 0x00007f09fe133f9f _PyFunction_Vectorcall (libpython3.8.so.1.0)
                #62 0x00007f09fe16361c _PyEval_EvalFrameDefault (libpython3.8.so.1.0)
                #63 0x00007f09fe133794 _PyEval_EvalCodeWithName (libpython3.8.so.1.0)
vn971 commented 4 years ago

That's an interesting one.. I tried to find the 31-th system call, but somewhy weren't able to do it easily. Have to dig up the history, I knew how to do it in the past..

For the record, what is your system-s architecture? (uname -m)

kuon commented 4 years ago

Linux yoda 5.3.11-arch1-1 #1 SMP PREEMPT Tue, 12 Nov 2019 22:19:48 +0000 x86_64 GNU/Linux

I did an strace, it is very verbose, but I think this part can be of interest:

[pid 612283] execve("/usr/bin/strace", ["strace", "python", "setup.py", "build_sphinx", "-b", "man"], 0x55bcd9a3ba30 /* 69 vars */) = 0
[pid 612283] brk(NULL)                  = 0x5641ab15c000
[pid 612283] arch_prctl(0x3001 /* ARCH_??? */, 0x7ffea1b54b50) = -1 EINVAL (Invalid argument)
[pid 612283] access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
[pid 612283] openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
[pid 612283] fstat(3, {st_mode=S_IFREG|0644, st_size=479323, ...}) = 0
[pid 612283] mmap(NULL, 479323, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fe0beec4000
[pid 612283] close(3)                   = 0
[pid 612283] openat(AT_FDCWD, "/usr/lib/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
[pid 612283] read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\3606\0\0\0\0\0\0"..., 832) = 832
[pid 612283] fstat(3, {st_mode=S_IFREG|0755, st_size=39408, ...}) = 0
[pid 612283] mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe0beec2000
[pid 612283] mmap(NULL, 43512, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe0beeb7000
[pid 612283] mmap(0x7fe0beeba000, 16384, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7fe0beeba000
[pid 612283] mmap(0x7fe0beebe000, 8192, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7fe0beebe000
[pid 612283] mmap(0x7fe0beec0000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0x7fe0beec0000
[pid 612283] close(3)                   = 0
[pid 612283] openat(AT_FDCWD, "/usr/lib/libunwind-ptrace.so.0", O_RDONLY|O_CLOEXEC) = 3
[pid 612283] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \20\0\0\0\0\0\0"..., 832) = 832
[pid 612283] fstat(3, {st_mode=S_IFREG|0755, st_size=18120, ...}) = 0
[pid 612283] mmap(NULL, 20584, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe0beeb1000
[pid 612283] mmap(0x7fe0beeb2000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7fe0beeb2000
[pid 612283] mmap(0x7fe0beeb4000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7fe0beeb4000
[pid 612283] mmap(0x7fe0beeb5000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7fe0beeb5000
[pid 612283] close(3)                   = 0
[pid 612283] openat(AT_FDCWD, "/usr/lib/libunwind-x86_64.so.8", O_RDONLY|O_CLOEXEC) = 3
[pid 612283] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0 \0\0\0\0\0\0"..., 832) = 832
[pid 612283] fstat(3, {st_mode=S_IFREG|0755, st_size=79424, ...}) = 0
[pid 612283] mmap(NULL, 125320, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe0bee92000
[pid 612283] mmap(0x7fe0bee94000, 57344, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7fe0bee94000
[pid 612283] mmap(0x7fe0beea2000, 12288, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7fe0beea2000
[pid 612283] mmap(0x7fe0beea5000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12000) = 0x7fe0beea5000
[pid 612283] mmap(0x7fe0beea7000, 39304, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe0beea7000
[pid 612283] close(3)                   = 0
[pid 612283] openat(AT_FDCWD, "/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid 612283] read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`r\2\0\0\0\0\0"..., 832) = 832
[pid 612283] lseek(3, 64, SEEK_SET)     = 64
[pid 612283] read(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784) = 784
[pid 612283] lseek(3, 848, SEEK_SET)    = 848
[pid 612283] read(3, "\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0", 32) = 32
[pid 612283] lseek(3, 880, SEEK_SET)    = 880
[pid 612283] read(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0003\321\363P\3617(e\35t\335*V\272\321\344"..., 68) = 68
[pid 612283] fstat(3, {st_mode=S_IFREG|0755, st_size=2149496, ...}) = 0
[pid 612283] lseek(3, 64, SEEK_SET)     = 64
[pid 612283] read(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784) = 784
[pid 612283] lseek(3, 848, SEEK_SET)    = 848
[pid 612283] read(3, "\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0", 32) = 32
[pid 612283] lseek(3, 880, SEEK_SET)    = 880
[pid 612283] read(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0003\321\363P\3617(e\35t\335*V\272\321\344"..., 68) = 68
[pid 612283] mmap(NULL, 1860536, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe0beccb000
[pid 612283] mprotect(0x7fe0becf0000, 1671168, PROT_NONE) = 0
[pid 612283] mmap(0x7fe0becf0000, 1363968, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x25000) = 0x7fe0becf0000
[pid 612283] mmap(0x7fe0bee3d000, 303104, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x172000) = 0x7fe0bee3d000
[pid 612283] mmap(0x7fe0bee88000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bc000) = 0x7fe0bee88000
[pid 612283] mmap(0x7fe0bee8e000, 13240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe0bee8e000
[pid 612283] close(3)                   = 0
[pid 612283] openat(AT_FDCWD, "/usr/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
[pid 612283] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\201\0\0\0\0\0\0"..., 832) = 832
[pid 612283] lseek(3, 824, SEEK_SET)    = 824
[pid 612283] read(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\213\4\321\202[c\331\246\0\343\325z\307\20X\223"..., 68) = 68
[pid 612283] fstat(3, {st_mode=S_IFREG|0755, st_size=159824, ...}) = 0
[pid 612283] lseek(3, 824, SEEK_SET)    = 824
[pid 612283] read(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\213\4\321\202[c\331\246\0\343\325z\307\20X\223"..., 68) = 68
[pid 612283] mmap(NULL, 135592, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe0beca9000
[pid 612283] mmap(0x7fe0becb0000, 65536, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7fe0becb0000
[pid 612283] mmap(0x7fe0becc0000, 20480, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7fe0becc0000
[pid 612283] mmap(0x7fe0becc5000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b000) = 0x7fe0becc5000
[pid 612283] mmap(0x7fe0becc7000, 12712, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe0becc7000
[pid 612283] close(3)                   = 0
[pid 612283] openat(AT_FDCWD, "/usr/lib/libunwind.so.8", O_RDONLY|O_CLOEXEC) = 3
[pid 612283] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0 \0\0\0\0\0\0"..., 832) = 832
[pid 612283] fstat(3, {st_mode=S_IFREG|0755, st_size=59008, ...}) = 0
[pid 612283] mmap(NULL, 104904, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe0bec8f000
[pid 612283] mmap(0x7fe0bec91000, 36864, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7fe0bec91000
[pid 612283] mmap(0x7fe0bec9a000, 12288, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xb000) = 0x7fe0bec9a000
[pid 612283] mmap(0x7fe0bec9d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd000) = 0x7fe0bec9d000
[pid 612283] mmap(0x7fe0bec9f000, 39368, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe0bec9f000
[pid 612283] close(3)                   = 0
[pid 612283] openat(AT_FDCWD, "/usr/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
[pid 612283] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 0\0\0\0\0\0\0"..., 832) = 832
[pid 612283] fstat(3, {st_mode=S_IFREG|0644, st_size=873816, ...}) = 0
[pid 612283] mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe0bec8d000
[pid 612283] mmap(NULL, 103152, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe0bec73000
[pid 612283] mmap(0x7fe0bec76000, 69632, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7fe0bec76000
[pid 612283] mmap(0x7fe0bec87000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14000) = 0x7fe0bec87000
[pid 612283] mmap(0x7fe0bec8b000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7fe0bec8b000
[pid 612283] close(3)                   = 0
[pid 612283] openat(AT_FDCWD, "/usr/lib/liblzma.so.5", O_RDONLY|O_CLOEXEC) = 3
[pid 612283] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 0\0\0\0\0\0\0"..., 832) = 832
[pid 612283] fstat(3, {st_mode=S_IFREG|0755, st_size=157440, ...}) = 0
[pid 612283] mmap(NULL, 159760, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe0bec4b000
[pid 612283] mprotect(0x7fe0bec4e000, 143360, PROT_NONE) = 0
[pid 612283] mmap(0x7fe0bec4e000, 94208, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7fe0bec4e000
[pid 612283] mmap(0x7fe0bec65000, 45056, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a000) = 0x7fe0bec65000
[pid 612283] mmap(0x7fe0bec71000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x25000) = 0x7fe0bec71000
[pid 612283] close(3)                   = 0
[pid 612283] mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe0bec48000
[pid 612283] arch_prctl(ARCH_SET_FS, 0x7fe0bec48740) = 0
[pid 612283] mprotect(0x7fe0bee88000, 12288, PROT_READ) = 0
[pid 612283] mprotect(0x7fe0becc5000, 4096, PROT_READ) = 0
[pid 612283] mprotect(0x7fe0bec71000, 4096, PROT_READ) = 0
[pid 612283] mprotect(0x7fe0bec8b000, 4096, PROT_READ) = 0
[pid 612283] mprotect(0x7fe0bec9d000, 4096, PROT_READ) = 0
[pid 612283] mprotect(0x7fe0beea5000, 4096, PROT_READ) = 0
[pid 612283] mprotect(0x7fe0beeb5000, 4096, PROT_READ) = 0
[pid 612283] mprotect(0x7fe0beec0000, 4096, PROT_READ) = 0
[pid 612283] mprotect(0x5641ab074000, 331776, PROT_READ) = 0
[pid 612283] mprotect(0x7fe0bef64000, 4096, PROT_READ) = 0
[pid 612283] munmap(0x7fe0beec4000, 479323) = 0
[pid 612283] set_tid_address(0x7fe0bec48a10) = 720
[pid 612283] set_robust_list(0x7fe0bec48a20, 24) = 0
[pid 612283] rt_sigaction(SIGRTMIN, {sa_handler=0x7fe0becb0c40, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7fe0becbd930}, NULL, 8) = 0
[pid 612283] rt_sigaction(SIGRT_1, {sa_handler=0x7fe0becb0ce0, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO, sa_restorer=0x7fe0becbd930}, NULL, 8) = 0
[pid 612283] rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
[pid 612283] prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
[pid 612283] brk(NULL)                  = 0x5641ab15c000
[pid 612283] brk(0x5641ab17d000)        = 0x5641ab17d000
[pid 612283] openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
[pid 612283] fstat(3, {st_mode=S_IFREG|0644, st_size=3039616, ...}) = 0
[pid 612283] mmap(NULL, 3039616, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fe0be961000
[pid 612283] close(3)                   = 0
[pid 612283] getpid()                   = 720
[pid 612283] uname({sysname="Linux", nodename="yoda", ...}) = 0
[pid 612283] rt_sigaction(SIGCHLD, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7fe0bed06fb0}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
[pid 612283] getuid()                   = 1000
[pid 612283] getgid()                   = 1000
[pid 612283] clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLDstrace: Process 612284 attached
, child_tidptr=0x7fe0bec48a10) = 721
[pid 612284] set_robust_list(0x7fe0bec48a20, 24 <unfinished ...>
[pid 612283] ptrace(PTRACE_SEIZE, 721, NULL, 0 <unfinished ...>
[pid 612284] <... set_robust_list resumed>) = 0
[pid 612284] pause( <unfinished ...>
[pid 612283] <... ptrace resumed>)      = ?
[pid 612283] +++ killed by SIGSYS (core dumped) +++
[pid 610694] <... wait4 resumed>[{WIFSIGNALED(s) && WTERMSIG(s) == SIGSYS && WCOREDUMP(s)}], 0, NULL) = 720
[pid 610694] rt_sigaction(SIGINT, {sa_handler=0x55bcd8e66470, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7fc0e1655fb0}, {sa_handler=0x55bcd8e48ea0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7fc0e1655fb0}, 8) = 0
[pid 610694] ioctl(2, TIOCGWINSZ, {ws_row=77, ws_col=284, ws_xpixel=2556, ws_ypixel=1386}) = 0
[pid 610694] openat(AT_FDCWD, "/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 610694] openat(AT_FDCWD, "/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 610694] openat(AT_FDCWD, "/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 610694] openat(AT_FDCWD, "/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 610694] openat(AT_FDCWD, "/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 610694] openat(AT_FDCWD, "/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 610694] write(2, "/home/kuon/.cache/rua/build/stre"..., 149/home/kuon/.cache/rua/build/streamlink-git/PKGBUILD: line 41:   720 Bad system call         (core dumped) strace python setup.py build_sphinx -b man
) = 149
[pid 610694] rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
[pid 610694] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=0, si_uid=1000, si_status=SIGSYS, si_utime=0, si_stime=0} ---
vn971 commented 4 years ago

For the record, I've created the seccomp files using this generator: https://github.com/kurnevsky/dotfiles/blob/master/.seccomp/seccomp-gen.c

Something among those blacklisted calls is 31 for python/sphinx. Didn't have time to dig up the numbers<->syscall_names table yet.

Offtopic: I'm not doing a very good job at including it in binary for now, but at least it's reproducible. And not an executable binary, rather a declarative seccomp description.

hiciu commented 4 years ago

I am having the same issue with rua install doctl:

==> Entering fakeroot environment...
==> Starting package()...
/home/hiciu/.cache/rua/build/doctl/PKGBUILD: line 33:  7568 Bad system call         (core dumped) ${pkgdir}/usr/bin/"${pkgname}" completion bash > "${pkgdir}/usr/share/bash-completion/completions/${pkgname}"
==> ERROR: A failure occurred in package().
    Aborting...
Build failed with exit code 4 in /home/hiciu/.cache/rua/build/doctl

dmesg gives me that, but I'm not sure how to read it:

[40500.412783] audit: type=1326 audit(1576267582.048:1212): auid=1000 uid=1000 gid=100 ses=2 pid=159092 comm="doctl" exe="/home/hiciu/.cache/rua/build/doctl/pkg/doctl/usr/bin/doctl" sig=31 arch=40000003 syscall=243 compat=1 ip=0x809b2d2 code=0x0
[40500.412787] audit: type=1701 audit(1576267582.048:1213): auid=1000 uid=1000 gid=100 ses=2 pid=159092 comm="doctl" exe="/home/hiciu/.cache/rua/build/doctl/pkg/doctl/usr/bin/doctl" sig=31 res=1

coredumpctl info says:

           PID: 159092 (doctl)
...
        Signal: 31 (SYS)
     Timestamp: Fri 2019-12-13 21:06:22 CET (4min 26s ago)
  Command Line: /home/hiciu/.cache/rua/build/doctl/pkg/doctl/usr/bin/doctl completion bash
    Executable: /home/hiciu/.cache/rua/build/doctl/pkg/doctl/usr/bin/doctl
...
       Message: Process 159092 (doctl) of user 1000 dumped core.

                Stack trace of thread 7568:
                #0  0x000000000809b2d2 n/a (/home/hiciu/.cache/rua/build/doctl/pkg/doctl/usr/bin/doctl + 0x532d2)

Stack trace is constant for given package version. When I encountered this bug for the first time few weeks ago it looked like this:

           PID: 94138 (doctl)
        Signal: 31 (SYS)
     Timestamp: Mon 2019-11-18 14:49:37 CET (3 weeks 4 days ago)
  Command Line: /home/hiciu/.cache/rua/build/doctl/pkg/doctl/usr/bin/doctl completion bash
    Executable: /home/hiciu/.cache/rua/build/doctl/pkg/doctl/usr/bin/doctl
       Message: Process 94138 (doctl) of user 1000 dumped core.

                Stack trace of thread 6884:
                #0  0x00000000f7f0f8eb __brk (/usr/lib32/ld-2.30.so)
                #1  0x00000000f7f0e375 _dl_sysdep_start (/usr/lib32/ld-2.30.so)
                #2  0x00000000f7ef6f75 _dl_start (/usr/lib32/ld-2.30.so)
                #3  0x00000000f7ef612b _start (/usr/lib32/ld-2.30.so)