From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#51073: 28.0.60; SIGSYS in emacs-tests/bwrap/allows-stdout Date: Thu, 07 Oct 2021 11:30:27 +0100 Message-ID: <878rz52kl8.fsf@tcd.ie> Reply-To: "Basil L. Contovounesios" Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12252"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Philipp Stephani To: 51073@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 07 12:32:35 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYQhU-0002uX-V1 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Oct 2021 12:32:33 +0200 Original-Received: from localhost ([::1]:33272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYQhT-0000HO-4U for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Oct 2021 06:32:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48912) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYQh0-0000H2-Gx for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 06:32:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34594) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYQh0-0006rG-9a for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 06:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mYQh0-0003fA-16; Thu, 07 Oct 2021 06:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: p.stephani2@gmail.com, bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Oct 2021 10:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51073 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: Philipp Stephani Original-Received: via spool by submit@debbugs.gnu.org id=B.163360266814015 (code B ref -1); Thu, 07 Oct 2021 10:32:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Oct 2021 10:31:08 +0000 Original-Received: from localhost ([127.0.0.1]:46140 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYQg7-0003dx-M3 for submit@debbugs.gnu.org; Thu, 07 Oct 2021 06:31:08 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:36634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYQg3-0003dm-HN for submit@debbugs.gnu.org; Thu, 07 Oct 2021 06:31:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYQg3-0000DE-2N for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 06:31:03 -0400 Original-Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:44950) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYQfz-0005ni-NV for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 06:31:02 -0400 Original-Received: by mail-wr1-x434.google.com with SMTP id s15so17584526wrv.11 for ; Thu, 07 Oct 2021 03:30:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=from:to:subject:date:message-id:mime-version; bh=NAc/j357CdYU89ylzEfqOlsOaeVaLknJv1Nv395FSQ4=; b=fUVB0v+fTPEeVFhtd8eLSGFwevDqRoVM/jcqA3Aw8y84rNWNyKSxvkdhTZPAyt/bAP RdOQAHEey41TV20d3gjxb/GeWlcuQWK0otVRy5+oHXcMVtaErG6b4oBZV6Gd9vHPPdL5 wxSCSps0Atq+WaYGs5lsjWPOPdIjhaFY8FDN6HKgWoFuDR81NyMizDZSh97Ew8krVZL/ QWMdaPunL5NBsvEipr11WTeOortvAW8Lby0X/bkw27bsToi9KJsUKJZY10KCpBZKBGVj MVH6RXcqkAFkiZXYZONVcKNFX83anyCUvRbK0RNXY/noeTMGp0RGtwxORIhkce1jwVXS utIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=NAc/j357CdYU89ylzEfqOlsOaeVaLknJv1Nv395FSQ4=; b=ChcvzNN5fskXVUpde7qYrS5jSQRquAmJAppLZnH07LoUMxRYBdbGUJkgwxsVcnqDIR /EWW47ky1DtfYYBod/rxrce8hhr7HyPas81XFdnqQN4Fhls76MqGTsQOaM8nQvqJNSuN hr8BwIRiQGA/sbOxvMUrRZwkgoUbbxSyID7iyzm1PngF+ZHfQ7puESEBNJEKb43tlxrq 80CwAxhv9oicl4jbeFvovnsC6Np+ZAtihBpVC9LjvkfUiI+syqRGITkDqeaClEVScj6S U1OwP/cQSz7dfAGUTJ7YRo1HUzJfx0L3JdaxIiJU8qL1QR6JWH0g10g4IEoJgw3smAs1 cI/Q== X-Gm-Message-State: AOAM531+pQFSUqvLiYrcHWYsCBKoskkPsLwf9LDiJEE9+D0iHX8zgsfT MR0qiovp7s23cXmjgdVZMlxxw4Y62CQFuQ== X-Google-Smtp-Source: ABdhPJzdCCy8sfCt2J2y2plfOss4KCAvG+aPIhV1VSFhX3VF07y1oxDwulKdri3h9INFOoLZSE736A== X-Received: by 2002:adf:a3da:: with SMTP id m26mr4201164wrb.336.1633602655139; Thu, 07 Oct 2021 03:30:55 -0700 (PDT) Original-Received: from localhost ([2a02:8084:20e2:c380:f410:82e8:3a21:eedf]) by smtp.gmail.com with ESMTPSA id n1sm1790829wmi.30.2021.10.07.03.30.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 03:30:54 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=contovob@tcd.ie; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:216636 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Running 'make test/emacs-tests' fails with status code 159 (where 159 =3D 128 + 31 and 31 =3D SIGSYS); see the attached compilation log. Running 'sudo journalctl -g SECCOMP' includes the following: Oct 07 10:48:19 tia audit[2156]: SECCOMP auid=3D1000 uid=3D1000 gid=3D1000 ses=3D2 subj=3D=3Dunconfined pid=3D2156 comm=3D"emacs" exe=3D"/home/blc/.local/src/emacs-28/src/emacs" sig=3D31 arch=3Dc000003e syscall=3D157 compat=3D0 ip=3D0x7ff4f975629d code=3D0x80000000 Oct 07 10:48:20 tia audit[2171]: SECCOMP auid=3D1000 uid=3D1000 gid=3D1000 ses=3D2 subj=3D=3Dunconfined pid=3D2171 comm=3D"emacs" exe=3D"/home/blc/.local/src/emacs-28/src/emacs" sig=3D31 arch=3Dc000003e syscall=3D257 compat=3D0 ip=3D0x7ff14b807823 code=3D0x80000000 AFAICT syscalls 157 and 257 correspond to prctl and openat, respectively, and __GI___prctl is mentioned in the attached coredumpctl stack trace. This is confirmed by the ausearch ert-info if I run 'sudo make test/emacs-tests' (because ausearch is in my sbin): Potentially relevant Seccomp audit events: ---- type=3DSECCOMP msg=3Daudit(10/07/21 11:25:02.024:209) : auid=3Dblc uid=3D= root gid=3Droot ses=3D3 subj=3D=3Dunconfined pid=3D5982 comm=3Demacs exe=3D/home/blc/.local/src/emacs-28/src/emacs sig=3DSIGSYS arch=3Dx86_64 syscall=3Dprctl compat=3D0 ip=3D0x7fbf2438c29d code=3Dkill I don't know whether the following caveat from seccomp(2) is relevant for openat: * Seccomp filtering is based on system call numbers. However, appli=E2= =80=90 cations typically do not directly invoke system calls, but instead call wrapper functions in the C library which in turn invoke the system calls. Consequently, one must be aware of the following: [...] =E2=80=A2 Finally, the behavior of wrapper functions can change = across glibc versions. For example, in older versions, the glibc wrap=E2= =80=90 per function for open(2) invoked the system call of the same name, but starting in glibc 2.26, the implementation switched to calling openat(2) on all architectures. FWIW here are some of my local versions: $ bwrap --version bubblewrap 0.5.0 $ uname -a Linux tia 5.14.0-1-amd64 #1 SMP Debian 5.14.6-2 (2021-09-19) x86_64 GNU/L= inux $ /lib/x86_64-linux-gnu/libc.so.6=20 GNU C Library (Debian GLIBC 2.32-4) stable release version 2.32. Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiled by GNU CC version 10.3.0. libc ABIs: UNIQUE IFUNC ABSOLUTE For bug reporting instructions, please see: . HTH. Let me know if you'd like me to test anything. Thanks, --=20 Basil In GNU Emacs 28.0.60 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo versio= n 1.16.0, Xaw3d scroll bars) of 2021-10-07 built on tia Repository revision: 1100fffcd360867c0116cb5c4d17bab535577c03 Repository branch: emacs-28 Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Debian GNU/Linux bookworm/sid Configured using: 'configure 'CFLAGS=3D-O0 -ggdb3' --prefix=3D/home/blc/.local --program-suffix=3D-28 --enable-checking=3Dyes,glyphs --enable-check-lisp-type --with-x-toolkit=3Dlucid --with-file-notification=3Dyes --with-x' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XAW3D XDBE XIM XPM LUCID ZLIB Important settings: value of $LANG: en_IE.UTF-8 value of $XMODIFIERS: @im=3Dibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo x-toolkit x multi-tty make-network-process emacs) --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=compilation.log Content-Description: Compilation log -*- mode: compilation; default-directory: "~/.local/src/emacs-28/" -*- Compilation started at Thu Oct 7 10:48:17 make test/emacs-tests make -C test emacs-tests make[1]: Entering directory '/home/blc/.local/src/emacs-28/test' make[2]: Entering directory '/home/blc/.local/src/emacs-28/test' GEN src/emacs-tests.log Running 7 tests (2021-10-07 10:48:19+0100, selector `(not (or (tag :unstable) (tag :nativecomp)))') Test emacs-tests/bwrap/allows-stdout backtrace: signal(ert-test-failed (((should (eql status 0)) :form (eql 159 0) : ert-fail(((should (eql status 0)) :form (eql 159 0) :value nil)) (if (unwind-protect (setq value-166 (apply fn-164 args-165)) (setq f (let (form-description-168) (if (unwind-protect (setq value-166 (app (let ((value-166 'ert-form-evaluation-aborted-167)) (let (form-descr (let* ((fn-164 #'eql) (args-165 (condition-case err (let ((signal-ho (let ((ert--infos (cons (cons "Info: " (emacs-tests--seccomp-debug s (let* ((command (concat (mapconcat #'shell-quote-argument (list (fil (progn (let* ((command (concat (mapconcat #'shell-quote-argument (li (unwind-protect (progn (let* ((command (concat (mapconcat #'shell-qu (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current (let ((bash (executable-find "bash")) (bwrap (executable-find "bwrap (let ((lexical-binding t)) (let ((bash (executable-find "bash")) (bw (closure (t) nil (let ((lexical-binding t)) (let ((bash (executable- ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test ert-run-test(#s(ert-test :name emacs-tests/bwrap/allows-stdout :docu ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m ert-run-tests((not (or (tag :unstable) (tag :nativecomp))) #f(compil ert-run-tests-batch((not (or (tag :unstable) (tag :nativecomp)))) ert-run-tests-batch-and-exit((not (or (tag :unstable) (tag :nativeco eval((ert-run-tests-batch-and-exit '(not (or (tag :unstable) (tag :n command-line-1(("-L" ":." "-L" "./../../elpa/packages/url-http-ntlm/ command-line() normal-top-level() Test emacs-tests/bwrap/allows-stdout condition: Info: Process output: Potentially useful coredump information: PID: 2156 (emacs) UID: 1000 (blc) GID: 1000 (blc) Signal: 31 (SYS) Timestamp: Thu 2021-10-07 10:48:19 IST (437ms ago) Command Line: /home/blc/.local/src/emacs-28/src/emacs --quick --batch --eval=(message "Hi") Executable: /home/blc/.local/src/emacs-28/src/emacs Control Group: /user.slice/user-1000.slice/session-2.scope Unit: session-2.scope Slice: user-1000.slice Session: 2 Owner UID: 1000 (blc) Boot ID: 4195cfec188140b5908f255dd92399d5 Machine ID: 1eaf00d04e87431584dd7dfc9cf6503c Hostname: tia Storage: /var/lib/systemd/coredump/core.emacs.1000.4195cfec188140b5908f255dd92399d5.2156.1633600099000000.zst Message: Process 2156 (emacs) of user 1000 dumped core. Stack trace of thread 2156: #0 0x00007ff4f975629d __GI___prctl (libc.so.6 + 0xfe29d) #1 0x00007ff4f897fd53 cap_get_bound (libcap.so.2 + 0x3d53) #2 0x00007ff4f897f40e n/a (libcap.so.2 + 0x340e) #3 0x00007ff4fba3b10e call_init (ld-linux-x86-64.so.2 + 0x1010e) #4 0x00007ff4fba3b1f0 call_init (ld-linux-x86-64.so.2 + 0x101f0) #5 0x00007ff4fba2c08a _dl_start_user (ld-linux-x86-64.so.2 + 0x108a) (ert-test-failed ((should (eql status 0)) :form (eql 159 0) :value nil)) FAILED 1/7 emacs-tests/bwrap/allows-stdout (0.302527 sec) passed 2/7 emacs-tests/seccomp/absent-file (0.028454 sec) passed 3/7 emacs-tests/seccomp/allows-stdout (0.095900 sec) passed 4/7 emacs-tests/seccomp/empty-file (0.013831 sec) passed 5/7 emacs-tests/seccomp/file-too-large (0.258692 sec) passed 6/7 emacs-tests/seccomp/forbids-subprocess (0.293651 sec) passed 7/7 emacs-tests/seccomp/invalid-file-size (0.014142 sec) Ran 7 tests, 6 results as expected, 1 unexpected (2021-10-07 10:48:21+0100, 1.921665 sec) 1 unexpected results: FAILED emacs-tests/bwrap/allows-stdout make[2]: *** [Makefile:182: src/emacs-tests.log] Error 1 make[2]: Leaving directory '/home/blc/.local/src/emacs-28/test' make[1]: *** [Makefile:248: src/emacs-tests] Error 2 make[1]: Leaving directory '/home/blc/.local/src/emacs-28/test' make: *** [Makefile:997: test/emacs-tests] Error 2 Compilation exited abnormally with code 2 at Thu Oct 7 10:48:21 --=-=-=--