Why Redis Exits on ARM64: Fix the THP COW Bug and Prevent Data Loss
Redis on ARM64 platforms may abort startup with a warning about a kernel COW bug when Transparent Huge Pages are enabled, risking RDB corruption; this guide explains the underlying issue, when it’s safe to ignore the warning, and provides two solutions—disabling THP or configuring ignore‑warnings—to ensure safe operation.
Are you seeing this? Running Redis on Huawei Cloud, Alibaba Cloud ARM instances, Raspberry Pi, or Apple Silicon and the startup suddenly aborts with a warning.
Redis will now exit to prevent data corruption.
Note: you can suppress this warning by setting:
ignore-warnings ARM64-COW-BUGYou want a quick fix but worry: will skipping the warning cause data loss?
✅ Is this bug dangerous?
✅ When is it safe to ignore?
✅ How to correctly configure ignore-warnings ARM64-COW-BUG?
✅ How to adjust the container environment?
🔍 Core Issue: Redis "actively brakes" instead of crashing
The error originates from a known compatibility problem between Redis on ARM64 and Linux Transparent Huge Pages (THP):
When Redis performs an RDB snapshot (bgsave),
If the system has THP enabled,
On ARM64 this may trigger a kernel COW (copy‑on‑write) exception,
Resulting in corrupted RDB files or even memory data chaos.
Since Redis 6.0+, on ARM64 it forcibly checks THP status at startup; if a risk is detected, it exits (not just warns) to prevent silent data loss.
🛠️ Solution: Two Paths, Choose as Needed
✅ Path One: Recommended – Disable Transparent Huge Pages (Fix the Root Cause)
This is the official Redis recommendation and eliminates the risk completely.
# Temporary disable (effective immediately)
echo never | sudo tee /sys/kernel/mm/transparent_hugepage/enabled
echo never | sudo tee /sys/kernel/mm/transparent_hugepage/defragAdvantage : One‑time fix, does not affect Redis functionality.
Verification : cat /sys/kernel/mm/transparent_hugepage/enabled should show [never].
Permanent disable : See appendix for systemd/rc.local method.
⚠️ Path Two: Cautious – Ignore the Warning (Work‑around)
Only consider this when all of the following are true:
Add the following line to redis.conf:
# Resolve ARM64 kernel COW bug warning
ignore-warnings ARM64-COW-BUGAfter editing, restart Redis to start normally.
Container Users Note
Copy the config from the container:
docker cp <redis_container>:/etc/redis/redis.conf ./Edit the local redis.conf and add the above line.
Mount it back when starting the container:
docker run -v $(pwd)/redis.conf:/etc/redis/redis.conf redis redis-server /etc/redis/redis.confImportant Reminder :
This setting does not fix the kernel bug; it only silences Redis.
If you still use RDB, the data‑corruption risk remains.
🧪 How to Verify Your Setup Is Safe
Check if RDB is used:
grep -v "^#" /etc/redis/redis.conf | grep "save"
# Empty output or only "save \"\"" → RDB disabled → ignoring warning may be OK
# Presence of "save 900 1" etc. → RDB enabled → strongly recommend disabling THPCheck THP status:
cat /sys/kernel/mm/transparent_hugepage/enabled
# Shows [never] → safe
# Shows [always] → high risk; even with ignore‑warnings you should not run RDB📜 Appendix: One‑Click Detection Script (with Risk Tips)
#!/bin/bash
echo "🔍 Detecting Redis ARM64 safety status..."
THP=$(cat /sys/kernel/mm/transparent_hugepage/enabled)
RDB=$(grep -v "^#" /etc/redis/redis.conf 2>/dev/null | grep -c "save [0-9]")
echo "THP status: $THP"
if [[ $THP == *"[always]"* ]] && [ $RDB -gt 0 ]; then
echo -e "
🔴 High risk! THP enabled + RDB active, do NOT ignore warning!"
echo "👉 Please run: echo never > /sys/kernel/mm/transparent_hugepage/enabled"
elif [[ $THP == *"[always]"* ]] && [ $RDB -eq 0 ]; then
echo -e "
🟡 Medium risk: THP enabled but RDB not used."
echo "👉 You may add 'ignore-warnings ARM64-COW-BUG', but disabling THP is still advised."
else
echo -e "
🟢 Safe: THP disabled, Redis can run normally."
fi🌟 Final Thought
Redis would rather refuse to start than let you lose data.
That stubbornness is why it is trustworthy.In the ARM64 era, understanding the underlying mechanism is far more important than blindly skipping warnings.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Xiao Liu Lab
An operations lab passionate about server tinkering 🔬 Sharing automation scripts, high-availability architecture, alert optimization, and incident reviews. Using technology to reduce overtime and experience to avoid major pitfalls. Follow me for easier, more reliable operations!
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
