Describe the bug
I get
WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
1:C 04 Mar 2024 01:06:13.769 # Failed to test the kernel for a bug that could lead to data corruption during background save. Your system could be affected, please report this error.
1:C 04 Mar 2024 01:06:13.770 # Redis will now exit to prevent data corruption. Note that it is possible to suppress this warning by setting the following config: ignore-warnings ARM64-COW-BUG
To reproduce
When I run
docker run -p 6379:6379 --memory=100m --memory-reservation=100m --rm arm64v8/redis
Expected behavior
Be able to tell me if my kernel is affected or not
Additional information
$ uname -a
Linux OpenWrt 6.1.78 #0 SMP Mon Feb 19 19:52:06 2024 aarch64 GNU/Linux
This is on a Banana Pi R4 router
Let me know if there is any other info I can gather. I worked around it with the config key ARM64-COW-BUG
Comment From: sundb
the short answer is yes. please refer to https://github.com/redis/redis/issues/8351 and https://github.com/redis/redis/issues/8406
Comment From: russelltg
I dug into this more--I compiled it directly for the target device (no docker anymore) and get the same issue. strace -f shows [pid 26537] openat(AT_FDCWD, "/proc/self/smaps", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) being the root of the issue. It seems my kernel is not compiled with CONFIG_PROC_PAGE_MONITOR, which provides /proc/self/smaps.
I would be content with an added warning something like "your kernel is not compiled with CONFIG_PROC_PAGE_MONITOR, so unable to check for this kernel bug. Check if your kernel contains ff1712f953e27f0b0718762ec17d0adb15c9fd0b, then set ignore-warnings: ARM64-COW-BUG in your config"
Obviously ideally there is a way to do this without CONFIG_PROC_PAGE_MONITOR, but I understand that my usecase of running redis on a router is a bit unique :)