Memory Page Has Hardware Error
Production Risk
CRITICAL — indicates defective RAM. Replace the faulty DIMM immediately.
EHWPOISON (errno 133) is returned when the kernel detects that a memory page has an uncorrectable hardware error (typically an uncorrectable ECC memory error) and refuses to access it to prevent data corruption.
- 1RAM with an uncorrectable ECC memory error
- 2Hardware Memory Error Machine Check Exception (MCE) on the page
- 3The page has been "poisoned" by the kernel to prevent use of bad RAM
read() or mmap access to a page with a hardware memory error.
// Accessing a page with uncorrectable ECC error ssize_t n = read(fd, buf, sizeof(buf)); // Returns -1, errno = EHWPOISON if page is hardware-poisoned
expected output
read: Memory page has hardware error (EHWPOISON)
Fix
Replace the faulty RAM
WHEN When EHWPOISON is returned
# Check memory error log mcelog # Or check dmesg for MCE events dmesg | grep -i "mce\|hardware error\|poison" # Run memtest to identify faulty DIMM # Boot memtest86+ from GRUB or USB
Why this works
EHWPOISON indicates physical RAM failure. The page is permanently unusable until the DIMM is replaced.
✕ Retry the operation on a poisoned page
The hardware error is permanent; repeated access will continue to fail until the faulty DIMM is replaced.
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev