`ciphertext verification failed` error on healthy SSD

I am running restic 0.17.1 compiled with go1.23.1 on linux/amd64

  1. Running a `restic check --read-data` command on a repository, I have encountered a `ciphertext verification failed unexpected pack id…` error. Following the recommendation here ( Troubleshooting — restic 0.18.1 documentation ) I am presenting the problem here to get advice about what to do next. (See full command line output below…)

2. I have run extensive tests on my backup SSD and found no problems there whatsoever.

EXACT COMMAND ISSUED:

```

date --rfc-3339=seconds

time restic -p /media/tomc/SD-128GB-1/scratch/ssap -r /media/tomc/SSD-WD01/galp5-kubuntu-SSD/remainders check --read-data

```

OUTPUT:

```

50.28user 3.57system 0:36.44elapsed 147%CPU (0avgtext+0avgdata 154812maxresident)k

13482208inputs+16outputs (0major+552474minor)pagefaults 0swaps

260.40user 31.17system 5:43.19elapsed 84%CPU (0avgtext+0avgdata 123488maxresident)k

158981328inputs+24outputs (0major+5203703minor)pagefaults 0swaps

168.70user 18.48system 4:11.87elapsed 74%CPU (0avgtext+0avgdata 119744maxresident)k

102942520inputs+16outputs (0major+2731653minor)pagefaults 0swaps

pack f5738e59f690af4a8e41d200c10c59cbdfee1ef2c5b24ad0e4246f03fd9bb077 contains 2 errors: [blob 071cee7bdc43617d37377411d7bcae6b43d6b23b856504f520eb77ae2f4ef594: decrypting blob <data/071cee7b> from f5738e59 failed: ciphertext verification failed unexpected pack id c6da4e9ea03a4c3efa602f56a0de1c35be234c87fcd199e8ab5d9c4e459ddb3a]

The repository contains damaged pack files. These damaged files must be removed to repair the repository. This can be done using the following commands. Please read the troubleshooting guide at Troubleshooting — restic 0.18.1 documentation first.

restic repair packs f5738e59f690af4a8e41d200c10c59cbdfee1ef2c5b24ad0e4246f03fd9bb077

restic repair snapshots --forget

Damaged pack files can be caused by backend problems, hardware problems or bugs in restic. Please open an issue at Sign in to GitHub · GitHub for further troubleshooting!

Fatal: repository contains errors

Command exited with non-zero status 1

```

What should I do at this point?

Maybe run memory tests?

1 Like

I have checked kernal logs (using tail -20) and no error indications. I also ran a brief memory test with no errors resulting. Tonight I will run with 4 complete passes.

First thing I’d do is download the latest version and run the check again. I know there’s been at least one or two fixes for that error message.

Didn’t know that. Thanks!

Running now with restic 0.18.1 compiled with go1.25.1 on linux/amd64
Output:
```
tomc@tom-galagopro:~/Dropbox/restic-backup/restic-backup-scripts$ time restic -p /media/tomc/SD-128GB-1/scratch/ssap -r /media/tomc/SSD-WD01/galp5-kubuntu-SSD/remainders check --read-data
using temporary cache in /tmp/restic-check-cache-2310788574
create exclusive lock for repository
repository 56193900 opened (version 2, compression level auto)
created new cache in /tmp/restic-check-cache-2310788574
load indexes
[0:00] 100.00% 6 / 6 index files loaded
check all packs
check snapshots, trees and blobs
[0:06] 100.00% 64 / 64 snapshots
read all data
pack f5738e59f690af4a8e41d200c10c59cbdfee1ef2c5b24ad0e4246f03fd9bb077 contains 2 errors: [blob 071cee7bdc43617d37377411d7bcae6b43d6b23b856504f520eb77ae2f4ef594: decrypting blob <data/071cee7b> from f5738e59 failed: ciphertext verificati
on failed unexpected pack id c6da4e9ea03a4c3efa602f56a0de1c35be234c87fcd199e8ab5d9c4e459ddb3a]
[4:45] 100.00% 3937 / 3937 packs

The repository contains damaged pack files. These damaged files must be removed to repair the repository. This can be done using the following commands. Please read the troubleshooting guide at https://restic.readthedocs.io/en/stable/07
7_troubleshooting.html first.

restic repair packs f5738e59f690af4a8e41d200c10c59cbdfee1ef2c5b24ad0e4246f03fd9bb077
restic repair snapshots --forget

Damaged pack files can be caused by backend problems, hardware problems or bugs in restic. Please open an issue at Sign in to GitHub · GitHub for further troubleshooting!
Fatal: repository contains errors

real 4m54.112s
user 6m58.251s
sys 0m32.731s
tomc@tom-galagopro:~/Dropbox/restic-backup/restic-backup-scripts$
```

I’ll run Memtest86+ overnight now….

If the affected files’ SHA256 has of their own contents does not match the filename, the contents of the file is damaged.

I’m sorry but I don’t understand what you’re saying. My impression is that you’re talking about an additional way to verify a file, but I don’t have an identified file to check, nor do I know how to do the check if I did. Can you say more?

After running Memtest86+ for 7:20 hours, and not quite 3 passes, I have 296 errors. I now need to determine which of my two memory modules (or both? unlikely, I presume) is the culprit. That requires pulling one out. I have an 8 GiB and a 32 GiB installed. I’ll test the 8 GiB tonight.

Interpreting the Memtest86+ output beyond the error count was beyond my ability.

3 Likes

I have tested both memory chips, although not exhaustively, and failed to find errors. BUT this was after deliberately switching the slots they were in. I’m thinking now that I may be dealing with a chip seating error. I’ll do a looong memtest86+ run this evening to see if switching slots solves the problem.

UPDATE 2025-09-29:1833 PDT - last night’s memtest86+ run encompassed 4 passes and produced 2 errors. The previous run on both memory chips combined has produced MANY more. I take this to be confirmation that this is a slot-seating problem. Tonight I’ll reseat both chips and rerun the overnight memtest86+ routine.

4 Likes