GNU bug report logs

#47106 Bubblewrap hates Guix containers 😞

PackageSource(s)Maintainer(s)
guix PTS Buildd Popcon
Full log

Message #44 received at 47106@debbugs.gnu.org (full text, mbox, reply):

Received: (at 47106) by debbugs.gnu.org; 15 Mar 2021 13:29:30 +0000
From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 15 09:29:30 2021
Received: from localhost ([127.0.0.1]:35082 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1lLnHm-0006s2-7n
	for submit@debbugs.gnu.org; Mon, 15 Mar 2021 09:29:30 -0400
Received: from eggs.gnu.org ([209.51.188.92]:48302)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@gnu.org>) id 1lLnHj-0006rl-Jl
 for 47106@debbugs.gnu.org; Mon, 15 Mar 2021 09:29:28 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40363)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@gnu.org>)
 id 1lLnHc-0004mR-N9; Mon, 15 Mar 2021 09:29:20 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=45590 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@gnu.org>)
 id 1lLnHb-0007Pr-Nq; Mon, 15 Mar 2021 09:29:20 -0400
From: Ludovic Courtès <ludo@gnu.org>
To: Leo Prikler <leo.prikler@student.tugraz.at>
Subject: Re: bug#47106: Bubblewrap hates Guix containers
 😞
References: <fbb3401a61ae78f092b33b7a36428f8520a7a6bd.camel@student.tugraz.at>
 <87r1kjpbvx.fsf@gnu.org>
 <2922127e61435e64f95d3d398ef6932a02336188.camel@student.tugraz.at>
 <20210313122718.GA11708@LionPure>
 <fa11fb1fb6dfb6e2c048d4fe8dec005e3b2b114a.camel@student.tugraz.at>
 <20210313170704.GA3712@LionPure>
 <a4efcc5c7928de5d89596500803dee510d85b7c0.camel@student.tugraz.at>
 <20210314174539.GA10548@LionPure>
 <d0638eba7e63c71edd4267c1675e0ea7f5b7b4ae.camel@student.tugraz.at>
 <87sg4xlbn0.fsf@gnu.org>
 <6c6b39f495962ec906255cac212b66962d549eab.camel@student.tugraz.at>
 <87pn00iw1f.fsf@gnu.org>
 <b7e184f6a0ceece097f9fc3f25cb47a0ccdf6d34.camel@student.tugraz.at>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 25 Ventôse an 229 de la Révolution
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Mon, 15 Mar 2021 14:29:17 +0100
In-Reply-To: <b7e184f6a0ceece097f9fc3f25cb47a0ccdf6d34.camel@student.tugraz.at>
 (Leo Prikler's message of "Mon, 15 Mar 2021 11:14:11 +0100")
Message-ID: <87sg4wh7f6.fsf@gnu.org>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 47106
Cc: 47106@debbugs.gnu.org, Bengt Richter <bokr@bokr.com>
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit@debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request@debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-Spam-Score: -1.7 (-)
Hi,

Leo Prikler <leo.prikler@student.tugraz.at> skribis:

> Okay, so here's my basic workflow: Starting with an empty set of --
> expose:
> bwrap: Can't find source path /sys/block: No such file or directory
> repeated a few times along with warnings, that the web process crashed
> until finally Epiphany itself crashes. 
> I add /sys/block, and Epiphany miraculously doesn't crash, but bwrap
> still complains and the web processes still crash, so we march on. 
> I'll abbreviate it a little and only show the error messages.
> bwrap: Can't find source path /sys/bus: No such file or directory
> bwrap: Can't find source path /sys/class: No such file or directory 
> bwrap: Can't find source path /sys/dev: No such file or directory 
> bwrap: Can't find source path /sys/devices: No such file or directory

OK.  Additional data points from my Guix System laptop:

--8<---------------cut here---------------start------------->8---
$ guix environment -C --ad-hoc findutils -- find /sys |wc -l
37575
$ find /sys | wc -l
find: ‘/sys/kernel/debug’: Mankas permeso
38026
$ guix environment -C --ad-hoc findutils -- find /sys/block |wc -l
27
$ find /sys/block | wc -l
27
--8<---------------cut here---------------end--------------->8---

The offending Bubblewrap code is:

--8<---------------cut here---------------start------------->8---
static void
resolve_symlinks_in_ops (void)
{
  SetupOp *op;

  for (op = ops; op != NULL; op = op->next)
    {
      const char *old_source;

      switch (op->type)
        {
        case SETUP_RO_BIND_MOUNT:
        case SETUP_DEV_BIND_MOUNT:
        case SETUP_BIND_MOUNT:
          old_source = op->source;
          op->source = realpath (old_source, NULL);
          if (op->source == NULL)
            {
              if (op->flags & ALLOW_NOTEXIST && errno == ENOENT)
                op->source = old_source;
              else
                die_with_error("Can't find source path %s", old_source);
            }
          break;
        default:
          break;
        }
    }
}
--8<---------------cut here---------------end--------------->8---

I wonder how ‘realpath’ can fail here.  In fact, it Works For Me:

--8<---------------cut here---------------start------------->8---
$ cat realpath.scm
(use-modules (system foreign))

(define realpath
  (let ((proc (pointer->procedure '* (dynamic-func "realpath" (dynamic-link))
                                  '(* *))))
    (lambda (path)
      (let ((result (proc (string->pointer path) %null-pointer)))
        (and (not (null-pointer? result))
             (pointer->string result))))))

(pk 'realpath-> (realpath "/sys/block"))
$ guix environment -C --ad-hoc guile -- guile -s realpath.scm
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /home/ludo/src/guix-debugging/realpath.scm
;;; compiled /home/ludo/.cache/guile/ccache/3.0-LE-8-4.4/home/ludo/src/guix-debugging/realpath.scm.go

;;; (realpath-> "/sys/block")
--8<---------------cut here---------------end--------------->8---

So I presume bwrap does something else before it reaches that warning.
We should really strace it.

Thanks,
Ludo’.




Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Sun Dec 22 09:32:25 2024; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.