Bug 2412232
| Summary: | Glycin inside a container: "bwrap: Can't mount devpts on /newroot/dev/pts: Permission denied" | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Enrico Scholz <rh-bugzilla> |
| Component: | gtk3 | Assignee: | GNOME SIG Unassigned <gnome-sig> |
| Status: | NEW --- | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 43 | CC: | benson_muite, dan.cermak, dueno, gnome-sig, gordon.messmer, marcandre.lureau, mavit, mclasen, msekleta, phracek, suraj.ghimire7 |
| Target Milestone: | --- | Keywords: | Regression |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | --- | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | --- | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Enrico Scholz
2025-11-04 10:48:43 UTC
This works for me, so it must be somehow related to the set-up of your system. The error message suggests that this probably isn't specific to Emacs. Do other GTK apps have the same problem? For example, can you open an SVG image using loupe? I can basically reproduce the issue with | $ podman run -e DISPLAY --security-opt=label=type:container_runtime_t --rm -v /tmp/.X11-unix:/tmp/.X11-unix -it fedora:43 | | # dnf install -y emacs-gtk+x11 | # emacs-gtk+x11 | # emacs-gtk+x11 -Q Host system is Fedora 42 with awesome window manager (pure X11). It shows different kinds of misbehavior which depend on the use of '-Q' --- bash-5.3# emacs-gtk+x11 -Q X protocol error: BadAccess (attempt to access private resource denied) on protocol request 130 Serial no: 1094 Failing resource ID (if any): 0x700014e Minor code: 1 This is a bug! Please report this to bug-gnu-emacs! When compiled with GTK, Emacs cannot recover from X disconnects. This is a GTK bug: https://gitlab.gnome.org/GNOME/gtk/issues/221 For details, see etc/PROBLEMS. Fatal error 6: Aborted Backtrace: emacs-gtk+x11(+0x18edf5) [0x557fe50cbdf5] emacs-gtk+x11(+0x141be) [0x557fe4f511be] emacs-gtk+x11(+0x152e4) [0x557fe4f522e4] emacs-gtk+x11(+0x133f70) [0x557fe5070f70] emacs-gtk+x11(+0x1342e7) [0x557fe50712e7] emacs-gtk+x11(+0x13458b) [0x557fe507158b] /lib64/libX11.so.6(_XError+0x13c) [0x7f0f1211238c] /lib64/libX11.so.6(+0x334b0) [0x7f0f121124b0] /lib64/libX11.so.6(+0x3356d) [0x7f0f1211256d] /lib64/libX11.so.6(_XEventsQueued+0x65) [0x7f0f121125f5] /lib64/libX11.so.6(XPending+0x67) [0x7f0f12102fd7] /lib64/libgdk-3.so.0(+0x6ea48) [0x7f0f12974a48] /lib64/libgdk-3.so.0(gdk_display_get_event+0x9b) [0x7f0f1291521b] /lib64/libgdk-3.so.0(+0x6f3ce) [0x7f0f129753ce] /lib64/libglib-2.0.so.0(+0x412a3) [0x7f0f122902a3] /lib64/libglib-2.0.so.0(+0x4a1f8) [0x7f0f122991f8] /lib64/libglib-2.0.so.0(g_main_context_iteration+0x33) [0x7f0f122993a3] /lib64/libgtk-3.so.0(gtk_main_iteration+0x19) [0x7f0f12b85e79] emacs-gtk+x11(+0x123da2) [0x557fe5060da2] ---- Without -Q, the window opens but reports then "Memory exhausted--use C-x s then exit and restart Emacs". Something like ---- bash-5.3# emacs-gtk+x11 (emacs-gtk_x11:10548): Gtk-CRITICAL **: 18:27:49.905: gtk_distribute_natural_allocation: assertion 'extra_space >= 0' failed (emacs-gtk_x11:10548): Gtk-WARNING **: 18:27:49.906: Negative content width -6 (allocation 1, extents 4x3) while allocating gadget (node toolbar, owner GtkToolbar) ---- appears in this case. There is another strange thing: in workspaces which are configured to run applications maximized, emacs seems to startup correctly. Creating a "fedora:42" container does not show the problems. > For example, can you open an SVG image using loupe?
# loupe
MESA: error: Failed to query drm device.
libEGL warning: egl: failed to create dri2 screen
but `gtk3-demo` seems to work fine.
1. `bwrap` is a separate problem; it happens always with `-Q` in a container 2. emacs startups problems is not caused by the version of gtk3 itself but by the build. gtk3-3.24.49-2 from koji shows the problem with the f43 builds but not the f42 ones; e.g. - OK: https://kojipkgs.fedoraproject.org//packages/gtk3/3.24.49/2.fc42/x86_64/gtk3-3.24.49-2.fc42.x86_64.rpm (https://koji.fedoraproject.org/koji/buildinfo?buildID=2686747) - BAD: https://kojipkgs.fedoraproject.org//packages/gtk3/3.24.49/2.fc43/x86_64/gtk3-3.24.49-2.fc43.x86_64.rpm (https://koji.fedoraproject.org/koji/buildinfo?buildID=2686745) Creating a container from ---- FROM fedora:43 RUN \ dnf install -y \ emacs-gtk+x11 \ openssh-server \ procps-ng \ psmisc \ xorg-x11-xauth \ && \ dnf clean all RUN \ /usr/libexec/openssh/sshd-keygen ed25519 && \ /usr/libexec/openssh/sshd-keygen rsa RUN \ useradd test && \ echo 1234 | passwd -s test ENTRYPOINT ["/usr/sbin/sshd", "-D"] --- with - podman build . --tag x-test - podman run -p 22001:22 --name x-test --rm x-test - ssh -t -X -p 22001 test@localhost emacs --> small window appears; beep-on-error triggers shows different behaviors between the f42 and f43 build of gtk3 There is also a difference between - ssh -t -X -p 22001 test@localhost emacs --> completely broken - ssh -X -p 22001 test@localhost emacs --> minimized window but basically ok Using your example container:
$ ssh -X -p 22001 -o PubkeyAuthentication=no test@localhost env G_MESSAGES_DEBUG=all gtk3-demo
test@localhost's password:
(gtk3-demo:708): GLib-GIO-DEBUG: 14:32:53.313: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ‘gio-vfs’
Gtk-Message: 14:32:53.346: Failed to load module "pk-gtk-module"
Gtk-Message: 14:32:53.349: Failed to load module "pk-gtk-module"
(gtk3-demo:708): GLib-DEBUG: 14:32:53.349: unsetenv() is not thread-safe and should not be used after threads are created
2025-11-05T14:32:53.401444Z DEBUG glycin::gobject: Initialized logging
2025-11-05T14:32:53.403740Z DEBUG glycin::sandbox: Testing bwrap availability with: "bwrap" "--unshare-all" "--die-with-parent" "--chdir" "/" "--ro-bind" "/usr" "/usr" "--dev" "/dev" "--ro-bind-try" "/etc/ld.so.cache" "/etc/ld.so.cache" "--ro-bind-try" "/nix/store" "/nix/store" "--tmpfs" "/tmp-home" "--tmpfs" "/tmp-run" "--clearenv" "--setenv" "HOME" "/tmp-home" "--setenv" "XDG_RUNTIME_DIR" "/tmp-run" "--symlink" "/usr/lib64" "/lib64" "--symlink" "/usr/lib" "/lib" "--seccomp" "12" "/usr/bin/true"
2025-11-05T14:32:53.412319Z DEBUG glycin::sandbox: bwrap availability test returned: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "Setting process memory limit\nbwrap: Can't mount devpts on /newroot/dev/pts: Permission denied\n" } (Signal: None, Code: Some(1))
2025-11-05T14:32:53.412365Z DEBUG glycin::sandbox: bwrap sandboxing available: true
2025-11-05T14:32:53.412381Z DEBUG glycin::pool: No existing loader/editor in pool. Spawning new one.
2025-11-05T14:32:53.413099Z DEBUG glycin::sandbox: Couldn't canonicalize path "/home/test/.cache/fontconfig": No such file or directory (os error 2)
2025-11-05T14:32:53.413126Z DEBUG glycin::sandbox: Couldn't canonicalize path "/home/test/.fontconfig": No such file or directory (os error 2)
2025-11-05T14:32:53.413138Z DEBUG glycin::sandbox: Couldn't canonicalize path "/home/test/.fonts": No such file or directory (os error 2)
2025-11-05T14:32:53.413152Z DEBUG glycin::sandbox: Couldn't canonicalize path "/home/test/.local/share/fonts": No such file or directory (os error 2)
2025-11-05T14:32:53.413645Z DEBUG glycin::dbus: Spawning loader/editor:
"bwrap" "--unshare-all" "--die-with-parent" "--chdir" "/" "--ro-bind" "/usr" "/usr" "--dev" "/dev" "--ro-bind-try" "/etc/ld.so.cache" "/etc/ld.so.cache" "--ro-bind-try" "/nix/store" "/nix/store" "--tmpfs" "/tmp-home" "--tmpfs" "/tmp-run" "--clearenv" "--setenv" "HOME" "/tmp-home" "--setenv" "XDG_RUNTIME_DIR" "/tmp-run" "--symlink" "/usr/lib64" "/lib64" "--symlink" "/usr/lib" "/lib" "--ro-bind-try" "/etc/fonts/conf.d" "/etc/fonts/conf.d" "--ro-bind-try" "/etc/fonts/fonts.conf" "/etc/fonts/fonts.conf" "--ro-bind-try" "/usr/lib/fontconfig/cache" "/usr/lib/fontconfig/cache" "--bind-try" "/home/test/.cache/glycin/usr/libexec/glycin-loaders/2+/glycin-svg" "/home/test/.cache/glycin/usr/libexec/glycin-loaders/2+/glycin-svg" "--setenv" "XDG_CACHE_HOME" "/home/test/.cache/glycin/usr/libexec/glycin-loaders/2+/glycin-svg" "--seccomp" "13" "/usr/libexec/glycin-loaders/2+/glycin-svg" "--dbus-fd" "12"
2025-11-05T14:32:53.416400Z DEBUG glycin::dbus: Loader stderr: Setting process memory limit
2025-11-05T14:32:53.421621Z DEBUG glycin::dbus: Loader stderr: bwrap: Can't mount devpts on /newroot/dev/pts: Permission denied
2025-11-05T14:32:53.422135Z DEBUG glycin::dbus: stderr disconnected without error
2025-11-05T14:32:53.422167Z DEBUG glycin::dbus: stdout disconnected without error
2025-11-05T14:32:53.422191Z DEBUG glycin::dbus: Process exited: Some(Some(1)) Ok(ExitStatus(unix_wait_status(256)))
(gtk3-demo:708): Gtk-WARNING **: 14:32:53.422: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
2025-11-05T14:32:53.424034Z DEBUG glycin::pool: No existing loader/editor in pool. Spawning new one.
2025-11-05T14:32:53.424476Z DEBUG glycin::sandbox: Couldn't canonicalize path "/home/test/.cache/fontconfig": No such file or directory (os error 2)
2025-11-05T14:32:53.424500Z DEBUG glycin::sandbox: Couldn't canonicalize path "/home/test/.fontconfig": No such file or directory (os error 2)
2025-11-05T14:32:53.424514Z DEBUG glycin::sandbox: Couldn't canonicalize path "/home/test/.fonts": No such file or directory (os error 2)
2025-11-05T14:32:53.424530Z DEBUG glycin::sandbox: Couldn't canonicalize path "/home/test/.local/share/fonts": No such file or directory (os error 2)
2025-11-05T14:32:53.424799Z DEBUG glycin::dbus: Spawning loader/editor:
"bwrap" "--unshare-all" "--die-with-parent" "--chdir" "/" "--ro-bind" "/usr" "/usr" "--dev" "/dev" "--ro-bind-try" "/etc/ld.so.cache" "/etc/ld.so.cache" "--ro-bind-try" "/nix/store" "/nix/store" "--tmpfs" "/tmp-home" "--tmpfs" "/tmp-run" "--clearenv" "--setenv" "HOME" "/tmp-home" "--setenv" "XDG_RUNTIME_DIR" "/tmp-run" "--symlink" "/usr/lib64" "/lib64" "--symlink" "/usr/lib" "/lib" "--ro-bind-try" "/etc/fonts/conf.d" "/etc/fonts/conf.d" "--ro-bind-try" "/etc/fonts/fonts.conf" "/etc/fonts/fonts.conf" "--ro-bind-try" "/usr/lib/fontconfig/cache" "/usr/lib/fontconfig/cache" "--bind-try" "/home/test/.cache/glycin/usr/libexec/glycin-loaders/2+/glycin-svg" "/home/test/.cache/glycin/usr/libexec/glycin-loaders/2+/glycin-svg" "--setenv" "XDG_CACHE_HOME" "/home/test/.cache/glycin/usr/libexec/glycin-loaders/2+/glycin-svg" "--seccomp" "13" "/usr/libexec/glycin-loaders/2+/glycin-svg" "--dbus-fd" "12"
2025-11-05T14:32:53.426464Z DEBUG glycin::dbus: Loader stderr: Setting process memory limit
2025-11-05T14:32:53.431150Z DEBUG glycin::dbus: Loader stderr: bwrap: Can't mount devpts on /newroot/dev/pts: Permission denied
2025-11-05T14:32:53.431810Z DEBUG glycin::dbus: stderr disconnected without error
2025-11-05T14:32:53.431834Z DEBUG glycin::dbus: stdout disconnected without error
2025-11-05T14:32:53.431828Z DEBUG glycin::dbus: Process exited: Some(Some(1)) Ok(ExitStatus(unix_wait_status(256)))
Bail out! Gtk:ERROR:../gtk/gtkiconhelper.c:495:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Adwaita/scalable/status/image-missing.svg: Loader process exited early with status '1'Command: "bwrap" "--unshare-all" "--die-with-parent" "--chdir" "/" "--ro-bind" "/usr" "/usr" "--dev" "/dev" "--ro-bind-try" "/etc/ld.so.cache" "/etc/ld.so.cache" "--ro-bind-try" "/nix/store" "/nix/store" "--tmpfs" "/tmp-home" "--tmpfs" "/tmp-run" "--clearenv" "--setenv" "HOME" "/tmp-home" "--setenv" "XDG_RUNTIME_DIR" "/tmp-run" "--symlink" "/usr/lib64" "/lib64" "--symlink" "/usr/lib" "/lib" "--ro-bind-try" "/etc/fonts/conf.d" "/etc/fonts/conf.d" "--ro-bind-try" "/etc/fonts/fonts.conf" "/etc/fonts/fonts.conf" "--ro-bind-try" "/usr/lib/fontconfig/cache" "/usr/lib/fontconfig/cache" "--bind-try" "/home/test/.cache/glycin/usr/libexec/glycin-loaders/2+/glycin-svg" "/home/test/.cache/glycin/usr/libexec/glycin-loaders/2+/glycin-svg" "--setenv" "XDG_CACHE_HOME" "/home/test/.cache/glycin/usr/libexec/glycin-loaders/2+/glycin-svg" "--seccomp" "13" "/usr/libexec/glycin-loaders/2+/glycin-svg" "--dbus-fd" "12" (gdk-pixbuf-error-quark, 0)
**
Gtk:ERROR:../gtk/gtkiconhelper.c:495:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Adwaita/scalable/status/image-missing.svg: Loader process exited early with status '1'Command:
"bwrap" "--unshare-all" "--die-with-parent" "--chdir" "/" "--ro-bind" "/usr" "/usr" "--dev" "/dev" "--ro-bind-try" "/etc/ld.so.cache" "/etc/ld.so.cache" "--ro-bind-try" "/nix/store" "/nix/store" "--tmpfs" "/tmp-home" "--tmpfs" "/tmp-run" "--clearenv" "--setenv" "HOME" "/tmp-home" "--setenv" "XDG_RUNTIME_DIR" "/tmp-run" "--symlink" "/usr/lib64" "/lib64" "--symlink" "/usr/lib" "/lib" "--ro-bind-try" "/etc/fonts/conf.d" "/etc/fonts/conf.d" "--ro-bind-try" "/etc/fonts/fonts.conf" "/etc/fonts/fonts.conf" "--ro-bind-try" "/usr/lib/fontconfig/cache" "/usr/lib/fontconfig/cache" "--bind-try" "/home/test/.cache/glycin/usr/libexec/glycin-loaders/2+/glycin-svg" "/home/test/.cache/glycin/usr/libexec/glycin-loaders/2+/glycin-svg" "--setenv" "XDG_CACHE_HOME" "/home/test/.cache/glycin/usr/libexec/glycin-loaders/2+/glycin-svg" "--seccomp" "13" "/usr/libexec/glycin-loaders/2+/glycin-svg" "--dbus-fd" "12" (gdk-pixbuf-error-quark, 0)
SELinux Alert Browser says:
SELinux is preventing bwrap from mount access on the filesystem /dev/pts.
***** Plugin catchall (100. confidence) suggests **************************
If you believe that bwrap should be allowed mount access on the pts filesystem by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'bwrap' --raw | audit2allow -M my-bwrap
# semodule -X 300 -i my-bwrap.pp
Additional Information:
Source Context system_u:system_r:container_t:s0:c532,c615
Target Context system_u:object_r:devpts_t:s0
Target Objects /dev/pts [ filesystem ]
Source bwrap
Source Path bwrap
Port <Unknown>
Host froglet.home.mavit.org.uk
Source RPM Packages
Target RPM Packages
SELinux Policy RPM selinux-policy-targeted-42.13-1.fc42.noarch
Local Policy RPM selinux-policy-targeted-42.13-1.fc42.noarch
Selinux Enabled True
Policy Type targeted
Enforcing Mode Enforcing
Host Name froglet.home.mavit.org.uk
Platform Linux froglet.home.mavit.org.uk
6.17.4-200.fc42.x86_64 #1 SMP PREEMPT_DYNAMIC Sun
Oct 19 18:47:49 UTC 2025 x86_64
Alert Count 37
First Seen 2025-11-05 14:05:19 GMT
Last Seen 2025-11-05 14:32:53 GMT
Local ID 07c69ef8-073d-4ca2-b301-e7a7ef23cd34
Raw Audit Messages
type=AVC msg=audit(1762353173.430:476): avc: denied { mount } for pid=17059 comm="bwrap" name="/" dev="devpts" ino=1 scontext=system_u:system_r:container_t:s0:c532,c615 tcontext=system_u:object_r:devpts_t:s0 tclass=filesystem permissive=0
Hash: bwrap,container_t,devpts_t,filesystem,mount
I suspect you are doing something in your Emacs init file that works around this issue, which is why you don't see it if you leave off -Q, but you are then encountering another bug. Let's keep this bug focused on the bwrap issue.
> I suspect you are doing something in your Emacs init file that works around this issue, which is why you don't see it if you leave off -Q, but you are then encountering another bug. Let's keep this bug focused on the bwrap issue.
I would suggest the opposite; the `bwrap` thing is an SELinux issue which can be workaround.
But emacs is completely dysfunctional with the F43 gtk3 package which is much more critical.
opened 2412716 for the binary package issue. This message is a reminder that Fedora Linux 43 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 43 on 2026-12-02. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '43'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 43 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed. |