waveform80 / imager-snap

Source for the snap packaging of the Raspberry Pi Imager utility
https://snapstore.io/rpi-imager
1 stars 1 forks source link

Cannot open storage device '/dev/mmcblk0' #3

Open SilverTux opened 2 years ago

SilverTux commented 2 years ago

I've faced the issue in subject using rpi-imager from snap.

My versions: Ubuntu: 22.10 (64 bit) uname: 5.13.0-39-generic #44-Ubuntu SMP Thu Mar 24 15:35:05 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux rpi-imager:

snap-id:      MErZVJWKGDh2njdopbdNDkko2RU5cxlj
tracking:     latest/stable
refresh-date: today at 14:31 CEST
channels:
  latest/stable:    1.7.2 2022-06-07 (271) 215MB -
  latest/candidate: ↑                            
  latest/beta:      1.7.2 2022-06-07 (271) 215MB -
  latest/edge:      1.7.2 2022-06-07 (271) 215MB -
installed:          1.7.2            (271) 215MB -

snap:

snap    2.56
snapd   2.56
series  16
ubuntu  21.10
kernel  5.13.0-39-generic

When I run it from command line I'm getting these log messages:

(rpi-imager:45929): dbind-WARNING **: 14:40:49.097: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-rp3V9bHZ6U: No such file or directory
qrc:/main.qml:281:21: QML Rectangle: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
propsReply "An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.214\" (uid=1000 pid=45929 comm=\"/snap/rpi-imager/271/usr/local/bin/rpi-imager \" label=\"snap.rpi-imager.rpi-imager (enforce)\") interface=\"org.freedesktop.DBus.Properties\" member=\"GetAll\" error name=\"(unset)\" requested_reply=\"0\" destination=\"org.freedesktop.NetworkManager\" (uid=0 pid=1285 comm=\"/usr/sbin/NetworkManager --no-daemon \" label=\"unconfined\")"
nmReply "An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.214\" (uid=1000 pid=45929 comm=\"/snap/rpi-imager/271/usr/local/bin/rpi-imager \" label=\"snap.rpi-imager.rpi-imager (enforce)\") interface=\"org.freedesktop.NetworkManager\" member=\"GetDevices\" error name=\"(unset)\" requested_reply=\"0\" destination=\"org.freedesktop.NetworkManager\" (uid=0 pid=1285 comm=\"/usr/sbin/NetworkManager --no-daemon \" label=\"unconfined\")"
"Object path cannot be empty"
QObject::setParent: Cannot set parent, new parent is in a different thread
Available disk space for caching: 17 GB
Telemetry done. cURL status code = 0 info sent = "url=https%3A%2F%2Fdownloads.raspberrypi.org%2Fraspios_lite_arm64%2Fimages%2Fraspios_lite_arm64-2022-04-07%2F2022-04-04-raspios-bullseye-arm64-lite.img.xz&os=Raspberry%20Pi%20OS%20%28other%29&image=Raspberry%20Pi%20OS%20Lite%20%2864-bit%29&imagerVersion=1.7.2&imagerOsType=ubuntu-core&imagerOsVersion=20&imagerOsArch=x86_64&imagerLocale=en_US"

If I try it with sudo:

mkdir: cannot create directory '/run/user/0': Permission denied
No protocol specified
qt.qpa.xcb: could not connect to display :0
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Aborted

rpi-imager connections:

Interface              Plug                         Slot                            Notes
cifs-mount             rpi-imager:cifs-mount        -                               -
content[gtk-3-themes]  rpi-imager:gtk-3-themes      gtk-common-themes:gtk-3-themes  -
content[icon-themes]   rpi-imager:icon-themes       gtk-common-themes:icon-themes   -
content[sound-themes]  rpi-imager:sound-themes      gtk-common-themes:sound-themes  -
desktop                rpi-imager:desktop           :desktop                        -
desktop-legacy         rpi-imager:desktop-legacy    :desktop-legacy                 -
gsettings              rpi-imager:gsettings         :gsettings                      -
hardware-observe       rpi-imager:hardware-observe  :hardware-observe               -
home                   rpi-imager:home              :home                           -
mount-observe          rpi-imager:mount-observe     :mount-observe                  -
network                rpi-imager:network           :network                        -
network-control        rpi-imager:network-control   -                               -
network-manager        rpi-imager:network-manager   -                               -
opengl                 rpi-imager:opengl            :opengl                         -
removable-media        rpi-imager:removable-media   :removable-media                -
udisks2                rpi-imager:udisks2           :udisks2                        -
wayland                rpi-imager:wayland           :wayland                        -
x11                    rpi-imager:x11               :x11                            -

I've tried to run the

snap connect rpi-imager:cifs-mount

without luck. Do you have any idea why am I getting this error?

SilverTux commented 2 years ago

In the meantime I've tried the official deb file in a docker container using these: (maybe this helps someone who has the same problem)

Dockerfile:

FROM ubuntu:21.10

RUN apt-get update && \
    apt-get install -y \
        curl \
    && apt-get clean

RUN curl -LO https://downloads.raspberrypi.org/imager/imager_latest_amd64.deb

RUN apt-get install -y ./imager_latest_amd64.deb

ENTRYPOINT ["rpi-imager"]

rpi-imager.sh:

#!/usr/bin/env bash

set -euo pipefail

xhost +local:root
docker run -it --rm \  
    --privileged \
    --env="DISPLAY" \
    --env="QT_X11_NO_MITSHM=1" \
    --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
    rpi-imager
# Disallow X server connection
xhost -local:root

with the following commands:

docker build -t rpi-imager .
./rpi-imager.sh

and it worked, it could write the raspbian os lite to the microsd card.

waveform80 commented 2 years ago

My versions: Ubuntu: 22.10 (64 bit) uname: 5.13.0-39-generic #44-Ubuntu SMP Thu Mar 24 15:35:05 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Are you sure you don't mean "Ubuntu: 21.10"? 22.10 is kinetic, the current unreleased development version of Ubuntu -- which would have kernel version 5.15. I'm guessing the above is a typo, and that you're actually on impish (21.10) which would have kernel version 5.13 (given that the snap section below reports ubuntu 21.10).

I'll see if I can replicate the issue in an impish VM, but I'm afraid I don't have any PCs running impish at the moment.

Incidentally, you can just sudo apt install rpi-imager from jammy (22.04 LTS) onwards, although that's not going to help you on impish.

waveform80 commented 2 years ago

Incidentally, most of the console warnings can be ignored:

propsReply "An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.214\" (uid=1000 pid=45929 comm=\"/snap/rpi-imager/271/usr/local/bin/rpi-imager \" label=\"snap.rpi-imager.rpi-imager (enforce)\") interface=\"org.freedesktop.DBus.Properties\" member=\"GetAll\" error name=\"(unset)\" requested_reply=\"0\" destination=\"org.freedesktop.NetworkManager\" (uid=0 pid=1285 comm=\"/usr/sbin/NetworkManager --no-daemon \" label=\"unconfined\")"
nmReply "An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.214\" (uid=1000 pid=45929 comm=\"/snap```
/rpi-imager/271/usr/local/bin/rpi-imager \" label=\"snap.rpi-imager.rpi-imager (enforce)\") interface=\"org.freedesktop.NetworkManager\" member=\"GetDevices\" error name=\"(unset)\" requested_reply=\"0\" destination=\"org.freedesktop.NetworkManager\" (uid=0 pid=1285 comm=\"/usr/sbin/NetworkManager --no-daemon \" label=\"unconfined\")"
"Object path cannot be empty"

These are due to missing auto-connections to network manager; however, I'm not convinced they're required (rpi-imager doesn't need control over network interfaces, which is what those interfaces entail, it can just use them in their current state).

QObject::setParent: Cannot set parent, new parent is in a different thread
Available disk space for caching: 17 GB
Telemetry done. cURL status code = 0 info sent = "url=https%3A%2F%2Fdownloads.raspberrypi.org%2Fraspios_lite_arm64%2Fimages%2Fraspios_lite_arm64-2022-04-07%2F2022-04-04-raspios-bullseye-arm64-lite.img.xz&os=Raspberry%20Pi%20OS%20%28other%29&image=Raspberry%20Pi%20OS%20Lite%20%2864-bit%29&imagerVersion=1.7.2&imagerOsType=ubuntu-core&imagerOsVersion=20&imagerOsArch=x86_64&imagerLocale=en_US"

The above is just status output as rpi-imager downloads the requested image (which also demonstrates that even without the network manager connections, it can still happily download OS images).

If I try it with sudo:

sudo should make no major differences given that snaps run as root within their sandbox anyway (so the only difference is the wrapper-script will be running as root as well in this case, but that doesn't affect the confined application).

SilverTux commented 2 years ago

My versions: Ubuntu: 22.10 (64 bit) uname: 5.13.0-39-generic #44-Ubuntu SMP Thu Mar 24 15:35:05 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Are you sure you don't mean "Ubuntu: 21.10"? 22.10 is kinetic, the current unreleased development version of Ubuntu -- which would have kernel version 5.15. I'm guessing the above is a typo, and that you're actually on impish (21.10) which would have kernel version 5.13 (given that the snap section below reports ubuntu 21.10).

I'll see if I can replicate the issue in an impish VM, but I'm afraid I don't have any PCs running impish at the moment.

Incidentally, you can just sudo apt install rpi-imager from jammy (22.04 LTS) onwards, although that's not going to help you on impish.

You are right, I've written the wrong version number it is 21.10 (impish)

waveform80 commented 2 years ago

After a little fiddling around with getting USB devices to appear under a LXD VM, I managed to get this working. However, I did have to add some groups to my user and I'm not sure whether this is because the desktop images used with LXD are "minimal" (they're not the "standard" Ubuntu desktop images, but cut down ones specifically for VM use), or whether those groups are genuinely missing.

Can you check something on your Ubuntu impish system? Start up a terminal and run "groups". You should see something like:

$ groups
dave adm dialout cdrom sudo dip plugdev lpadmin lxd sambashare sbuild

But probably with a few less groups. On my VM instance, I only had "ubuntu adm video users", and I got the same "Cannot open storage device '/dev/...'" error as you were seeing. However, I'm not yet sure whether the lack of groups is a mistake in the VM, or whether there's some lacking permissions in polkit under impish, etc.

SilverTux commented 2 years ago

I have these groups:

istvan adm cdrom sudo dip plugdev netdev lpadmin sambashare docker
waveform80 commented 2 years ago

Hmmm, I found with the "sudo" group added to the group list on the VM, everything worked happily (it prompted to authenticate as the regular user after clicking "WRITE" but then, once authenticated, proceeded to write the card normally). Without the "sudo" group (which I'm guessing is just missing because it's a minimal VM image -- certainly that user is in the group list on all my "regular" desktop installs), it prompts for authentication as the administrator, but that can't work as the administrator has no password on Ubuntu so after the prompt is cancelled the "Cannot open storage device..." error appears.

When you click "WRITE" in rpi-imager, what exactly happens?

SilverTux commented 2 years ago

After clicking on "WRITE" a window appears which warns me:

All existing data on 'Internal SD card reader' will be erased.
Are you sure you want to continue?
No Yes

Clicking on Yes gives me the error window which prints the error in $subject So I don't have any authentication step in the process.

SilverTux commented 2 years ago

Is it possible that my user needs to be in the sudoers (/etc/sudoers)? My user is already in the sudo group as you saw in the output of the groups command, this is reflected in /etc/group file too, but my user is not in the sudoers file or sudoers.d directory.

waveform80 commented 2 years ago

Your user shouldn't need adding to /etc/sudoers; by default the following rule should be in there (amongst other stuff):

# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL

So, as a member of group "sudo" you should have that privilege anyway. The fact you get no authentication step when clicking "WRITE" is definitely strange, and suggests something quite unusual in your setup. I take it this is when running "rpi-imager" normally (no sudo, just running "rpi-imager" from the terminal)?

SilverTux commented 2 years ago

Yes this is the behaviour without using sudo before rpi-imager command. Are there any logs which I can check or some kind of debug flag which enables verbose logging maybe? I think at this point that maybe my snap handles something wrongly, or the rpi-imager doesn't see something crucial for writing the sd card, but I'm clueless how to debug it :(

waveform80 commented 2 years ago

After a bit of experimentation, the only way I can think that this is happening is that your polkit setup is missing some policies somewhere. As far as I can tell the chain of events should go something like this:

  1. start up rpi-imager, select image, select target card, hit write
  2. rpi-imager resolves the target device and requests that the udisks2 service "opens" the device (via this dbus method)
  3. udisksd asks polkit to determine if the user is authorized
  4. polkit checks its policies; I'm a little unclear here but I'm reasonably sure there's no overrides in place for the OpenDevice method under the default Ubuntu configuration so here we need to look at the udisks default policy which contains:
    <action id="org.freedesktop.udisks2.open-device">
    <description>Open a device</description>
    <message>Authentication is required to open a device</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
    </defaults>
    </action>
  5. This permits any "admin" user in any active or inactive session. What's an "admin" user? Let's look at the policies that usually ship with Ubuntu:
    root@ubuntu# grep -R AdminIdentities /etc/polkit-1/localauthority.conf.d/*
    /etc/polkit-1/localauthority.conf.d/50-localauthority.conf:AdminIdentities=unix-user:0
    /etc/polkit-1/localauthority.conf.d/51-ubuntu-admin.conf:AdminIdentities=unix-group:sudo;unix-group:admin
  6. Which translates as UID 0 (root), or any member of the local "sudo" or "admin" groups. The "admin" group usually doesn't exist on Ubuntu, so this is just members of the "sudo" group, really.
  7. At this point, polkit would usually check the effective UID is a member of the "sudo" group (which we've confirmed yours is) and then prompt for your password anyway to confirm the person sitting at the session is actually the user claimed.

I'm guessing (hoping!) that your udisks polkit configuration is default, but the following command ought to confirm that (the reason for the odd grep-to-grep-v is to filter out a load of translations we don't care about):

root@ubuntu# grep -A 90 open-device /usr/share/polkit-1/actions/org.freedesktop.UDisks2.policy | grep -v lang=
  <action id="org.freedesktop.udisks2.open-device">
    <description>Open a device</description>
    <message>Authentication is required to open a device</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
    </defaults>
  </action>
  <action id="org.freedesktop.udisks2.open-device-system">
    <description>Open a system device</description>
    <message>Authentication is required to open a device</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
    </defaults>
  </action>
  <!-- ###################################################################### -->
  <!-- Manage system-wide configuration files such as /etc/fstab or
       /etc/crypttab ... including files referenced by these files.

       IMPORTANT: It is not secure to automatically grant authority
       for this action to groups of users. Neither is it secure to
       to allow a process to retain the authorization (e.g. don't
       use the _keep variants).
  -->

Assuming the above is indeed fine, my best guess at the moment is that some bit of the polkit localauthority configuration is missing. In other words, that the following will return something different, perhaps something that doesn't include unix-group:sudo (or is missing the second file entirely, or maybe has another file that overrides it?):

root@ubuntu# grep -R AdminIdentities /etc/polkit-1/localauthority.conf.d/*
/etc/polkit-1/localauthority.conf.d/50-localauthority.conf:AdminIdentities=unix-user:0
/etc/polkit-1/localauthority.conf.d/51-ubuntu-admin.conf:AdminIdentities=unix-group:sudo;unix-group:admin

If you could check the output of those commands on your system, I'd be most interested if they turn up something different to the above!

SilverTux commented 2 years ago

I've run the commands and I'm getting back the same result as you (line-by-line), so I'm assuming that the problem is not with rpi-imager in this case, maybe my snap ecosystem somehow is faulty. I've tried to run the imager using strace and I've gotten the below output (copying only second half of the log):

...
newfstatat(AT_FDCWD, "/sys/kernel/security/apparmor/features/query", {st_mode=S_IFDIR|0755, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/sys/kernel/security/apparmor/features/dbus", {st_mode=S_IFDIR|0755, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/sys/kernel/security/apparmor/features/signal", {st_mode=S_IFDIR|0755, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/sys/kernel/security/apparmor/features/ptrace", {st_mode=S_IFDIR|0755, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/sys/kernel/security/apparmor/features/caps", {st_mode=S_IFDIR|0755, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/sys/kernel/security/apparmor/features/rlimit", {st_mode=S_IFDIR|0755, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/sys/kernel/security/apparmor/features/capability", {st_mode=S_IFREG|0444, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/sys/kernel/security/apparmor/features/namespaces", {st_mode=S_IFDIR|0755, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/sys/kernel/security/apparmor/features/mount", {st_mode=S_IFDIR|0755, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/sys/kernel/security/apparmor/features/network", {st_mode=S_IFDIR|0755, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/sys/kernel/security/apparmor/features/network_v8", {st_mode=S_IFDIR|0755, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/sys/kernel/security/apparmor/features/file", {st_mode=S_IFDIR|0755, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/sys/kernel/security/apparmor/features/domain", {st_mode=S_IFDIR|0755, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/sys/kernel/security/apparmor/features/policy", {st_mode=S_IFDIR|0755, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0
close(5)                                = 0
newfstatat(AT_FDCWD, "/usr/local/sbin/apparmor_parser", 0xc0003ba038, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/local/bin/apparmor_parser", 0xc0003ba108, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/sbin/apparmor_parser", {st_mode=S_IFREG|0755, st_size=1535360, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/sbin/apparmor_parser", {st_mode=S_IFREG|0755, st_size=1535360, ...}, 0) = 0
openat(AT_FDCWD, "/proc/self/mountinfo", O_RDONLY|O_CLOEXEC) = 5
epoll_ctl(4, EPOLL_CTL_ADD, 5, {events=EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, data={u32=1879862952, u64=140601929264808}}) = 0
fcntl(5, F_GETFL)                       = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fcntl(5, F_SETFL, O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 0
read(5, "23 28 0:21 / /sys rw,nosuid,node"..., 4096) = 4049
read(5, "329 28 7:25 / /snap/rpi-imager/2"..., 4096) = 4031
read(5, "", 4096)                       = 0
epoll_ctl(4, EPOLL_CTL_DEL, 5, 0xc0003ad78c) = 0
close(5)                                = 0
openat(AT_FDCWD, "/etc/fstab", O_RDONLY|O_CLOEXEC) = 5
epoll_ctl(4, EPOLL_CTL_ADD, 5, {events=EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, data={u32=1879862952, u64=140601929264808}}) = -1 EPERM (Operation not permitted)
epoll_ctl(4, EPOLL_CTL_DEL, 5, 0xc0003ad734) = -1 EPERM (Operation not permitted)
read(5, "# /etc/fstab: static file system"..., 4096) = 595
read(5, "", 3501)                       = 0
close(5)                                = 0
openat(AT_FDCWD, "/proc/self/mountinfo", O_RDONLY|O_CLOEXEC) = 5
epoll_ctl(4, EPOLL_CTL_ADD, 5, {events=EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, data={u32=1879862952, u64=140601929264808}}) = 0
fcntl(5, F_GETFL)                       = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fcntl(5, F_SETFL, O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 0
read(5, "23 28 0:21 / /sys rw,nosuid,node"..., 4096) = 4049
read(5, "329 28 7:25 / /snap/rpi-imager/2"..., 4096) = 4031
read(5, "", 4096)                       = 0
epoll_ctl(4, EPOLL_CTL_DEL, 5, 0xc0003ad854) = 0
close(5)                                = 0
openat(AT_FDCWD, "/proc/sys/kernel/seccomp/actions_avail", O_RDONLY|O_CLOEXEC) = 5
epoll_ctl(4, EPOLL_CTL_ADD, 5, {events=EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, data={u32=1879862952, u64=140601929264808}}) = 0
fcntl(5, F_GETFL)                       = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fcntl(5, F_SETFL, O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 0
fstat(5, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
read(5, "kill_process kill_thread trap er"..., 512) = 63
read(5, "", 1473)                       = 0
epoll_ctl(4, EPOLL_CTL_DEL, 5, 0xc0003ad784) = 0
close(5)                                = 0
openat(AT_FDCWD, "/dev/null", O_RDONLY|O_CLOEXEC) = 5
epoll_ctl(4, EPOLL_CTL_ADD, 5, {events=EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, data={u32=1879862952, u64=140601929264808}}) = -1 EPERM (Operation not permitted)
epoll_ctl(4, EPOLL_CTL_DEL, 5, 0xc0003ad5cc) = -1 EPERM (Operation not permitted)
pipe2([6, 7], O_CLOEXEC)                = 0
epoll_ctl(4, EPOLL_CTL_ADD, 6, {events=EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, data={u32=1879862952, u64=140601929264808}}) = 0
fcntl(6, F_GETFL)                       = 0 (flags O_RDONLY)
fcntl(6, F_SETFL, O_RDONLY|O_NONBLOCK)  = 0
epoll_ctl(4, EPOLL_CTL_ADD, 7, {events=EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, data={u32=1879862744, u64=140601929264600}}) = 0
fcntl(7, F_GETFL)                       = 0x1 (flags O_WRONLY)
fcntl(7, F_SETFL, O_WRONLY|O_NONBLOCK)  = 0
pipe2([8, 9], O_CLOEXEC)                = 0
epoll_ctl(4, EPOLL_CTL_ADD, 8, {events=EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, data={u32=1879862536, u64=140601929264392}}) = 0
fcntl(8, F_GETFL)                       = 0 (flags O_RDONLY)
fcntl(8, F_SETFL, O_RDONLY|O_NONBLOCK)  = 0
epoll_ctl(4, EPOLL_CTL_ADD, 9, {events=EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, data={u32=1879862328, u64=140601929264184}}) = 0
fcntl(9, F_GETFL)                       = 0x1 (flags O_WRONLY)
fcntl(9, F_SETFL, O_WRONLY|O_NONBLOCK)  = 0
fcntl(7, F_GETFL)                       = 0x801 (flags O_WRONLY|O_NONBLOCK)
fcntl(7, F_SETFL, O_WRONLY)             = 0
fcntl(9, F_GETFL)                       = 0x801 (flags O_WRONLY|O_NONBLOCK)
fcntl(9, F_SETFL, O_WRONLY)             = 0
pipe2([10, 11], O_CLOEXEC)              = 0
getpid()                                = 10266
rt_sigprocmask(SIG_SETMASK, NULL, [], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[], NULL, 8) = 0
clone(child_stack=NULL, flags=CLONE_VM|CLONE_VFORK|SIGCHLD) = 10278
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
close(11)                               = 0
read(10, "", 8)                         = 0
close(10)                               = 0
close(5)                                = 0
epoll_ctl(4, EPOLL_CTL_DEL, 7, 0xc0003ad664) = 0
close(7)                                = 0
epoll_ctl(4, EPOLL_CTL_DEL, 9, 0xc0003ad664) = 0
close(9)                                = 0
futex(0xc00009a148, FUTEX_WAKE_PRIVATE, 1) = 1
waitid(P_PID, 10278, {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=10278, si_uid=1000, si_status=0, si_utime=0, si_stime=0}, WEXITED|WNOWAIT, NULL) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=10278, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
rt_sigreturn({mask=[]})                 = 0
futex(0x55c3769a0cd0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x55c3769a0bd0, FUTEX_WAKE_PRIVATE, 1) = 1
wait4(10278, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, {ru_utime={tv_sec=0, tv_usec=0}, ru_stime={tv_sec=0, tv_usec=3480}, ...}) = 10278
openat(AT_FDCWD, "/var/lib/snapd/system-key", O_RDONLY|O_CLOEXEC) = 5
epoll_ctl(4, EPOLL_CTL_ADD, 5, {events=EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, data={u32=1879862536, u64=140601929264392}}) = -1 EPERM (Operation not permitted)
epoll_ctl(4, EPOLL_CTL_DEL, 5, 0xc0003ad8d4) = -1 EPERM (Operation not permitted)
fstat(5, {st_mode=S_IFREG|0644, st_size=633, ...}) = 0
read(5, "{\"version\":10,\"build-id\":\"7182b0"..., 1145) = 633
read(5, "", 512)                        = 0
close(5)                                = 0
readlinkat(AT_FDCWD, "/proc/self/exe", "/snap/core/13308/usr/bin/snap", 128) = 29
readlinkat(AT_FDCWD, "/snap/rpi-imager/current", "271", 128) = 3
openat(AT_FDCWD, "/snap/rpi-imager/271/meta/snap.yaml", O_RDONLY|O_CLOEXEC) = 5
epoll_ctl(4, EPOLL_CTL_ADD, 5, {events=EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, data={u32=1879862536, u64=140601929264392}}) = -1 EPERM (Operation not permitted)
epoll_ctl(4, EPOLL_CTL_DEL, 5, 0xc0003ad63c) = -1 EPERM (Operation not permitted)
fstat(5, {st_mode=S_IFREG|0644, st_size=1335, ...}) = 0
read(5, "name: rpi-imager\nversion: 1.7.2\n"..., 1847) = 1335
read(5, "", 512)                        = 0
close(5)                                = 0
newfstatat(AT_FDCWD, "/snap/rpi-imager/271/meta/hooks", 0xc000414038, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/var/lib/snapd/snaps/rpi-imager_271.snap", {st_mode=S_IFREG|0600, st_size=215412736, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/var/lib/snapd/features/refresh-app-awareness", {st_mode=S_IFREG|0644, st_size=0, ...}, 0) = 0
openat(AT_FDCWD, "/var/lib/snapd/inhibit/rpi-imager.lock", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 5
epoll_ctl(4, EPOLL_CTL_ADD, 5, {events=EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, data={u32=1879862536, u64=140601929264392}}) = -1 EPERM (Operation not permitted)
epoll_ctl(4, EPOLL_CTL_DEL, 5, 0xc0003ad84c) = -1 EPERM (Operation not permitted)
flock(5, LOCK_SH)                       = 0
read(5, "", 512)                        = 0
close(5)                                = 0
readlinkat(AT_FDCWD, "/proc/self/exe", "/snap/core/13308/usr/bin/snap", 128) = 29
newfstatat(AT_FDCWD, "/snap/core/13308/usr/lib/snapd/snap-confine", {st_mode=S_IFREG|S_ISUID|0755, st_size=123560, ...}, 0) = 0
openat(AT_FDCWD, "/var/lib/snapd/sequence/rpi-imager.json", O_RDONLY|O_CLOEXEC) = 5
epoll_ctl(4, EPOLL_CTL_ADD, 5, {events=EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, data={u32=1879862536, u64=140601929264392}}) = -1 EPERM (Operation not permitted)
epoll_ctl(4, EPOLL_CTL_DEL, 5, 0xc0003ad6ec) = -1 EPERM (Operation not permitted)
fstat(5, {st_mode=S_IFREG|0644, st_size=456, ...}) = 0
read(5, "{\"sequence\":[{\"name\":\"rpi-imager"..., 968) = 456
read(5, "", 512)                        = 0
close(5)                                = 0
umask(000)                              = 002
getuid()                                = 1000
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 5
connect(5, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(5)                                = 0
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 5
connect(5, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(5)                                = 0
newfstatat(AT_FDCWD, "/etc/nsswitch.conf", {st_mode=S_IFREG|0644, st_size=569, ...}, 0) = 0
newfstatat(AT_FDCWD, "/", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 5
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=569, ...}, AT_EMPTY_PATH) = 0
read(5, "# /etc/nsswitch.conf\n#\n# Example"..., 4096) = 569
read(5, "", 4096)                       = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=569, ...}, AT_EMPTY_PATH) = 0
close(5)                                = 0
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 5
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=90731, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 90731, PROT_READ, MAP_PRIVATE, 5, 0) = 0x7fe07002b000
close(5)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libnss_compat.so.2", O_RDONLY|O_CLOEXEC) = 5
read(5, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 $\0\0\0\0\0\0"..., 832) = 832
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=44024, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 47104, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x7fe07001f000
mmap(0x7fe070021000, 28672, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x2000) = 0x7fe070021000
mmap(0x7fe070028000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x9000) = 0x7fe070028000
mmap(0x7fe070029000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x9000) = 0x7fe070029000
close(5)                                = 0
mprotect(0x7fe070029000, 4096, PROT_READ) = 0
munmap(0x7fe07002b000, 90731)           = 0
newfstatat(AT_FDCWD, "/etc/nsswitch.conf", {st_mode=S_IFREG|0644, st_size=569, ...}, 0) = 0
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 5
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=90731, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 90731, PROT_READ, MAP_PRIVATE, 5, 0) = 0x7fe07002b000
close(5)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libnss_nis.so.2", O_RDONLY|O_CLOEXEC) = 5
read(5, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@%\0\0\0\0\0\0"..., 832) = 832
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=55808, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 58600, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x7fe070010000
mmap(0x7fe070012000, 36864, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x2000) = 0x7fe070012000
mmap(0x7fe07001b000, 8192, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0xb000) = 0x7fe07001b000
mmap(0x7fe07001d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0xc000) = 0x7fe07001d000
close(5)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libnsl.so.2", O_RDONLY|O_CLOEXEC) = 5
read(5, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360L\0\0\0\0\0\0"..., 832) = 832
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=93280, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 105032, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x7fe05b7e5000
mmap(0x7fe05b7e9000, 57344, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x4000) = 0x7fe05b7e9000
mmap(0x7fe05b7f7000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x12000) = 0x7fe05b7f7000
mmap(0x7fe05b7fb000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x15000) = 0x7fe05b7fb000
mmap(0x7fe05b7fd000, 6728, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe05b7fd000
close(5)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libtirpc.so.3", O_RDONLY|O_CLOEXEC) = 5
read(5, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\201\0\0\0\0\0\0"..., 832) = 832
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=178816, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 183160, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x7fe05b7b8000
mmap(0x7fe05b7bf000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x7000) = 0x7fe05b7bf000
mmap(0x7fe05b7da000, 36864, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x22000) = 0x7fe05b7da000
mmap(0x7fe05b7e3000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x2a000) = 0x7fe05b7e3000
close(5)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgssapi_krb5.so.2", O_RDONLY|O_CLOEXEC) = 5
read(5, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\323\0\0\0\0\0\0"..., 832) = 832
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=330472, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 332824, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x7fe05b766000
mmap(0x7fe05b771000, 225280, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0xb000) = 0x7fe05b771000
mmap(0x7fe05b7a8000, 49152, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x42000) = 0x7fe05b7a8000
mmap(0x7fe05b7b4000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x4d000) = 0x7fe05b7b4000
close(5)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libkrb5.so.3", O_RDONLY|O_CLOEXEC) = 5
read(5, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000/\2\0\0\0\0\0"..., 832) = 832
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=819776, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 822416, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x7fe05b69d000
mprotect(0x7fe05b6be000, 626688, PROT_NONE) = 0
mmap(0x7fe05b6be000, 372736, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x21000) = 0x7fe05b6be000
mmap(0x7fe05b719000, 249856, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x7c000) = 0x7fe05b719000
mmap(0x7fe05b757000, 61440, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0xb9000) = 0x7fe05b757000
close(5)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libk5crypto.so.3", O_RDONLY|O_CLOEXEC) = 5
read(5, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300D\0\0\0\0\0\0"..., 832) = 832
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=174672, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 180288, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x7fe05b670000
mprotect(0x7fe05b674000, 155648, PROT_NONE) = 0
mmap(0x7fe05b674000, 102400, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x4000) = 0x7fe05b674000
mmap(0x7fe05b68d000, 49152, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x1d000) = 0x7fe05b68d000
mmap(0x7fe05b69a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x29000) = 0x7fe05b69a000
mmap(0x7fe05b69c000, 64, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe05b69c000
close(5)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libcom_err.so.2", O_RDONLY|O_CLOEXEC) = 5
read(5, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300#\0\0\0\0\0\0"..., 832) = 832
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=18504, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 20552, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x7fe074d9b000
mmap(0x7fe074d9d000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x2000) = 0x7fe074d9d000
mmap(0x7fe074d9e000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x3000) = 0x7fe074d9e000
mmap(0x7fe074d9f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x3000) = 0x7fe074d9f000
close(5)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libkrb5support.so.0", O_RDONLY|O_CLOEXEC) = 5
read(5, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0206\0\0\0\0\0\0"..., 832) = 832
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=52016, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 54224, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x7fe070002000
mprotect(0x7fe070005000, 36864, PROT_NONE) = 0
mmap(0x7fe070005000, 24576, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x3000) = 0x7fe070005000
mmap(0x7fe07000b000, 8192, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x9000) = 0x7fe07000b000
mmap(0x7fe07000e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0xb000) = 0x7fe07000e000
close(5)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libkeyutils.so.1", O_RDONLY|O_CLOEXEC) = 5
read(5, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\"\0\0\0\0\0\0"..., 832) = 832
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=22600, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 24592, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x7fe05b669000
mmap(0x7fe05b66b000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x2000) = 0x7fe05b66b000
mmap(0x7fe05b66d000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x4000) = 0x7fe05b66d000
mmap(0x7fe05b66e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x4000) = 0x7fe05b66e000
close(5)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libresolv.so.2", O_RDONLY|O_CLOEXEC) = 5
read(5, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\2406\0\0\0\0\0\0"..., 832) = 832
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=72648, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 84552, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x7fe05b654000
mprotect(0x7fe05b657000, 57344, PROT_NONE) = 0
mmap(0x7fe05b657000, 40960, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x3000) = 0x7fe05b657000
mmap(0x7fe05b661000, 12288, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0xd000) = 0x7fe05b661000
mmap(0x7fe05b665000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x10000) = 0x7fe05b665000
mmap(0x7fe05b667000, 6728, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe05b667000
close(5)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 5
read(5, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\20\0\0\0\0\0\0"..., 832) = 832
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=14432, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 16424, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x7fe05b64f000
mmap(0x7fe05b650000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x1000) = 0x7fe05b650000
mmap(0x7fe05b651000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x2000) = 0x7fe05b651000
mmap(0x7fe05b652000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x2000) = 0x7fe05b652000
close(5)                                = 0
mprotect(0x7fe05b652000, 4096, PROT_READ) = 0
mprotect(0x7fe05b665000, 4096, PROT_READ) = 0
mprotect(0x7fe05b66e000, 4096, PROT_READ) = 0
mprotect(0x7fe07000e000, 4096, PROT_READ) = 0
mprotect(0x7fe074d9f000, 4096, PROT_READ) = 0
mprotect(0x7fe05b69a000, 4096, PROT_READ) = 0
mprotect(0x7fe05b757000, 53248, PROT_READ) = 0
mprotect(0x7fe05b7b4000, 8192, PROT_READ) = 0
mprotect(0x7fe05b7e3000, 4096, PROT_READ) = 0
mprotect(0x7fe05b7fb000, 4096, PROT_READ) = 0
mprotect(0x7fe07001d000, 4096, PROT_READ) = 0
munmap(0x7fe07002b000, 90731)           = 0
openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 5
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=2958, ...}, AT_EMPTY_PATH) = 0
lseek(5, 0, SEEK_SET)                   = 0
read(5, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 2958
close(5)                                = 0
newfstatat(AT_FDCWD, "/home/istvan/snap", {st_mode=S_IFDIR|0700, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/home/istvan/snap/rpi-imager/271", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/home/istvan/snap/rpi-imager/common", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0
readlinkat(AT_FDCWD, "/home/istvan/snap/rpi-imager/current", "271", 128) = 3
openat(AT_FDCWD, "/proc/self/mountinfo", O_RDONLY|O_CLOEXEC) = 5
epoll_ctl(4, EPOLL_CTL_ADD, 5, {events=EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, data={u32=1879862536, u64=140601929264392}}) = 0
fcntl(5, F_GETFL)                       = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fcntl(5, F_SETFL, O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 0
read(5, "23 28 0:21 / /sys rw,nosuid,node"..., 4096) = 4049
read(5, "329 28 7:25 / /snap/rpi-imager/2"..., 4096) = 4031
read(5, "", 4096)                       = 0
epoll_ctl(4, EPOLL_CTL_DEL, 5, 0xc0003ad52c) = 0
close(5)                                = 0
umask(002)                              = 000
newfstatat(AT_FDCWD, "/run/user/1000", {st_mode=S_IFDIR|0700, st_size=400, ...}, 0) = 0
newfstatat(AT_FDCWD, "/run/user/1000/gdm/Xauthority", {st_mode=S_IFREG|0700, st_size=114, ...}, 0) = 0
openat(AT_FDCWD, "/run/user/1000/gdm/Xauthority", O_RDONLY|O_CLOEXEC) = 5
epoll_ctl(4, EPOLL_CTL_ADD, 5, {events=EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, data={u32=1879862536, u64=140601929264392}}) = -1 EPERM (Operation not permitted)
epoll_ctl(4, EPOLL_CTL_DEL, 5, 0xc0003ad60c) = -1 EPERM (Operation not permitted)
newfstatat(AT_FDCWD, "/run", {st_mode=S_IFDIR|0755, st_size=1060, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/run/user", {st_mode=S_IFDIR|0755, st_size=60, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/run/user/1000", {st_mode=S_IFDIR|0700, st_size=400, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/run/user/1000/gdm", {st_mode=S_IFDIR|0711, st_size=60, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/run/user/1000/gdm/Xauthority", {st_mode=S_IFREG|0700, st_size=114, ...}, AT_SYMLINK_NOFOLLOW) = 0
close(5)                                = 0
openat(AT_FDCWD, "/proc/self/mountinfo", O_RDONLY|O_CLOEXEC) = 5
epoll_ctl(4, EPOLL_CTL_ADD, 5, {events=EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, data={u32=1879862536, u64=140601929264392}}) = 0
fcntl(5, F_GETFL)                       = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fcntl(5, F_SETFL, O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 0
read(5, "23 28 0:21 / /sys rw,nosuid,node"..., 4096) = 4049
read(5, "329 28 7:25 / /snap/rpi-imager/2"..., 4096) = 4031
read(5, "", 4096)                       = 0
epoll_ctl(4, EPOLL_CTL_DEL, 5, 0xc0003ad5d4) = 0
close(5)                                = 0
geteuid()                               = 1000
getuid()                                = 1000
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 5
setsockopt(5, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0
connect(5, {sa_family=AF_UNIX, sun_path="/run/user/1000/bus"}, 21) = 0
epoll_ctl(4, EPOLL_CTL_ADD, 5, {events=EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, data={u32=1879862536, u64=140601929264392}}) = 0
getsockname(5, {sa_family=AF_UNIX}, [112 => 2]) = 0
getpeername(5, {sa_family=AF_UNIX, sun_path="/run/user/1000/bus"}, [112 => 21]) = 0
getuid()                                = 1000
getpid()                                = 10266
getuid()                                = 1000
getgid()                                = 1000
sendmsg(5, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\0", iov_len=1}], msg_iovlen=1, msg_control=[{cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, cmsg_data={pid=10266, uid=1000, gid=1000}}], msg_controllen=32, msg_flags=0}, 0) = 1
write(5, "AUTH\r\n", 6)                 = 6
read(5, "REJECTED EXTERNAL\r\n", 4096)  = 19
write(5, "AUTH EXTERNAL 31303030\r\n", 24) = 24
read(5, "OK 3bfa7eb601b723ab1bc6012b62a7b"..., 4096) = 37
write(5, "NEGOTIATE_UNIX_FD\r\n", 19)   = 19
futex(0x55c3769a0cd0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x55c3769a0bd0, FUTEX_WAKE_PRIVATE, 1) = 1
read(5, "AGREE_UNIX_FD\r\n", 4096)      = 15
write(5, "BEGIN\r\n", 7)                = 7
futex(0xc00009a148, FUTEX_WAKE_PRIVATE, 1) = 1
recvmsg(5, {msg_namelen=112}, 0)        = -1 EAGAIN (Resource temporarily unavailable)
futex(0x55c3769a1788, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0x55c3769a1788, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
epoll_pwait(4, [{events=EPOLLOUT, data={u32=1879862536, u64=140601929264392}}], 128, 0, NULL, 0) = 1
futex(0xc00009a148, FUTEX_WAKE_PRIVATE, 1) = 1
openat(AT_FDCWD, "/proc/sys/kernel/random/uuid", O_RDONLY|O_CLOEXEC) = 6
epoll_ctl(4, EPOLL_CTL_ADD, 6, {events=EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, data={u32=1879862952, u64=140601929264808}}) = 0
fcntl(6, F_GETFL)                       = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fcntl(6, F_SETFL, O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 0
fstat(6, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
read(6, "276b7265-343c-4667-9e50-b94ca3e3"..., 512) = 37
read(6, "", 1499)                       = 0
epoll_ctl(4, EPOLL_CTL_DEL, 6, 0xc0003ad694) = 0
close(6)                                = 0
getpid()                                = 10266
write(5, "l\1\0\1S\0\0\0\2\0\0\0\177\0\0\0\1\1o\0\25\0\0\0/org/fre"..., 227) = 227
futex(0xc00009a148, FUTEX_WAKE_PRIVATE, 1) = 1
write(5, "l\1\0\1\200\0\0\0\3\0\0\0\266\0\0\0\1\1o\0\31\0\0\0/org/fre"..., 328) = 328
futex(0xc00009a148, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x55c3769a1788, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0x55c3769a1788, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
epoll_pwait(4, [], 128, 0, NULL, 0)     = 0
epoll_pwait(4, [{events=EPOLLIN|EPOLLOUT, data={u32=1879862536, u64=140601929264392}}], 128, -1, NULL, 3) = 1
futex(0x55c3769a0cd0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x55c3769a0bd0, FUTEX_WAKE_PRIVATE, 1) = 1
recvmsg(5, {msg_name={sa_family=AF_UNIX, sun_path="/run/user/1000/bus"}, msg_namelen=112 => 21, msg_iov=[{iov_base="l\2\1\1\0\0\0\0\4\0\0\0005\0\0\0", iov_len=16}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 16
recvmsg(5, {msg_name={sa_family=AF_UNIX, sun_path="/run/user/1000/bus"}, msg_namelen=112 => 21, msg_iov=[{iov_base="\6\1s\0\6\0\0\0:1.263\0\0\5\1u\0\4\0\0\0\7\1s\0\24\0\0\0"..., iov_len=56}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 56
futex(0xc000086148, FUTEX_WAKE_PRIVATE, 1) = 1
recvmsg(5, {msg_namelen=112}, 0)        = -1 EAGAIN (Resource temporarily unavailable)
futex(0x55c3769a1788, FUTEX_WAIT_PRIVATE, 0, NULL) = ?
...

I'll try to figure out what is going on with my system and I'll let you know if something turns out. Thank You for the help! :)

SilverTux commented 2 years ago

I've checked my journalctl and I'm seeing this:

audit[8023]: AVC apparmor="DENIED" operation="open" profile="snap.rpi-imager.rpi-imager" name="/run/mount/utab" pid=8023 comm="lsblk" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
kernel: audit: type=1400 audit(1655291304.058:102): apparmor="DENIED" operation="open" profile="snap.rpi-imager.rpi-imager" name="/run/mount/utab" pid=8023 comm="lsblk" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
audit[8025]: AVC apparmor="DENIED" operation="open" profile="snap.rpi-imager.rpi-imager" name="/run/mount/utab" pid=8025 comm="lsblk" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
kernel: audit: type=1400 audit(1655291305.106:103): apparmor="DENIED" operation="open" profile="snap.rpi-imager.rpi-imager" name="/run/mount/utab" pid=8025 comm="lsblk" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0