lxc.mount.auto=proc:rw sys:rw freezes archlinux
Closed this issue · 5 comments
Hi! First of all. Thank you for your time in creating these masterpieces of content to educate people on DevOps
Describe the bug
When I ran:
lxc launch ubuntu:22.04 kmaster --profile k8s
My PC freezes and I have to restarts the PC
How To Reproduce
N.A. As I follows the exacts steps provided in kubernetes/lxd-provisioning/README.md
Expected behavior
It should just create the container and run as normal
Environment (please complete the following information):
lxd --version
5.20
lxc --version
5.20
uname -a
Linux archlinux 6.6.10-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 05 Jan 2024 16:20:41 +0000 x86_64 GNU/Linux
nproc
32
free -h
total used free shared buff/cache available
Mem: 62Gi 7.1Gi 49Gi 632Mi 7.1Gi 55Gi
Swap: 4.0Gi 0B 4.0Gi
Additional context
I have tried to minimized on which properties caused this and found that it's:
raw.lxc:
...
lxc.mount.auto=proc:rw sys:rw
Please note that I'm running LXC with unprivileged user as suggested by the documentation when I'm using lxc
@liketoeatcheese
Thanks for reporting the issue you experienced. It works fine for me on Ubuntu 22.04. I used to use Archlinux and even there it worked fine. What I noticed was when I launch the container in Archlinux with k8s profile, the whole system will freeze for about 5 to 10 seconds and then return to normal. During this time the cpu usage will shoot to 100% and fan will run in full blast. It didn't happen on Ubuntu 22.04. Although it might be hardware dependant.
I updated the k8s profile few days ago. Did you try it recently with the latest changes in this repo?
I have attempted to wait it out, after 30' of frozen state, I just restart instead.
I also tried the previous config, and it still comes down to this line: lxc.mount.auto=proc:rw sys:rw
. And I checked the changes, you only refactored the mount entry with a property so I don't think it's the issue.
Is there a way to set this up after the container is created?
Update: I have tried to use them one by one.
lxc.mount.auto=proc:rw
- this works fine
lxc.mount.auto=sys:rw
- this freezed
So it's something about sys:rw which froze the underlying resources
@liketoeatcheese when you did lxd init while setting up your lxd environment, what storage backend did you choose? There were options to choose from zfs, btrfs, dir etc. Its worth trying different storage backends. I am using dir storage backend. I think I had the same in Archlinux which didn't work very well and changed to something else which I can't remember.
I have tried it with all 3 options, but no luck. I have also tried modifying it to sys:mixed and it worked fine. So I'm not sure what's going on. I have raised a ticket with lxd team, so hopefully will get an answer for it.
https://discuss.linuxcontainers.org/t/lxc-arch-linux-froze-pc-with-raw-lxc-lxc-mount-auto-sys-rw/18831
For the time being, I tested sys:rw with --vm and it worked but the documentation said --vm has some restrictions so I will test it out to see if I can install k8s on it
Closing the ticket since --vm works fine