Persistent disk error on Mac Mini
Starting from this morning I noticed that when I was working with one folder, my IDE and Finder just hang. Rebooting didn't help, but restoring with Disk Utility helped at least for some time. I had to do the same 10 times until I decided to just delete the folder. But even after that Disk Utility finds an error and reports that it's fixed. If you run disk utility multiple times, it will report and fix the error each time. That happens in recovery mode as well as in normal state. The most recent output from Disk Utility is below, but it's really the same every single time:
Running First Aid on “Data” (disk3s5)
Verifying the startup volume will cause this computer to stop responding.
Verifying file system.
Volume could not be unmounted.
Using live mode.
Performing fsck_apfs -n -l -x /dev/rdisk3s5
Checking the container superblock.
Checking the checkpoint with transaction ID 5437497.
Checking the space manager.
Checking the space manager free queue trees.
Checking the object map.
Checking the encryption key structures.
Checking volume /dev/rdisk3s5.
Checking the APFS volume superblock.
The volume Data was formatted by newfs_apfs (1677.81.1) and last modified by apfs_kext (2235.0.13).
Checking the object map.
Checking the snapshot metadata tree.
Checking the snapshot metadata.
Checking the document ID tree.
Checking the fsroot tree.
warning: physical_size (212992) of dir-stats object (id 290187) is greater than expected (0)
warning: physical_size (4702208) of dir-stats object (id 290188) is greater than expected (1110016)
warning: physical_size (5599744000) of dir-stats object (id 694042) is greater than expected (22073344)
warning: physical_size (503808) of dir-stats object (id 1094804) is greater than expected (196608)
warning: physical_size (16384) of dir-stats object (id 13378071) is greater than expected (0)
warning: descendants (448) of dir-stats object (id 18603227) is greater than expected (439)
error: doc-id tree: record exists for doc-id 667971, file-id 44401145 but no inode references this doc-id
error: doc-id tree: record exists for doc-id 835686, file-id 45019705 but no inode references this doc-id
Checking the extent ref tree.
Checking the file key rolling tree.
Verifying volume object map space.
The volume /dev/rdisk3s5 with UUID 620AFA71-3315-4247-B870-4228000F9149 was found to be corrupt and needs to be repaired.
Verifying allocated space.
Performing deferred repairs.
The volume /dev/rdisk3s5 with UUID 620AFA71-3315-4247-B870-4228000F9149 appears to be OK.
File system check exit code is 0.
Restoring the original state found as mounted.
Operation successful.
Mac mini