Error while reading piece from cache

Issue Report

Error while reading piece from cache, might be a disk corruption


ubuntu 20.0

  • Operating System: r7 5800x 64gb ram, ssd 2x u2
  • Pulsar/Advanced CLI/Docker: adv cli


I got this error when plot. Anything to do or check?

:piece_cache: Error while reading piece from cache, might be a disk corruption error=Checksum mismatch disk_farm_index=0 key=Key(b"\x90\xb2\xce\x05\x08\xcc0\0\0\0\0\0\0") offset=952
1 Like

This generally shouldn’t happen, especially on SSDs.
There are two possibilities: data is corrupted on disk or not.

If data is corrupted it might be corrupted before writing. It usually happens due to memory issues (high overclock for example), in which case application thinks it operates on correct data, but it is not or it did correct computation, but during writes corrupted bits were written.

If data is not corrupted it could be either memory issues that corrupted in-memory data, but plots is fine, or could be storage medium error and more rarely some other hardware issues with motherboard, CPU or PSU.

I’d recommend starting with memory test and if it succeeds subspace-farmer has a scrub command that wil read through the farm and will try to find and correct errors it encounters. After scrub and restart farmer will fill replace broken data with correct ones.

And scrub will look like this:

2023-11-13T19:03:38.782961Z  WARN single_disk_farm{disk_farm_index=0}: subspace_farmer::single_disk_farm: Failed to decode sector metadata, replacing with dummy expired sector metadata path=/media/SN750-4/plot0/metadata.bin error=Could not decode `SectorMetadataChecksummed.0`:
        Could not decode `SectorMetadata::history_size`:
                Could not decode `HistorySize.0`:
                        cannot create non-zero number from 0
2023-11-13T19:03:45.229348Z  INFO single_disk_farm{disk_farm_index=0}: subspace_farmer::single_disk_farm: Checked 720/765 sectors