Subject: bug#47106: Bubblewrap hates Guix containers 😞

From: Leo Prikler <[email-masked]>
Date: Mon, 15 Mar 2021 11:14:11 +0100

Am Montag, den 15.03.2021, 10:52 +0100 schrieb Ludovic Courtès:
> Hi Leo,
> 
> Leo Prikler <[email-masked]> skribis:
> 
> > > /sys is already mounted inside ‘guix environment -C’ containers
> > > so I
> > > don’t see what difference it would make.
> > I think I've been told this several times, but I don't believe
> > it.  Not
> > adding all these expose=/sys lines triggers the "warnings" in the
> > original post.  (Okay, perhaps one of /sys/dev and /sys/devices is
> > superfluous, I would need to check.)
> 
> It would be great if you could pinpoint which of these --
> expose=/sys/xyz
> makes a difference.  From there we could compare the output of ‘find
> /sys/xyz’ inside and outside the container, without --expose.
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

After exposing all of the above, I get
Unable to init server: Could not connect: Connection refused

(WebKitWebProcess:2): Gtk-WARNING **: 10:09:01.497: cannot open
display: :1
Using --share instead of --expose for the final set does not seem to
change anything.

For /sys/block, the find inside the container is empty before exposing
it and non-empty on the host.  I assume the same holds for the others.

Regards,
Leo