pipewire reports a failure to read /proc/<pid>/root every time for gnome-shell process
A code comment in https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/src/modules/module-access.c#L89 check_flatpak()
states:
sprintf(root_path, "/proc/%u/root", pid);
root_fd = openat (AT_FDCWD, root_path, O_RDONLY | O_NONBLOCK | O_DIRECTORY | O_CLOEXEC | O_NOCTTY);
if (root_fd == -1) {
/* Not able to open the root dir shouldn't happen. Probably the app died and
* we're failing due to /proc/$pid not existing. In that case fail instead
* of treating this as privileged. */
res = -errno;
pw_log_error("failed to open \"%s\": %m", root_path);
return res;
}
However, this is an error that always happen with gnome-shell
on Fedora 33:
joulu 01 12:35:44 pinega.vda.li systemd[1873]: Started Multimedia Service.
joulu 01 12:35:44 pinega.vda.li pipewire[921954]: [E][002049393.499975][core.c:71 core_event_error()] core 0x5642b5587ae0: proxy 0x5642b55d48f0 id:4: bound:-1 seq:4 res:-2 (No such file or directory) msg:"can't create device: No such file or directory"
joulu 01 12:35:44 pinega.vda.li pipewire[921954]: [E][002049393.499991][media-session.c:1971 core_error()] error id:4 seq:4 res:-2 (No such file or directory): can't create device: No such file or directory
joulu 01 12:38:36 pinega.vda.li pipewire[921946]: [E][002049564.788106][module-access.c:102 check_flatpak()] failed to open "/proc/1995/root": Permission denied
joulu 01 12:38:36 pinega.vda.li pipewire[921946]: [W][002049564.788123][module-access.c:195 context_check_access()] access 0x555738febde0: client 0x55573949c0b0 sandbox check failed: Permission denied
joulu 01 12:38:36 pinega.vda.li pipewire[921946]: [W][002049564.804620][connection.c:323 prepare_packet()] old version detected
joulu 01 12:38:36 pinega.vda.li pipewire[921946]: [W][002049564.805069][connection.c:323 prepare_packet()] old version detected
joulu 01 12:39:29 pinega.vda.li pipewire[921946]: [W][002049617.532919][impl-node.c:349 suspend_node()] node 0x555739510440: error unset format input: Input/output error
joulu 01 12:46:24 pinega.vda.li pipewire[921946]: [E][002050032.564549][module-access.c:102 check_flatpak()] failed to open "/proc/1995/root": Permission denied
joulu 01 12:46:24 pinega.vda.li pipewire[921946]: [W][002050032.564563][module-access.c:195 context_check_access()] access 0x555738febde0: client 0x55573951e9d0 sandbox check failed: Permission denied
Process 1995 is gnome-shell
, running under normal user and the same user cannot read the symlink /proc/$pid/root
for this process:
$ ps axu|grep 1995
abokovoy 1995 3.2 1.6 6506892 521864 ? Ssl marras07 1107:16 /usr/bin/gnome-shell
$ stat -L /proc/1995/root
stat: cannot statx '/proc/1995/root': Permission denied
$ stat /proc/1995/root
File: /proc/1995/rootstat: cannot read symbolic link '/proc/1995/root': Permission denied
Size: 0 Blocks: 0 IO Block: 1024 symbolic link
Device: 17h/23d Inode: 46339561 Links: 1
Access: (0777/lrwxrwxrwx) Uid: ( 1000/abokovoy) Gid: ( 1000/abokovoy)
Context: unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
Access: 2020-12-01 12:51:07.423546581 +0200
Modify: 2020-12-01 12:50:51.984250256 +0200
Change: 2020-12-01 12:50:51.984250256 +0200
Birth: -
I think the error message here should really be downgraded to a warning. Since the process in question (gnome-shell
) is not a flatpak process, running into the error here will happen every time GNOME applications want to request screensharing. But this error message is misleading in the context of the check.