Problems with PolKit after downgrading kernel

So I’ve downgraded from kernel 5.4.57 to 4.19.138 yesterday and noticed some strange behavior from PolKit.

I was to build a docker image from a Docker file and got the following error:

Sending build context to Docker daemon  997.4kB
Error response from daemon: Error processing tar file(exit status 1): Error cleaning up after pivot: remove /.pivot_root092411178: device or resource busy

(this is rather similar to this one)

After this error, I tried to build a docker image again, and got a different error:

ERRO[0000] failed to dial gRPC: cannot connect to the Docker daemon. Is 'docker daemon' running on this host?: dial unix /var/run/docker.sock: connect: no such file or directory 
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

I then tried to restart my docker service with systemctl restart docker, a polkit window prompt appeared, and when I typed in my password, I got a message that the password is incorrect, which is obviously not, since I haven’t changed the password, as the passsword works with sudo and when I login into my user, but apparently with polkit it stopped working. Also, whenever I start ksysguard, small window show up (every 5 seconds) saying that “can not open /etc/mtab”, as displayed in the screenshot.

Now I am not able to pamac upgrade nor anything else that requires Polkit. Not even doing anything from within Add/Remove Software.

I would kindly accept any help here to solve this issue.

Welcome to the forum! :slight_smile:

What happens if you boot up in the 5.4 kernel again?

I don’t have it anymore as I it lagged very much. I booted back to 4.19 and removed (did that yesterday). Now I can not install it (or anything else) anymore.

Do you still have the installation medium? If so, then you can attempt to boot up from there and fix things from within a chroot. :thinking:

What do you mean the installation medium ?

The optical disk or the USB stick that you installed the system from. It has a live mode. :slight_smile:

Oh you mean that, I don’t have it since I am running this distro for over a year now.

Well, in that case you can try downloading one of the latest install images, put that on a USB stick (or an optical disk) and boot up from it in live mode.

But what should I look for/after ? Because I got the impression that the issue is with polkit, but then when i try to re-install a package I get that the memory is full. Also df -h returns this:

df: /run/user/1000/doc: Operation not permitted
Filesystem      Size  Used Avail Use% Mounted on
dev             3,8G     0  3,8G   0% /dev
run             3,8G  2,1M  3,8G   1% /run
/dev/dm-0       225G  167G   48G  78% /
tmpfs           3,8G  296M  3,5G   8% /dev/shm
tmpfs           3,8G     0  3,8G   0% /sys/fs/cgroup
/dev/nvme0n1p1  300M  424K  299M   1% /boot/efi
/dev/loop1       56M   56M     0 100% /var/lib/snapd/snap/core18/1885
/dev/loop2       97M   97M     0 100% /var/lib/snapd/snap/core/9804
/dev/loop0       57M   57M     0 100% /var/lib/snapd/snap/bitwarden/28
/dev/loop4       63M   63M     0 100% /var/lib/snapd/snap/gtk-common-themes/1506
/dev/loop6       30M   30M     0 100% /var/lib/snapd/snap/snapd/8790
/dev/loop7       97M   97M     0 100% /var/lib/snapd/snap/core/9665
tmpfs           3,8G   36K  3,8G   1% /tmp
/dev/loop8       55M   55M     0 100% /var/lib/snapd/snap/gtk-common-themes/1502
/dev/loop5       57M   57M     0 100% /var/lib/snapd/snap/bitwarden/27
/dev/loop3      161M  161M     0 100% /var/lib/snapd/snap/gnome-3-28-1804/116
/dev/loop10     162M  162M     0 100% /var/lib/snapd/snap/gnome-3-28-1804/128
/dev/loop9      178M  178M     0 100% /var/lib/snapd/snap/skype/143
/dev/loop11     119M  119M     0 100% /var/lib/snapd/snap/slack/27
/dev/loop12      30M   30M     0 100% /var/lib/snapd/snap/snapd/8542
/dev/loop13     178M  178M     0 100% /var/lib/snapd/snap/skype/139
/dev/loop14     145M  145M     0 100% /var/lib/snapd/snap/slack/25
/dev/loop15      55M   55M     0 100% /var/lib/snapd/snap/core18/1880
tmpfs           774M   16K  774M   1% /run/user/120
tmpfs           100K     0  100K   0% /var/lib/lxd/shmounts
tmpfs           100K     0  100K   0% /var/lib/lxd/devlxd
tmpfs           774M  144K  774M   1% /run/user/1000
/dev/loop16     4,7G  1,6G  2,3G  40% /var/lib/lxd/storage-pools/default

My train of thought was to have you boot up from the live medium and then via a chroot install the 5.4 kernel again ─ or perhaps a later kernel. You can do this without removing the other kernel, because you can select the kernel you want from the GRUB boot menu, by choosing “Advanced Options for Manjaro Linux”. GRUB will then normally remember the last kernel you’ve used upon the next boot.

That said, you’ve got a whole lot of Snap stuff installed, and it is not unthinkable that this is what has messed up your polkit ─ if it is indeed polkit that’s messed up, and not something else that’s interfering with your permissions.

:man_shrugging:

with the screenshot I don’t see anything related to polkit.
it seems pacman can’t install the package for an unknown reason I know…
pacman don’t use polkit so it’s not related to polkit.
it seems your system is broken in some way…
like as a broken update… or someting.


https://bbs.archlinux.org/viewtopic.php?id=212752

/etc/mtab sould be a symlink to /proc/self/mounts

1 Like

@Shelly, I would recommend that you clean out your pacman cache. Your root system is 78% full.

sudo paccache -rvk0

You may need to do this from the chroot environment if you cannot get sudo privileges in the installed system.


Correct.

[nx-74205:/dev/pts/3][/home/aragorn]
[16:04:02][aragorn] >  ll /etc/mtab
lrwxrwxrwx 1 root root 19 May 21 09:30 /etc/mtab -> ../proc/self/mounts

[nx-74205:/dev/pts/3][/home/aragorn]
[16:04:09][aragorn] > 

Thank you both for the guidance.
/etc/mtab is linked to /pro/self/mounts so that is ok. I managed to download an ISO, boot from it and manjaro-chroot into my disk (which is btw encrypted, forgot to mention).

@Aragorn I did execute the sudo paccache -rvk0 command and about 10Gb were liberated. I checked df -h from from within chroot and nothing was above 20% and only a few processes were visible.

Now I noticed another thing. I noticed that whenever I boot back into my user, all seems to work ok. I can use sudo normally and no issues with PolKit during update/upgrade/install/re-install. df -h displays these values after I login into my user:

Although as soon as I run docker build . that really messes my system, and I back again to my initial symptoms. I’ll re-install docker.

Edit: Reinstalling docker did not help. I’ll do as @Aragorn has stated previously, to install back the newer kernel.

1 Like

Ok so I’ve installed and booted with kernel v5.4.57 and can confirm that everything is working ok, docker build . is running well and does not cause any issues. But the problem is that I don’t want to be on this kernel because it is causing lots of “hiccups” and random freezes during high memory load, which sometimes last 5-20sec. And this does not happen on kernel 4.19.138. So what are my choices now ?

Rebooted with 4.19.138, I logged in and then was greeted by a window saying “Ops, there was an issue. Please logout” with a white background covering the whole screen. I restarted my laptop, choose again 4.19.138 and then logged in. Ran docker build . and got again the same issue.

Well, I’m on 5.4 as well, and I don’t have any of the problems you’re reporting, but then again, I’m also not running any Docker images here. I also don’t know how much RAM you have in that machine ─ I’ve got 16 GiB in mine.

Maybe you can try installing the latest mainline kernel… :arrow_down:

mhwd-kernel -i linux-latest

This will not only pull in the latest stable mainline kernel ─ currently 5.8.2, I believe ─ but it will also automatically move you over to the next kernel generation once 5.8 becomes EOL.


Addendum: I notice that your /tmp is 3.8 GiB, which suggests that you’ve got 8 GiB of RAM installed in that machine. Are you sure you want to be running Docker images on a machine with those specs?

It’s a hp envy 13 from 2017 with 8gb RAM. It’s not much but it gets me through.

I used this now mainly for work, and I tend to stick on older kernels, due to hardware, random bugs and performance. I think that I might boot into 5.4, remove 4.19, reboot, install 4.19 and then try again, as I’m not sure what could be causing this.

That’s completely unnecessary. It won’t make any difference, because GNU/Linux doesn’t work that way ─ this is not MS-Windows. :wink:

Well I’m a python dev so I only run one container at a time. And it works rather well given vscode is electron based and firefox with over 40 tabs and other communication apps based on electron.

1 Like

Maybe we need to look at this from a different perspective. Why not, instead of using Docker ─ which is clearly what’s messing with your system ─ use something like systemd-nspawn?

Disclaimer

I personally haven’t tried it yet, but it essentially uses a container, just like Docker.

Here’s the Arch wiki page on systemd-nspawn.