Validation crashes with "writer process ended unexpectedly" near completion, even though the write itself succeeds
Etcher version: 2.1.4
OS: Windows (Dell XPS 7590), internal Realtek PCIe Card Reader
Target media: SDXC card, reported by Windows as 128,177,930,240 bytes (119.38 GiB) / marketed as "128 GB"
Description
When flashing a large image (~119 GB, both .img and .img.gz variants tested) to a large SDXC card via the internal Realtek PCIe card reader, the write phase consistently completes to 100%. The subsequent validation phase reliably progresses to ~99% (in one observed run, ETA 0m0s) before crashing with:
Something went wrong. If it is a compressed image, please check that the archive is not corrupted. The writer process ended unexpectedly.
This happens across multiple different source images (our own image, both compressed and uncompressed; a different ~22 GB image), so it does not appear to be specific to one file.
Why I believe this is a validation-only issue, not a real write failure
- The source image files were independently verified as fully intact before flashing (gzip/xz archive integrity check passed; a full
e2fsck -fnfilesystem check on the decompressed image reported zero structural errors on both the FAT boot partition and the ext4 root partition). - The write phase itself always reports 100% completion before the error appears.
- Independently, using a custom raw-disk-read script (PowerShell +
FileStream, no Etcher involved) to read the source SD card for backup purposes, I hit the exact same kind of OS-level error ("The drive cannot find the requested sector" /ERROR_SECTOR_NOT_FOUND) consistently and reproducibly at an offset matching almost exactly the reported total size of the card. This strongly suggests the card reader/driver on this system cannot reliably read the very last portion of large SD/SDXC cards — a hardware/driver limitation, not a data integrity problem. - Etcher's validation step reads back the entire written region to compare checksums, so it hits this same reader limitation near the very end of the read-back, and the writer/validator child process appears to crash outright rather than surfacing a clear "could not verify the last N bytes" message.
Steps to reproduce
- Flash a large (~100+ GB) image to a large SDXC card via a Realtek PCIe (or similar) card reader on Windows, with "Validate write on success" enabled (note: in v2.1.4 there does not appear to be a UI toggle for this on Windows, so it always runs).
- Observe the Flashing phase reach 100%.
- Observe the Validating phase progress to ~99%+ before the generic "writer process ended unexpectedly" error appears.
Expected behavior
Either:
- Validation should tolerate/retry a transient read error very close to the end of the device rather than crashing the whole process, and/or
- The error message should distinguish "write succeeded, validation could not read back the last portion" from a generic crash, so users aren't left assuming the entire flash failed when in fact the write itself completed successfully.
Actual behavior
A generic, alarming "writer process ended unexpectedly" crash, indistinguishable from an actual failed write, even when the write phase reported 100% success and independent integrity checks confirm the source data was never corrupted.
Source: balena-io/etcher