-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing blkio and memory cgroup support on 3B+ and 3B, 5.4.42-v7+ kernel #3644
Comments
same behavior here with
while a previous version of raspbian works as expected :
|
This just manifest itself in "release" Raspberry Pi OS on my 3B+ Is there a known good kernel I can revert to?
kernel state
memory cgroup not listed, even though it is in --- /boot/cmdline.txt 2020-07-20 07:30:54.000000000 -0600
+++ /boot/cmdline_backup.txt 2020-07-20 07:11:22.000000000 -0600
@@ -1 +1 @@
-console=serial0,115200 console=tty1 root=PARTUUID=738a4d67-02 rootfstype=ext4 elevator=deadline fsck.repair=yes cgroup_memory=1 cgroup_enable=memory rootwait
+console=serial0,115200 console=tty1 root=PARTUUID=738a4d67-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait |
Same problem here. Previously it worked without cmdline.txt parameters. Have not tested with 32 bit kernel on rpi 4, but I had to add "cgroup_enable=memory" with 64 bit kernel. Fix: use 64 bit kernel and add cgroup_enable=memory See my post at rpi forum: https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=280656 |
Your post at rpi form does explain or point to how to move to 64 bit kernel. The "fix" would actually be to re-define the CONFIG_MEMCG and related CGROUP defines (is there a reason why they stopped being defined?) in the kernel released... |
I see that editing
will choose the 64bit kernel, which includes the memory in cgroup-s, as @mnorrsken mentioned. $ uname -a
Linux rpihp2 5.4.51-v8+ #1326 SMP PREEMPT Fri Jul 17 10:58:13 BST 2020 aarch64 GNU/Linux
$ cat /proc/cgroups
#subsys_name hierarchy num_cgroups enabled
cpuset 9 14 1
cpu 3 41 1
cpuacct 3 41 1
blkio 5 41 1
memory 6 79 1
devices 8 41 1
freezer 2 14 1
net_cls 7 14 1
pids 4 45 1 Found here: Pi4 64-bit raspbian kernel for testing - Focus on Pi4 - Raspberry Pi Forums |
I just ran into this issue when the new kernel hit stable repository. I installed the updates across all my devices and took down my k8s cluster. The 20200717 and 20201723 kernels appear to be missing blkio and memory cgroup support. I resolved by downgrading to the previous 20200601 kernel packages. Commands below should help quickly revert. wget http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/raspberrypi-bootloader_1.20200601-1_armhf.deb |
See: #3644 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
The memory and block IO cgroups have been added to BCM2835-7, to match BCM2711 and previous kernels. |
See: raspberrypi/linux#3644 kernel: add CONFIG_CRYPTO_USER_API_HASH=m kernel: configs: Adding remaining crypto API modules See: raspberrypi/linux#3628
See: raspberrypi/linux#3644 kernel: add CONFIG_CRYPTO_USER_API_HASH=m kernel: configs: Adding remaining crypto API modules See: raspberrypi/linux#3628
Can you test rpi-update kernel and check if it has the features you need. |
and
before update $ cat /sys/firmware/devicetree/base/model
Raspberry Pi 3 Model B Plus Rev 1.3
$ uname -a
Linux rpihp2 5.4.51-v7+ #1327 SMP Thu Jul 23 10:58:46 BST 2020 armv7l GNU/Linux
$ cat /proc/cgroups
#subsys_name hierarchy num_cgroups enabled
cpuset 5 1 1
cpu 4 1 1
cpuacct 4 1 1
devices 2 25 1
freezer 7 1 1
net_cls 3 1 1
pids 6 31 1
$ sudo rpi-update
# ... reboot ... rpi-update output
after update $ uname -a
Linux rpihp2 5.4.51-v7+ #1328 SMP Mon Jul 27 16:51:11 BST 2020 armv7l GNU/Linux
$ cat /boot/cmdline.txt
console=serial0,115200 console=tty1 root=PARTUUID=738a4d67-02 rootfstype=ext4 elevator=deadline fsck.repair=yes cgroup_memory=1 cgroup_enable=memory rootwait
$ cat /proc/cgroups
#subsys_name hierarchy num_cgroups enabled
cpuset 6 1 1
cpu 3 1 1
cpuacct 3 1 1
blkio 5 1 1
memory 8 56 1
devices 2 25 1
freezer 4 1 1
net_cls 7 1 1
pids 9 30 1
So |
And I can confirm that |
Same problem on RPi 4, I update to lastest kernel version using
And
|
Your output shows that it indeed does have cgroups configured in the kernel
enable in |
Hint: Adding significant information by editing a comment effectively hides it from anyone following by email. |
Afaik memory cgroup enabled has a memory overhad of 8MB on a 1GB system (source: internet). So its understandable if default setting is disabled. Also: great news, I will test the new kernel later. |
8MB on 1GB is less than 1%. The problem is not so much the fact that it is not enabled, but the fact that it is no longer enabled by default. |
See: #3644 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
See: #3644 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
See: #3644 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
See: #3644 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
See: #3644 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
See: #3644 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
See: #3644 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
See: #3644 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
See: raspberrypi#3644 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
See: #3644 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Hello, I was hesitant to do a firmware update as I did not want to have to deal with potential breaking changes for other configured software I had on one of my nodes. My issue was:
when trying to join a node to my k3s cluster. My fix was to edit the |
See: #3644 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
See: #3644 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
I have the same error; observe cgroups: memory related error even after a reboot cat /boot/cmdline.txt CGROUPS_MEMORY: missing
error execution phase preflight: [preflight] Some fatal errors occurred: Request your help. |
Got resolved, as it appeared to be a line separation issue. |
See: #3644 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
See: #3644 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
See: #3644 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
See: #3644 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Does anyone have issues with parameters being straight up ignored? |
Could you pleas stop breaking cgroup_memory on my rpi? |
@owlmind are you on the experimental 6.12 kernel? |
@ElDavoo I suggest creating a separate issue instead of necroing this issue from 2020, so it is clear that this is a regression with the recent 6.11 and 6.12 kernels. |
Don't - it's already resolved: #6524 |
Describe the bug
When I try to do anything related to containers in RPi, the software fails and messages that there is no memory cgroup. This issue comes from here: k3s-io/k3s#1825
To reproduce
5.4.42-v7+ kernel, Raspbian 10 buster, only affecting 3B+ and 3B versions, at least not in the Pi 4.
Expected behaviour
Software to install successfully and allow management of containers
Actual behaviour
Printing of error messages related to cgroups
System
The text was updated successfully, but these errors were encountered: